title: NoSuchMethodError: org.apache.hadoop.io.retry.RetryUtils.getDefaultRetryPolicy
body: <p>Previously I was creating directories in <code>hdfs</code> from java on a <code>single node cluster</code> and it was running smoothely but as soon as I made my cluster multinode, I am getting this error
  The stacktrace I am getting looks like this </p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.io.retry.RetryUtils.getDefaultRetryPolicy(Lorg/apache/hadoop/conf/Configuration;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/Class;)Lorg/apache/hadoop/io/retry/RetryPolicy;
      at org.apache.hadoop.hdfs.NameNodeProxies.createNNProxyWithClientProtocol(NameNodeProxies.java:410)
      at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:316)
      at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:178)
      at org.apache.hadoop.hdfs.DFSClient.&lt;init&gt;(DFSClient.java:665)
      at org.apache.hadoop.hdfs.DFSClient.&lt;init&gt;(DFSClient.java:601)
      at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:148)
      at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2811)
      at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:100)
      at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2848)
      at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2830)
      at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:389)
      at CreateDirectory.main(CreateDirectory.java:44)
  </code></pre>
  
  <p>here is the CreateDirectory class</p>
  
  <pre><code>public static void main(String[] args) throws SQLException, ClassNotFoundException {
          String hdfsUri = "hdfs://localhost:9000/";
         //String dirName = args[0];
          String dirName=null;
        // String filename = args[1];
          String filename;
  
          if(args.length&lt;=0) dirName = "ekbana"; filename = "text.csv";
  
          URL url = null;
          BufferedReader in = null;
          FileSystem hdfs = null;
          FSDataOutputStream outStream = null;
          HttpURLConnection conn = null;
          List&lt;Map&lt;String, String&gt;&gt; flatJson;
          Configuration con = new Configuration();
          try {
              url = new URL("http://crm.bigmart.com.np:81/export/export-sales-data.php?sdate=2016-12-01&amp;edate=2016-12-02&amp;key=jdhcvuicx8ruqe9djskjf90ueddishr0uy8v9hbjncvuw0er8idsnv");
          } catch (MalformedURLException ex) {
          }
  
          try {
              con.set("fs.hdfs.impl", org.apache.hadoop.hdfs.DistributedFileSystem.class.getName());
              con.set("fs.file.impl", org.apache.hadoop.fs.LocalFileSystem.class.getName());
              hdfs = FileSystem.get(URI.create(hdfsUri), con); // this is line 44 
          } catch (IOException e) {
              e.printStackTrace();
          }
  
          try {
              System.out.println(hdfs.mkdirs(new Path(hdfsUri + "/" + dirName)));
          } catch (IOException e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>The solution on many sites says that I need hadoop-common and I already have it and still I am getting this error.I doubt that the retry policy related to my setup, if not then why is this error ?</p>