String dir = "s3a://example/";
String currentDir = dir + "{1[5-9],2[01]}/*.txt";
JavaRDD<String> input = sc.textFile(currentDir);

此段代码会读入amazon s3上example目录下的15, 16, 17, 18, 19, 20, 21目录下的所有txt文件

posted on 2017-07-27 21:05  guoxiang  阅读(4165)  评论(0编辑  收藏  举报