Ayon, When you have a java client that you want to use to simply access hdfs you need to make sure that you let your hdfs client know where to look to connect to hdfs and the namenode; You'll want to create a new Configuration object (which will automatically try and load a copy of your core-size.xml conf file if its around).
conf = new Configuration(); If you dont want to move a copy of it locally, you can manually set the parameter for the namenode: conf.set("fs.default.name", "hdfs://localhost:PORT"); and then get a reference to hdfs. hdfs_ref = FileSystem.get(conf); from there, you can do basic FS operations like get a dir listing, create a file, delete a file, etc. Josh Patterson Cloudera On Mon, Aug 9, 2010 at 5:12 PM, Ayon Sinha <ayonsi...@yahoo.com> wrote: > I have a HDFS java client on the same network domain as the cluster which > needs to read the dfs file with permissions rw-r--r-- > I get > java.io.IOException > at org.apache.hadoop.dfs.DFSClient.(DFSClient.java:169) > at > org.apache.hadoop.dfs.DistributedFileSystem.initialize(DistributedFileSystem.java:67) > at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1339) > at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:56) > at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1351) > at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:213) > > Caused by: javax.security.auth.login.LoginException: Login failed: Expect > one token as the result of whoami: nt authority\\system > at > org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:250) > at > org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:275) > at org.apache.hadoop.dfs.DFSClient.(DFSClient.java:167)\r\n\t... 20 > more\r\n&msg=2010-08-06 16:25:38,069 ERROR - > com.ebay.integ.dal.cache2.CacheLoaderFailurenull\r\n > > Can I use > job.set("dfs.permissions", "false"); > My question is: Is it a matter of setting the right property values in the > conf object? like user.name or dfs.web.ugi or does the clinet need to > actually have a Unix login or passwordless ssh setup? > > -Ayon > > >