I am using Runtime.getRuntime().exec() method to run a command and I get exit code 11 when I call Process.waitFor().
When I run the same command on the console it runs as expected.
the command is:
hive -hiveconf mapred.map.child.java.opts=-Xmx2048M -hiveconf mapred.job.shuffle.input.buffer.percent=0.30 -hiveconf io.sort.factor=25 -hiveconf io.sort.mb=256 -hiveconf mapred.job.reuse.jvm.num.tasks=500 -hiveconf mapred.job.priority=VERY_LOW -e select site_id,count(session_id) from my_table where day = ‘20111017’ group by site_id;
I am running on Unix machine.
Any idea why? What is exit code 11?
To fix it I changed the command to be:
hive -hiveconf mapred.map.child.java.opts=-Xmx2048M -hiveconf mapred.job.shuffle.input.buffer.percent=0.30 -hiveconf io.sort.factor=25 -hiveconf io.sort.mb=256 -hiveconf mapred.job.reuse.jvm.num.tasks=500 -hiveconf mapred.job.priority=VERY_LOW -f filename;
As you can see I changed the -e query to -f filename.