Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2011
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. import java.io.IOException;
  2.  
  3. import org.apache.hadoop.conf.Configuration;
  4. import org.apache.hadoop.fs.FileStatus;
  5. import org.apache.hadoop.fs.FileSystem;
  6. import org.apache.hadoop.fs.Path;
  7.  
  8.  
  9. public class GlobTester {
  10.  
  11.   /**
  12.    * @param args
  13.    * @throws IOException
  14.    */
  15.   public static void main(String[] args) throws IOException {
  16.     Configuration conf = new Configuration();
  17.     FileSystem fs = FileSystem.get(conf);
  18.     for (FileStatus stat : fs.globStatus(new Path(fs.getHomeDirectory(), "*"))) {
  19.       System.out.println(stat.getPath());
  20.     }
  21.   }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement