0

I have shell script like below


ssh  -q -v -i id_rsa -o "StrictHostKeyChecking no" user@remotemachine script > file

hdfs dfs -put -f file hdfspath

When I run this script in oozie shell action with "", file is copied from remote machine to my machine. Actually its more than 2kb file. But when i move it to hdfs using (hdfs dfs -put) command Its thrwing below error

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], exception invoking main(), Output data exceeds its limit [2048] org.apache.oozie.action.hadoop.LauncherException: Output data exceeds its limit [2048]

1 Answer 1

0

Add the below in the shell action or put it in /etc/oozie/conf/oozie-site.xml and restart the oozie server. This will increase the console output data that can be captured as part of the shell action tag <capture-output/>. The default is 2048 which is Max size in characters for output data.

 <configuration>             
  <property>
    <name>oozie.action.max.output.data</name>
    <value>8192</value>
  </property>        
</configuration>

The <capture-output/> is not required if you not using the console output from the shell action for any decisions in next action. Try just by removing the tag <capture-output/> if not required.

6
  • Sorry Forgot to mention, I need "<capture-output/>" for next action. One more thing, even if i increase (oozie.action.max.output.data) size, the file will huge size. So it will make problem again.
    – Prabhu
    Commented Nov 13, 2018 at 12:23
  • What do you mean by file is huge? it does not depend on file size you are using in hdfs put command. It captures the characters that gets printed on the console when you execute your shell script.
    – Amit Kumar
    Commented Nov 13, 2018 at 12:29
  • Try executing your shell script without oozie from terminal and then see how much characters gets printed on the terminal console. Increase the oozie.action.max.output.data size more than that. It will work
    – Amit Kumar
    Commented Nov 13, 2018 at 12:31
  • So you are saying this command "hdfs dfs -put -f file hdfspath" generates output that exceeds 2kb right? I printed that output and its generating 18kb size of logs.
    – Prabhu
    Commented Nov 13, 2018 at 12:53
  • If i run that from terminal without oozie, its not generating any log. When i use oozie shell action only it produces output logs
    – Prabhu
    Commented Nov 13, 2018 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.