Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileStatus;
- import org.apache.hadoop.fs.FileSystem;
- import org.apache.hadoop.fs.Path;
- public class GlobTester {
- /**
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException {
- Configuration conf = new Configuration();
- FileSystem fs = FileSystem.get(conf);
- for (FileStatus stat : fs.globStatus(new Path(fs.getHomeDirectory(), "*"))) {
- System.out.println(stat.getPath());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement