Review Board 1.7.22

Refactor HiveMetaStore to make it maintainable

Review Request #669 - Created April 27, 2011 and updated

Ashutosh Chauhan
carl, jvs, pauly
See HIVE-2135
Since this is a refactoring patch, no new tests are required. Ran all the tests in metastore. All of them passed.
Review request changed
Updated (April 27, 2011, 6:24 p.m.)
Mistyped jira number.
Posted (April 29, 2011, 8:48 p.m.)


The example in this Javadoc needs to be updated to match the new invocation pattern.  (Also, the original Javadoc was missing <pre> and <code> tags; can you add those in here so that the HTML will get generated correctly?)

But the new invocation pattern actually better?  It seems like the invocation has gotten a little more verbose since each call to executeWithRetry now has to pass in two arguments.  Wouldn't it be better to leave the executeWithRetry method in the HiveMetaStore class so that it can do any common stuff like setting these as attributes on the command object?

Likewise, I'm not clear on how moving the thread-local access to the command object is an improvement.  Seems to me it should stay in HiveMetaStore; again, you can pass the right object in from executeWithRetry.