Hive/Beeline, how can I set the job .staging directory?

喜欢而已 提交于 2019-12-12 02:34:34

问题


On the cluster I'm working on every user is given 60GB of Hadoop quota. Historically the project I'm working on generates a lot of Hive queries. In order for things to work faster I'm trying to parallel these queries (which are unrelated) but as a result the directory /user/{myusername}/.staging/ is being filled with job_{someid} directories which in turn are filled with the hive jars and consume these 60GB very fast. While I can limit the parallelization factor I would also like to see if I can ask Hive to put these jars on a different directory. Say /tmp/{myusername} where I have a lot more space.

Any idea how do I tell Hive/Beeline to create the .staging directory under /tmp/{myusername}?


回答1:


Easiest way is on execution of your beeline session.

beeline --hive.exec.stagingdir=/tmp/{myusername}

Think you can do it via !set inside beeline but don't have the syntax to hand.




回答2:


The above doesn't work.

We found the following working

beeline --hiveconf hive.exec.stagingdir=/tmp/{myusername}



来源:https://stackoverflow.com/questions/37908837/hive-beeline-how-can-i-set-the-job-staging-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!