Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

winutils.exe chmod command doesn't set permission

> D:\>echo %HADOOP_HOME% 
> D:\Apps\winutils\hadoop-2.7.1

Create tmp/hive folders on the same disk as HADOOP_HOME

 D:\>dir tmp\hive

  Directory of D:\tmp\hive

  06/13/2016 01:13 PM <DIR> .
  06/13/2016 01:13 PM <DIR> ..
  0 File(s) 0 bytes
  2 Dir(s) 227,525,246,976 bytes free

Try to figure out what permission are set

  D:\>winutils.exe ls \tmp\hive
  FindFileOwnerAndPermission error (1789): The trust relationship between this workstation and the primary domain failed.

When I tried chmod for this folders it seems work

 winutils.exe chmod 777 \tmp\hive 

but ls shows same exception

Does anyone has an idea what is going on ? Moreover, It works for me a couple hours ago but now my spark application fails with an exception

java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rw-rw-rw-
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)
like image 396
Oleksandr Petrenko Avatar asked Jun 13 '16 17:06

Oleksandr Petrenko


3 Answers

I am quite late here still posting it so it might help someone in future.

  1. While setting the permission, make sure you are using correct path for winutils.exe (try to use complete path). For me winutils.exe was in C drive:

    C:\path\to\winutils.exe chmod -R 777 C:\tmp\hive

Run the below command to check the permission and it should look like below image ([setting and checking the permission : click to see the image]): https://i.stack.imgur.com/vE9vl.png

  1. If this is your corporate system the you must be on the same network using VPN or Forti Client or any other tool your organisation has been using
like image 183
Madhukar Avatar answered Oct 16 '22 20:10

Madhukar


https://support.microsoft.com/en-us/kb/2771040

Looks like domain access issues, please ensure you can access domain and take a try again.

After ensure domain access, below error disappear

Caused by: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions a
re: rw-rw-rw-
like image 3
Wenpei Avatar answered Oct 16 '22 20:10

Wenpei


I'm late here and I just encountered this issue. Writing this so it will help somebody.

If you are using your office laptop, make sure you are connected to office network and retry. The domain Member of Domain settings point to your office network. That must solve the issue.

  1. Log on Windows 10 using local Administrator account
  2. Hold Windowslogo and press E to open File Explorer 3.On the right side of the File Explorer right click on This PC and choose Properties Click Advanced System Settings
  3. Choose Computer Name tab and select change to see the value configured.
like image 1
Sampath Avatar answered Oct 16 '22 21:10

Sampath