hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "HadoopDfsReadWriteExample" by ChristopheTaton
Date Sun, 17 Feb 2008 11:31:36 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by ChristopheTaton:
http://wiki.apache.org/hadoop/HadoopDfsReadWriteExample

------------------------------------------------------------------------------
  
  Reading from and writing to Hadoop DFS is no different from how it is done with other file
systems. The example attachment:HadoopDFSFileReadWrite.java reads a file from DFS and writes
it to another file on DFS (copy command). 
  
- Hadoop [http://lucene.apache.org/hadoop/api/org/apache/hadoop/fs/FileSystem.html FileSystem]
API describes the methods available to user. Let us walk through the code to understand how
it is done.
+ Hadoop [http://hadoop.apache.org/core/api/org/apache/hadoop/fs/FileSystem.html FileSystem]
API describes the methods available to user. Let us walk through the code to understand how
it is done.
  
- Create a [http://lucene.apache.org/hadoop/api/org/apache/hadoop/fs/FileSystem.html FileSystem]
instance by passing a new Configuration object. 
+ Create a [http://hadoop.apache.org/core/api/org/apache/hadoop/fs/FileSystem.html FileSystem]
instance by passing a new Configuration object. 
  
  {{{
  Configuration conf = new Configuration();
  FileSystem fs = FileSystem.get(conf);
  }}}
  
- Given an input/output file name as string, we construct inFile/outFile Path objects. Most
of the [http://lucene.apache.org/hadoop/api/org/apache/hadoop/fs/FileSystem.html FileSystem]
APIs accepts [http://lucene.apache.org/hadoop/api/org/apache/hadoop/fs/Path.html Path] objects.
+ Given an input/output file name as string, we construct inFile/outFile Path objects. Most
of the [http://hadoop.apache.org/core/api/org/apache/hadoop/fs/FileSystem.html FileSystem]
APIs accepts [http://hadoop.apache.org/core/api/org/apache/hadoop/fs/Path.html Path] objects.
  
  {{{
  Path inFile = new Path(argv[0]);

Mime
View raw message