I have created two ksh shell scripts:
- parent script and
- beeline child script.
I am spawning multiple background processes from the wrapper script. My problem is when I execute the wrapper script in the background, then the spawned processes goes to a hung state.
it turned out to be when executing beeline command at the background, as soon as the parent is placed on background the beeline background execution in the child process goes to a hung state because it did not know where to send the std out/std err. here in the below code the second background process goes to a hung state.
beeline -u "jdbc:hive2://host:XXXX/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" --showHeader=false --verbose =false --outputformat="csv2" -n XXXXXX -p XXXXXX -f test.sql 1> test.out 2> /dev/null
nohup beeline -u "jdbc:hive2://host:XXXX/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" --showHeader=false --verbose =false --outputformat="csv2" -n XXXXXX -p XXXXXX -f test.sql 1> test.out 2> /dev/null &