In-process Hive CLI driver does not work
Review Request #7143 - Created Sept. 18, 2012 and submitted
Throw the exception from the old namespace to support anyone checking the old exception. Also update HiveImport to check the new namespace.
Created a mock Hive CLI that calls System.exit(0). Can see it now works. Was trying to create an automated test but the problem was once I created the mock class it was used for the other tests as well instead of the shell script. The easiest way I can see to create a unit test would be to allow the Hive CLI class to be specified as a parameter - that way it could be overridden in a unit test to a mock class. Was also thinking about loading the class at runtime but this seemed like a bit of work for a small bug fix.
Posted (Sept. 18, 2012, 6:49 a.m.)
Hi David, thank you very much for identifying this discrepancy and providing patch. I do have just one comment:
As the com.cloudera.sqoop.util.ExitSecurityException inherits from org.apache.sqoop.util.ExitSecurityException, I believe that this change might not be necessary as the com.cloudera.* exception should be caught later in the code even if the catch statement is using org.apache.sqoop.util.ExitSecurityException, right?
Review request changed
Updated (Jan. 24, 2013, 5:30 a.m.)
- changed from pending to submitted