0

I am not able to configure hadoop for stand alone operation. When i am doing cp conf/*.xml input, i am getting these errors: cp: cannot create regular file input/capacity-scheduler.xml': Permission denied cp: cannot create regular fileinput/core-site.xml': Permission denied cp: cannot create regular file input/fair-scheduler.xml': Permission denied cp: cannot create regular fileinput/hadoop-policy.xml': Permission denied cp: cannot create regular file input/hdfs-site.xml': Permission denied cp: cannot create regular fileinput/mapred-queue-acls.xml': Permission denied cp: cannot create regular file `input/mapred-site.xml': Permission denied

And after that when i am doing bin/hadoop jar hadoop-examples-*.jar grep input output 'dfs[a-z.]+',i am getting these errors:

/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 55: $'\r': command not found Error: JAVA_HOME is not set. I have edited the env.sh file and have set the JAVA_HOME.

Can anyone suggest me something?

user861938
  • 83
  • 1
  • 11

1 Answers1

0

Try running those copy commands as the root user (administrator). It's probably a permissions issue where your user account doesn't have the privileges to write things in that directory.

You can do this in a lot of Linux distributions by using sudo

E.g:

sudo cp conf/*.xml input

Isaac Dontje Lindell
  • 3,246
  • 6
  • 24
  • 35
  • I am using cygwin on Windows. And what about the JAVA_HOME not set? – user861938 Sep 27 '13 at 16:57
  • I'm not sure about the JAVA_HOME. As far as Permission Denied, can you give the output of ls -la (so I can see permissions)? Maybe copy the output to Pastebin.com and just give me the link so you don't have to paste it into a comment. – Isaac Dontje Lindell Sep 27 '13 at 17:00
  • conf d---------+ 1 Harsh None 0 Sep 26 20:30 contrib ----------+ 1 Harsh None 6842 Jul 23 03:56 hadoop-ant-1.2.1.jar ----------+ 1 Harsh None 414 Jul 23 03:56 hadoop-client-1.2.1.jar ----------+ 1 Harsh None 4203147 Jul 23 03:56 hadoop-core-1.2.1.jar ----------+ 1 Harsh None 142726 Jul 23 03:56 hadoop- – user861938 Sep 27 '13 at 18:19
  • examples-1.2.1.jar ----------+ 1 Harsh None 417 Jul 23 03:56 hadoop-minicluster-1.2.1.jar ----------+ 1 Harsh None 3126576 Jul 23 03:56 hadoop-test-1.2.1.jar ----------+ 1 Harsh None 385634 Jul 23 03:56 hadoop-tools-1.2.1.jar drwxr-xr-x+ 1 Harsh None 0 Sep 26 20:45 input – user861938 Sep 27 '13 at 18:20
  • I have set the permissions. Its working. Only JAVA_HOME is left now. – user861938 Sep 27 '13 at 19:41
  • What's the line you're using in env.sh to set JAVA_HOME? – Isaac Dontje Lindell Sep 27 '13 at 19:41
  • export JAVA_HOME= "C:/Program Files/Java/jdk1.6.0_26" – user861938 Sep 27 '13 at 19:44
  • I'm not super familiar with Hadoop, but looking at http://www.cs.brandeis.edu/~rshaull/cs147a-fall-2008/hadoop-windows/, you may not need the "export" keyword. If that's not it, I'm not sure what else it would be. – Isaac Dontje Lindell Sep 27 '13 at 21:12