in src/main/java/com/netflix/bdp/s3mper/cli/FileSystemVerifyCommand.java [59:97]
public void execute(Configuration conf, String[] args) throws Exception {
CmdLineParser parser = new CmdLineParser(this);
String keyId = conf.get("fs.s3n.awsAccessKeyId");
String keySecret = conf.get("fs.s3n.awsSecretAccessKey");
s3 = new AmazonS3Client(new BasicAWSCredentials(keyId, keySecret));
try {
parser.parseArgument(args);
ExecutorService executor = Executors.newFixedThreadPool(threads);
List<Future> futures = new ArrayList<Future>();
BufferedReader fin = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF8"));
try {
for(String line = fin.readLine(); line != null; line = fin.readLine()) {
futures.add(executor.submit(new FileCheckTask(new Path(line.trim()))));
}
} finally {
fin.close();
}
for(Future f : futures) {
f.get();
}
executor.shutdown();
} catch (CmdLineException e) {
System.err.println(e.getMessage());
System.err.println("s3mper fs verify [options]");
// print the list of available options
parser.printUsage(System.err);
System.err.println();
System.err.println(" Example: s3mper fs verify "+parser.printExample(OptionHandlerFilter.ALL));
}
}