Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

execute beeline at background goes in to a hung state

avatar
New Contributor

I have created two ksh shell scripts:

  1. parent script and
  2. 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 &

1 REPLY 1

avatar

@Abe Ram

Check below link:

https://stackoverflow.com/questions/32191260/beeline-equivalent-of-hive-silent-mode

Basically add export HADOOP_CLIENT_OPTS="-Djline.terminal=jline.UnsupportedTerminal" before running beeline in background.

https://issues.apache.org/jira/browse/HIVE-6758