0

I am writing a script to log all the return code of any errors occurring when executing a sqoop operation?

for eg we have different sqoop tools like:

sqoop eval, sqoop import, sqoop export etc.

When execution one of the tools we would get a return code. If the execution was success ful we get return code=0. If not successful we get some other return code based the type of the error.

Is there any way we can log these errors and return code?

Kaushik
  • 1,264
  • 8
  • 20
  • 32

1 Answers1

0

I have tried using Java code:

Use Sqoop.runTool api.

int ret = Sqoop.runTool(yourcommand.toArray(new String[yourcommand.size()]));

Please refer to this for more info: Link

Hope this helps.

Community
  • 1
  • 1
Mukesh S
  • 2,856
  • 17
  • 23