3

I used to be able to use below hive command to run query file in batch mode and output the result to a CSV file. I used -S option to suppress the query log so only the query output is exported to the CSV file. I also used nohup to let the big job run even I logged out the system.

nohup hive -S -f /home/wj19670/pad.sql >pad.csv &

However under beeline, I can use the query in batch mode using below. But seems I can not use the -S option and nohup anymore. beeline is new to me. Does that beeline does not support -S and nohup?

beeline -u 'jdbc:hive2://server.domain.<>.com:10000/default;principal=hive/server.domain.com@SERVER.DOMAIN.COM' -f filename.hql

Aacini
  • 65,180
  • 12
  • 72
  • 108
Eric_IL
  • 171
  • 2
  • 10

1 Answers1

1

This is part of Hive-6758.

If you are using a version that is not fixed, the following workaround will work,

export HADOOP_CLIENT_OPTS="-Djline.terminal=jline.UnsupportedTerminal" && beeline -f query.hql & disown

I tested this with disown but not nohup, but the solution should be the same.

pettinato
  • 1,472
  • 2
  • 19
  • 39