1

I am new at Java, Hadoop etc. I am having a problem when trying to copy a file to HDFS. It says: "-copyFromLocal: java.net.UnknownHostException: quickstart.cloudera (...)"

How can I solve this? It is a exercise. You can see the problem in the imagem below.

Image with the problem

Image 2 with the error

Thank you very much.

1 Answer 1

1

As error says you need to supply the HDFS folder path as destination. So the code should be like:

hadoop fs -copyFromLocal words.txt /HDFS/Folder/Path

Almost all errors that you get while working in Hadoop are Java errors as MapReduce was mostly written in Java. But that doesnt mean there is some Java error in it.

Sign up to request clarification or add additional context in comments.

3 Comments

Hi @abhiieor, thank you for your answer. I tried the code but still says the same error. Is there any other option? Thanks!
You can see "Image 2 with the erro" in the question. Thanks!
I didn't mean literal /HDFS/Folder/Path but rather actual HDFS folder. If you don't have any then run hadoop fs -mkdir /user/Gus/words to create a new folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.