if (parseArguments(args) == null) {
return -1;
}
Parameters params = new Parameters();
if (hasOption("minSupport")) {
String minSupportString = getOption("minSupport");
params.set("minSupport", minSupportString);
}
if (hasOption("maxHeapSize")) {
String maxHeapSizeString = getOption("maxHeapSize");
params.set("maxHeapSize", maxHeapSizeString);
}
if (hasOption("numGroups")) {
String numGroupsString = getOption("numGroups");
params.set("numGroups", numGroupsString);
}
if (hasOption("numTreeCacheEntries")) {
String numTreeCacheString = getOption("numTreeCacheEntries");
params.set("treeCacheSize", numTreeCacheString);
}
if (hasOption("splitterPattern")) {
String patternString = getOption("splitterPattern");
params.set("splitPattern", patternString);
}
String encoding = "UTF-8";
if (hasOption("encoding")) {
encoding = getOption("encoding");
}
params.set("encoding", encoding);
if (hasOption("useFPG2")) {
params.set(PFPGrowth.USE_FPG2, "true");
}
Path inputDir = getInputPath();
Path outputDir = getOutputPath();
params.set("input", inputDir.toString());
params.set("output", outputDir.toString());
String classificationMethod = getOption("method");
if ("sequential".equalsIgnoreCase(classificationMethod)) {
runFPGrowth(params);
} else if ("mapreduce".equalsIgnoreCase(classificationMethod)) {