[
https://issues.apache.org/jira/browse/GOBBLIN-1994?focusedWorklogId=902443&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-902443
]
ASF GitHub Bot logged work on GOBBLIN-1994:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/Jan/24 00:05
Start Date: 30/Jan/24 00:05
Worklog Time Spent: 10m
Work Description: arjun4084346 commented on code in PR #3870:
URL: https://github.com/apache/gobblin/pull/3870#discussion_r1470392429
##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergDataset.java:
##########
@@ -188,11 +215,19 @@ protected Map<Path, FileStatus>
getFilePathsToFileStatus(FileSystem targetFs, Co
this.getFileSetId(), currentSnapshotOverview.getSnapshotId(),
currentSnapshotOverview.getManifestListPath(),
currentSnapshotOverview.getMetadataPath().orElse("<<ERROR:
MISSING!>>"));
- return Maps.newHashMap();
+ TableMetadata readTimeTableMetadata =
currentSnapshotOverview.getTableMetadata().orElseThrow(() -> new
RuntimeException(
+ String.format("~%s~ no table metadata for current snapshot '%s' at
'%s' with metadata path '%s'",
+ this.getFileSetId(), currentSnapshotOverview.getSnapshotId(),
+ currentSnapshotOverview.getManifestListPath(),
+ currentSnapshotOverview.getMetadataPath().orElse("<<ERROR:
MISSING!>>"))));
+ return new GetFilePathsToFileStatusResult(Maps.newHashMap(),
readTimeTableMetadata);
}
+
+ List<TableMetadata> readTimeTableMetadataHolder = Lists.newArrayList(); //
expecting exactly one elem
Review Comment:
You can filter out absents and count the size -f filePathsIterator in place
of doing `eadTimeTableMetadataHolder.size()` later
##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergDataset.java:
##########
@@ -188,11 +215,19 @@ protected Map<Path, FileStatus>
getFilePathsToFileStatus(FileSystem targetFs, Co
this.getFileSetId(), currentSnapshotOverview.getSnapshotId(),
currentSnapshotOverview.getManifestListPath(),
currentSnapshotOverview.getMetadataPath().orElse("<<ERROR:
MISSING!>>"));
- return Maps.newHashMap();
+ TableMetadata readTimeTableMetadata =
currentSnapshotOverview.getTableMetadata().orElseThrow(() -> new
RuntimeException(
+ String.format("~%s~ no table metadata for current snapshot '%s' at
'%s' with metadata path '%s'",
+ this.getFileSetId(), currentSnapshotOverview.getSnapshotId(),
+ currentSnapshotOverview.getManifestListPath(),
+ currentSnapshotOverview.getMetadataPath().orElse("<<ERROR:
MISSING!>>"))));
+ return new GetFilePathsToFileStatusResult(Maps.newHashMap(),
readTimeTableMetadata);
}
+
+ List<TableMetadata> readTimeTableMetadataHolder = Lists.newArrayList(); //
expecting exactly one elem
Review Comment:
You can filter out absents and count the size -f filePathsIterator in place
of doing `readTimeTableMetadataHolder.size()` later
Issue Time Tracking
-------------------
Worklog Id: (was: 902443)
Time Spent: 0.5h (was: 20m)
> Ensure iceberg-distcp replication consistency
> ---------------------------------------------
>
> Key: GOBBLIN-1994
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1994
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-core
> Reporter: Kip Kohn
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Ensure iceberg-distcp consistency by using same `TableMetadata` for both WU
> planning and final commit
--
This message was sent by Atlassian Jira
(v8.20.10#820010)