title: “Wrong FS… expected: file:///” when trying to copyFromLocalFile from HDFS in Java
body: <p>I am trying to copy <strong>abc.json</strong> from <strong>port/example_File/2017</strong> to another location <strong>/port/example_File/2018</strong> in HDFS,
  by below code</p>
  
  <pre><code>String exampleFile= "hdfs://port/example_File/2017/abc.json"
  String targetFile="hdfs://port/example_File/2018"
  hdfs.copyFromLocalFile(new Path(exampleFile),new Path(targetFile))
  </code></pre>
  
  <p>I am getting below exception</p>
  
  <pre><code>    org.jboss.resteasy.spi.UnhandledException: 
  java.lang.IllegalArgumentException: Wrong FS:
   hdfs://port/example_File/2017/abc.json, expected: file:///
  </code></pre>
  
  <p>How to copy file from one location to another in HDFS</p>
  
  <p>Thanks,</p>