Skip to content

Commit

Permalink
#622 fix(scipt and write to /all and /datasetId)
Browse files Browse the repository at this point in the history
  • Loading branch information
qifeng-bai authored and djtfmartin committed Mar 3, 2022
1 parent f524446 commit df548f1
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ public static String buildPathSamplingUsingTargetPath(AllDatasetsPipelinesOption
return PathBuilder.buildDatasetAttemptPath(options, "sampling", false);
}

/** Build a path to outlier records. */
/**
* Build a path to outlier records. {fsPath}/pipelines-outlier/{datasetId}
* {fsPath}/pipelines-outlier/all
*/
public static String buildPathOutlierUsingTargetPath(AllDatasetsPipelinesOptions options)
throws IOException {
// default: {fsPath}/pipelines-outlier
Expand All @@ -84,11 +87,13 @@ public static String buildPathOutlierUsingTargetPath(AllDatasetsPipelinesOptions
// {fsPath}/pipelines-outlier/{datasetId}
if (options.getDatasetId() != null && !"all".equalsIgnoreCase(options.getDatasetId())) {
outputPath = PathBuilder.buildPath(outputPath, options.getDatasetId()).toString();
} else {
// {fsPath}/pipelines-outlier/all
outputPath = PathBuilder.buildPath(outputPath, "all").toString();
}
// delete previous runs
FsUtils.deleteIfExist(options.getHdfsSiteConfig(), options.getCoreSiteConfig(), outputPath);
ALAFsUtils.createDirectory(fs, outputPath);

return outputPath;
}

Expand Down

0 comments on commit df548f1

Please sign in to comment.