SqoopOptions opts = getSqoopOptions(conf);
// run the tool through the normal entry-point.
int ret;
try {
Sqoop importer = new Sqoop(new ImportTool(), conf, opts);
ret = Sqoop.runSqoop(importer, getArgv(true, importCols, conf));
} catch (Exception e) {
LOG.error("Got exception running Sqoop: " + e.toString());
throw new RuntimeException(e);
}
// expect a successful return.
assertEquals("Failure during job", 0, ret);
opts = getSqoopOptions(conf);
try {
ImportTool importTool = new ImportTool();
opts = importTool.parseArguments(getArgv(false, importCols, conf), conf,
opts, true);
} catch (Exception e) {
fail(e.toString());
}