[
https://issues.apache.org/jira/browse/GOBBLIN-1533?focusedWorklogId=648135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-648135
]
ASF GitHub Bot logged work on GOBBLIN-1533:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Sep/21 18:28
Start Date: 08/Sep/21 18:28
Worklog Time Spent: 10m
Work Description: vikrambohra commented on a change in pull request #3385:
URL: https://github.com/apache/gobblin/pull/3385#discussion_r704671972
##########
File path:
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -616,23 +689,75 @@ protected void addFiles(GobblinMetadataChangeEvent gmce,
Map<String, Collection<
/**
* Method to get dataFiles with metrics information
* This method is used to get files to be added to iceberg
+ * if completeness is enabled a new field (late) is added to table schema
and partition spec
+ * computed based on datepartition and completion watermark
* This method will call method {IcebergUtils.getIcebergDataFileWithMetric}
to get DataFile for specific file path
*/
- private Set<DataFile>
getIcebergDataFilesToBeAdded(List<org.apache.gobblin.metadata.DataFile> files,
+ private Set<DataFile> getIcebergDataFilesToBeAdded(Table table,
TableMetadata tableMetadata, GobblinMetadataChangeEvent gmce,
List<org.apache.gobblin.metadata.DataFile> files,
PartitionSpec partitionSpec, Map<String, Collection<HiveSpec>>
newSpecsMap, Map<Integer, Integer> schemaIdMap) {
Set<DataFile> dataFiles = new HashSet<>();
for (org.apache.gobblin.metadata.DataFile file : files) {
try {
- StructLike partition = getIcebergPartitionVal(newSpecsMap.get(new
Path(file.getFilePath()).getParent().toString()),
- file.getFilePath(), partitionSpec);
- dataFiles.add(IcebergUtils.getIcebergDataFileWithMetric(file,
partitionSpec, partition, conf, schemaIdMap));
+ Collection<HiveSpec> hiveSpecs = newSpecsMap.get(new
Path(file.getFilePath()).getParent().toString());
Review comment:
Agree with the assumptions here but this logic is only triggered when
completeness is enabled. Creating a new writer extending this writer will need
a bigger refactor which should probably be part of another PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 648135)
Time Spent: 2h 20m (was: 2h 10m)
> Add Completeness watermark to iceberg table
> -------------------------------------------
>
> Key: GOBBLIN-1533
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1533
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Vikram Bohra
> Priority: Major
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)