setting umask for hive client
<p>How can I set the umask for an Hive HQL script? Either via statements within the script or via a client side configuration set before running the script? I want to make the change on the client side without changing the server side configuration.</p>

<p>I've found that this works from a shell prompt, but I'd like to do it from inside a hive script.</p>

<pre><code>$ hdfs dfs -Dfs.permissions.umask-mode=000 -mkdir /user/jeff/foo
$ hdfs dfs -Dfs.permissions.umask-mode=000 -put bar /user/jeff/foo
</code></pre>

<p>These tries don't work:</p>

<pre><code>hive&gt; dfs -mkdir -Dfs.permissions.umask-mode=000 /user/jeff/foo;
-mkdir: Illegal option -Dfs.permissions.umask-mode=000

hive&gt; dfs -Dfs.permissions.umask-mode=000 -mkdir  /user/jeff/foo;
-Dfs.permissions.umask-mode=000: Unknown command
</code></pre>

<p>Setting hive.files.umask.value in .hiverc doesn't have the desired effect (The g+w and o+w bits aren't set which was what I was trying to do with this umask.):</p>

<pre><code>hive&gt; set hive.files.umask.value;
hive.files.umask.value=000
hive&gt; dfs -mkdir /user/jeff/foo;
hive&gt; dfs -ls -d  /user/jeff/foo;
drwxr-xr-x   - jeff hadoop          0 2016-02-23 15:19 /user/jeff/foo
</code></pre>

<p>It looks like I'll need to sprinkle a bunch of "dfs -chmod 777 ..." statements in my HQL script.</p>

<p>Ideas??</p>