hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayon Sinha <ayonsi...@yahoo.com>
Subject Re: FileSystemCat ipc.Client: Retrying connect to server:
Date Sun, 22 May 2011 16:43:11 GMT
Is yours hdfs running?
 
-Ayon
See My Photos on Flickr
Also check out my Blog for answers to commonly asked questions.



________________________________
From: Yang Xiaoliang <yangxiaoliang2006@gmail.com>
To: hdfs-user@hadoop.apache.org
Sent: Sunday, May 22, 2011 7:23 AM
Subject: FileSystemCat ipc.Client: Retrying connect to server:

Hi All,

I am just reading the book *Hadoop: The Definitive Guide *by Tom White,
there is an example for the *FileSystem* class in chapter 3,
example3-2:
------------------------------------------------------------------------------------------
public class FileSystemCat {

import java.io.InputStream;
import java.net.URI;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IOUtils;

  public static void main(String[] args) throws Exception {
    String uri = args[0];
    Configuration conf = new Configuration();
    FileSystem fs = FileSystem.get(URI.create(uri), conf);
    InputStream in = null;
    try {
      in = fs.open(new Path(uri));
      IOUtils.copyBytes(in, System.out, 4096, false);
    } finally {
      IOUtils.closeStream(in);
    }
  }
}
---------------------------------------------------------------------------------------------
I run the program as follows:
% export HADOOP_CLASSPATH=.
% hadoop FileSystem.Cat
hdfs://localhost/user/hadoop-user/input/mapred-site.xml

and then, what i got was as fllows:

ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already
tried 0 time(s).
11/05/22 20:45:53 INFO ipc.Client: Retrying connect to server: localhost/
127.0.0.1:8020. Already tried 1 time(s).
11/05/22 20:45:53 INFO ipc.Client: Retrying connect to server: localhost/
127.0.0.1:8020. Already tried 1 time(s).
11/05/22 20:45:54 INFO ipc.Client: Retrying connect to server: localhost/
127.0.0.1:8020. Already tried 2 time(s).
....................................

can anyone help?
Mime
View raw message