Skip to content

Commit 2acc624

Browse files
authored
fix FileMeta (#160)
1 parent ec03659 commit 2acc624

File tree

2 files changed

+5
-1
lines changed
  • wedpr-components
    • db-mapper/dataset/src/main/java/com/webank/wedpr/components/db/mapper/dataset/dao
    • scheduler/src/main/java/com/webank/wedpr/components/scheduler/executor/impl/model

2 files changed

+5
-1
lines changed

wedpr-components/db-mapper/dataset/src/main/java/com/webank/wedpr/components/db/mapper/dataset/dao/Dataset.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
@Data
2323
public class Dataset {
2424
private static final Logger logger = LoggerFactory.getLogger(Dataset.class);
25+
// Note: should chang with the DatasetMapper at the same time
2526
public static final Integer INVALID_DATASET_STATUS = -100000;
2627

2728
@Data

wedpr-components/scheduler/src/main/java/com/webank/wedpr/components/scheduler/executor/impl/model/FileMeta.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Integer getType() {
5959
protected String path;
6060
protected String owner;
6161
protected String ownerAgency;
62-
protected long datasetRecordCount = 0;
62+
protected Integer datasetRecordCount = 0;
6363

6464
public FileMeta() {}
6565

@@ -75,6 +75,9 @@ public void obtainDatasetInfo(DatasetMapper datasetMapper) throws Exception {
7575
throw new WeDPRException("Invalid fileMeta, must define the datasetID");
7676
}
7777
this.dataset = datasetMapper.getDatasetByDatasetId(this.datasetID, false);
78+
if (this.dataset == null) {
79+
throw new WeDPRException("No dataset " + this.datasetID + " found!");
80+
}
7881
// set the information
7982
setStorageTypeStr(this.dataset.getDatasetStorageType());
8083
setPath(this.dataset.getStoragePathMeta().getFilePath());

0 commit comments

Comments
 (0)