how to get job counters with sqoop 1.4.4 java api? -
i'm using sqoop 1.4.4 , java api run import job , i'm having trouble figuring out how access job counters once import has completed. see suitable methods in configurationhelper class, getnummapoutputrecords, i'm not sure how pass job them.
is there way @ job sqooptool or sqoop objects?
my code looks this:
sqooptool sqooptool = new importtool(); sqoopoptions options = new sqoopoptions(); options.setconnectstring(connectstring); options.setusername(username); options.setpassword(password); options.settablename(table); options.setcolumns(columns); options.setwhereclause(whereclause); options.settargetdir(targetdir); options.setnummappers(1); options.setfilelayout(filelayout.textfile); options.setfieldsterminatedby(delimiter); configuration config = new configuration(); config.set("oracle.sessiontimezone", timezone.getid()); system.setproperty(sqoop.sqoop_rethrow_property, "1"); sqoop sqoop = new sqoop(sqooptool, config, options); string[] nullargs = new string[0]; sqoop.runsqoop(sqoop, nullargs);
Comments
Post a Comment