title: Hadoop Hdfs DFSAdmin - Cannot initialize Cluster or hdfs points to file:/// not hdfs://
body: <p>I'm using hadoop DFSAdmin api to report the dead blocks for an hdfs backup utility.
  <a href="https://blog.woopi.org/wordpress/files/hadoop-2.6.0-javadoc/org/apache/hadoop/hdfs/tools/DFSAdmin.html" rel="nofollow noreferrer">enter link description here</a></p>
  <p>But by invoking my jar in the env (included the hadoop jars in classpath)</p>
  <pre><code>java -classpath  &quot;/usr/local/flytxt/hadoop:/usr/local/HBackup/conf:/usr/local/HBackup/lib/*:/usr/local/HBackup/hadoop-distcp-2.7.5.jar&quot; -Djava.library.path=&quot;/usr/local/HBackup/lib/native&quot;  -jar hdfs-br-dfsadmin-0.0.1-SNAPSHOT.jar
  </code></pre>
  <p>fails returning:</p>
  <pre><code>report: FileSystem file:/// is not an HDFS file system
  Usage: hdfs dfsadmin [-report] [-live] [-dead] [-decommissioning]
  </code></pre>
  <p>This is the code:</p>
  <pre><code>    String[] argv= {&quot;-report&quot;, &quot;-dead&quot; };
      DFSAdmin.main(argv);
  </code></pre>
  <p>Tried this thread: <a href="https://stackoverflow.com/questions/12391226/hadoop-hdfs-points-to-file-not-hdfs">enter link description here</a>
  but no help!</p>