From df548f19a4faba821a349ecf90eadc78032f6d2e Mon Sep 17 00:00:00 2001 From: Qifeng Date: Fri, 10 Dec 2021 14:56:35 +1100 Subject: [PATCH] #622 fix(scipt and write to /all and /datasetId) --- .../src/main/java/au/org/ala/utils/ALAFsUtils.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/livingatlas/pipelines/src/main/java/au/org/ala/utils/ALAFsUtils.java b/livingatlas/pipelines/src/main/java/au/org/ala/utils/ALAFsUtils.java index fe3b8ab986..8885c9a449 100644 --- a/livingatlas/pipelines/src/main/java/au/org/ala/utils/ALAFsUtils.java +++ b/livingatlas/pipelines/src/main/java/au/org/ala/utils/ALAFsUtils.java @@ -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 @@ -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; }