Skip to content
Advertisement

Hadoop 2.6.0 Browsing filesystem Java

I have installed a basic hadoop cluster on CentOS 6.6 and want to write a few basic programs (browse the filesystem, delete/add files, etc) but I’m struggling to get even the most basic app working.

When running some basic code to list the contents of a directory to the console I get the following error:

JavaScript

My pom.xml dependencies

JavaScript

The code:

JavaScript

The error is being thrown after calling fs.initialize(). I’m really not sure what the issue is here. Am I missing dependencies? Are they the wrong version?

Advertisement

Answer

I was running this by calling “java -jar app.jar …. etc” I should have been using “hadoop jar app.jar”.

Worked as intended when I ran it correctly.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement