From 56d28bb12fd0fa9d51c87874807e99ccac151ec4 Mon Sep 17 00:00:00 2001 From: octopus <912554887@qq.com> Date: Mon, 2 Sep 2024 16:23:12 +0800 Subject: [PATCH] modify dataset status --- .../dataset/common/DatasetStatus.java | 20 +++++++++++-------- .../dataset/service/DatasetServiceImpl.java | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/common/DatasetStatus.java b/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/common/DatasetStatus.java index 5304f208..f12c8779 100644 --- a/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/common/DatasetStatus.java +++ b/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/common/DatasetStatus.java @@ -7,14 +7,18 @@ @Getter public enum DatasetStatus { Success(0, "Success"), - Failure(-1, "Failure"), - Fatal(-2, "Fatal"), - InitialState(1, "InitialState"), - WaitingForUploadData(2, "WaitingForUploadData"), - WaitingForLoadDBData(3, "WaitingForLoadDBData"), - DataUploading(4, "DataUploading"), - DataAnalyzing(5, "DataAnalyzing"), - UploadingDataToStorage(6, "UploadingDataToStorage"); + Failure(-1, "Failure"), // dataset is in failure and can be processed by retrying + Fatal(-2, "Fatal"), // dataset is in failure and can not be processed by retrying + Created(1, "Created"), // dataset is created and waiting for data source processing + DataAnalyzing(2, "DataAnalyzing"), // data analyzing + DataUploading(3, "UploadingDataToStorage"), // upload data to storage + UpdateDatasetMetaState( + 4, + "UpdateDatasetMetaState"), // update dataset meta info, ie: dataset,column num,data hash + UploadingChunkData(5, "UploadingChunkData"), // chunk data is being uploaded + LoadingDBData(6, "LoadingDBData"), // upload database data + LoadingExcelData(7, "LoadingExcelData"), // loading excel data + MergingChunkData(8, "MergingChunkData"); // merge chunk data private final Integer code; private final String message; diff --git a/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/service/DatasetServiceImpl.java b/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/service/DatasetServiceImpl.java index b3f54f6b..17fabb48 100644 --- a/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/service/DatasetServiceImpl.java +++ b/wedpr-components/dataset/src/main/java/com/webank/wedpr/components/dataset/service/DatasetServiceImpl.java @@ -128,8 +128,8 @@ public Dataset constructDataset( dataset.setStatus(DatasetStatus.Success.getCode()); dataset.setStatusDesc(DatasetStatus.Success.getMessage()); } else { - dataset.setStatus(DatasetStatus.InitialState.getCode()); - dataset.setStatusDesc(DatasetStatus.InitialState.getMessage()); + dataset.setStatus(DatasetStatus.Created.getCode()); + dataset.setStatusDesc(DatasetStatus.Created.getMessage()); } return dataset;