OSX - Unable to copy files from local file system to hdfs

2013-10-01T16:02:54

I'm trying to copy files from a local file system to the HDFS and it throws up an error indicating the file could only be replicated to 0 nodes instead of 1.

ckharide-mac:bin hadoop$ ./hadoop dfs -copyFromLocal /tmp/wcinput /user/hadoop/app/input
13/10/01 13:25:05 WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/hadoop/app/input/LICENSE.txt could only be replicated to 0 nodes, instead of 1
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:587)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)

I was able to create the directory though but copying of files doesn't work. I have tried reformatting the name node and stopped/starting the hadoop services still the problem persists.

Any help please is appreciated.

Copyright License:
Author:「chandra」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/19110972/osx-unable-to-copy-files-from-local-file-system-to-hdfs

About “OSX - Unable to copy files from local file system to hdfs” questions

I'm trying to copy files from a local file system to the HDFS and it throws up an error indicating the file could only be replicated to 0 nodes instead of 1. ckharide-mac:bin hadoop$ ./hadoop dfs -
I have installed hadoop on Ubuntu 14.04. I am getting the following error whenever I copy files from the local file system to HDFS. I am using this command: /usr/local/hadoop$ bin/hadoop dfs -
As I know copyFromLocal <localSrc> <dest> this command works copy files to HDFS. I don't want to copy manually because I am getting files from sources on weekly basis it's difficult to ...
In Hadoop, I understand that the master node(Namenode) is responsible for storing the blocks of data in the slave machines(Datanode). When we use -copyToLocal or -get, from the master, the files ...
In my Java application, I need to copy multiple files from HDFS to Local File System. Which of the below two approaches will be faster ? 1. Sequentially copy files one-by-one 2. Run parallel threa...
How to copy file from HDFS to the local file system . There is no physical location of a file under the file , not even directory . how can i moved them to my local for further validations.i am tried
I need to copy a folder from local file system to HDFS. I could not find any example of moving a folder(including its all subfolders) to HDFS $ hadoop fs -copyFromLocal /home/ubuntu/Source-Folder-To-
I need to copy files from local file system to HDFS through shell script. Suppose I have two files in my local system fewInfo.tsv.gz fewInfo.txt In the above case, fewInfo.tsv.gz should be copied...
After installing cloudera HDC on fedora25 , I can create folders, but not files nor can I copy data from my local file system to HDFS. This is the command I use: sudo -u hdfs hadoop fs -copyFrom...
This is my first thread and am using using 5.4.0.1-130 Pentaho kettle version. I have installed hadoop-1.0.3 version in a VM player and I have bridged it using bridged network. I have Pentaho ins...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.