HDFS write resulting in " CreateSymbolicLink error (1314): A required privilege is not held by the client."

Win 8.1 + hadoop 2.7.0 (build from sources)

  1. run Command Prompt in admin mode

  2. execute etc\hadoop\hadoop-env.cmd

  3. run sbin\start-dfs.cmd

  4. run sbin\start-yarn.cmd

  5. now try to run your job


I recently met exactly the same problem. I tried reformatting namenode but it doesn't work and I believe this cannot solve the problem permanently. With the reference from @aoetalks, I solved this problem on Windows Server 2012 R2 by looking into Local Group Policy.

In conclusion, try the following steps:

  1. open Local Group Policy (press Win+R to open "Run..." - type gpedit.msc)
  2. expand "Computer Configuration" - "Windows Settings" - "Security Settings" - "Local Policies" - "User Rights Assignment"
  3. find "Create symbolic links" on the right, and see whether your user is included. If not, add your user into it.
  4. this will come in effect after logging in next time, so log out and log in.

If this still doesn't work, perhaps it's because you are using a Administrator account. In this case you'll have to disable User Account Control: Run all administrators in Admin Approval Mode in the same directory (i.e. User Rights Assignment in Group Policy) Then restart the computer to make it take effect.

Reference: https://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7