title: Connection to Hadoop Cluster From AWS
body: <p>I am trying to connect to our hadoop cluster from AWS instance ( where hadoop is not installed) to tranfser some files. However the following code is not working..</p>
  
  <pre><code>   System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
      Configuration configuration = new Configuration();
  
      configuration.addResource(coreSite);
      configuration.addResource(hdfsSite);
      UserGroupInformation.setConfiguration(configuration);
      UserGroupInformation.loginUserFromKeytab(user, keytabPath);
      FileSystem fs = FileSystem.get(configuration);
  </code></pre>
  
  <p>The FileSystem object still points to the local AWS path only. I am using the <code>core-site.xml</code> , <code>hdfs-site.xml</code> , <code>.keytab</code> , <code>krb5.conf</code> and batchId as user of that particular cluster. Can someone give me some pointers for this.
  Thanks.</p>
  
  <p><strong>PS : I have tried to run this code in Windows environment too and its not working. SO environment issues can be ruled out.</strong></p>