You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "ZihanLi58 (via GitHub)" <gi...@apache.org> on 2023/04/11 18:34:01 UTC
[GitHub] [gobblin] ZihanLi58 opened a new pull request, #3672: [GOBBLIN-1810] Support general iceberg catalog in icebergMetadataWriter
ZihanLi58 opened a new pull request, #3672:
URL: https://github.com/apache/gobblin/pull/3672
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
### JIRA
- [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-1810
### Description
- [ ] Here are some details about my PR, including screenshots (if applicable):
Now icebergMetadataWriter only supports HiveCatalog, we want to support the general catalog.
Also, we want to add "avro.schema.literal" in iceberg table property
In addition, we need to be able to change the way we calculate the Kafka topic name
### Tests
- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
Mostly refractor the code and unit test
### Commits
- [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] ZihanLi58 merged pull request #3672: [GOBBLIN-1810] Support general iceberg catalog in icebergMetadataWriter
Posted by "ZihanLi58 (via GitHub)" <gi...@apache.org>.
ZihanLi58 merged PR #3672:
URL: https://github.com/apache/gobblin/pull/3672
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] ZihanLi58 commented on a diff in pull request #3672: [GOBBLIN-1810] Support general iceberg catalog in icebergMetadataWriter
Posted by "ZihanLi58 (via GitHub)" <gi...@apache.org>.
ZihanLi58 commented on code in PR #3672:
URL: https://github.com/apache/gobblin/pull/3672#discussion_r1164651755
##########
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java:
##########
@@ -801,12 +813,14 @@ public void flush(String dbName, String tableName) throws IOException {
Transaction transaction = tableMetadata.transaction.get();
Map<String, String> props = tableMetadata.newProperties.or(
Maps.newHashMap(tableMetadata.lastProperties.or(getIcebergTable(tid).properties())));
- String topic = props.get(TOPIC_NAME_KEY);
+ //Set data offset range
+ setDatasetOffsetRange(tableMetadata, props);
+ String topicName = getTopicName(tid, tableMetadata);
Review Comment:
We are still fallback to the previous topic name calculated from NativeName here in case datasetOffsetRange does not exist. Also GTE require this datasetName to set the HDFS dataset path information
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] vikrambohra commented on a diff in pull request #3672: [GOBBLIN-1810] Support general iceberg catalog in icebergMetadataWriter
Posted by "vikrambohra (via GitHub)" <gi...@apache.org>.
vikrambohra commented on code in PR #3672:
URL: https://github.com/apache/gobblin/pull/3672#discussion_r1164500993
##########
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java:
##########
@@ -801,12 +813,14 @@ public void flush(String dbName, String tableName) throws IOException {
Transaction transaction = tableMetadata.transaction.get();
Map<String, String> props = tableMetadata.newProperties.or(
Maps.newHashMap(tableMetadata.lastProperties.or(getIcebergTable(tid).properties())));
- String topic = props.get(TOPIC_NAME_KEY);
+ //Set data offset range
+ setDatasetOffsetRange(tableMetadata, props);
+ String topicName = getTopicName(tid, tableMetadata);
Review Comment:
Is tableMetadataMap.get(tid).setDatasetName(gmce.getDatasetIdentifier().getNativeName()); required after this change to a new way to get topic name?
##########
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java:
##########
@@ -780,6 +782,16 @@ private StructLike getIcebergPartitionVal(Collection<HiveSpec> specs, String fil
return partitionVal;
}
+ protected String getTopicName(TableIdentifier tid, TableMetadata tableMetadata) {
Review Comment:
Lets add Javadoc
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] vikrambohra commented on pull request #3672: [GOBBLIN-1810] Support general iceberg catalog in icebergMetadataWriter
Posted by "vikrambohra (via GitHub)" <gi...@apache.org>.
vikrambohra commented on PR #3672:
URL: https://github.com/apache/gobblin/pull/3672#issuecomment-1506344589
lgtm
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] codecov-commenter commented on pull request #3672: [GOBBLIN-1810] Support general iceberg catalog in icebergMetadataWriter
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3672:
URL: https://github.com/apache/gobblin/pull/3672#issuecomment-1503930499
## [Codecov](https://codecov.io/gh/apache/gobblin/pull/3672?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#3672](https://codecov.io/gh/apache/gobblin/pull/3672?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (952b366) into [master](https://codecov.io/gh/apache/gobblin/commit/0d69363abc776812a4f0352860a4125c7f28a508?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d69363) will **increase** coverage by `4.08%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #3672 +/- ##
============================================
+ Coverage 46.84% 50.93% +4.08%
+ Complexity 10751 7183 -3568
============================================
Files 2139 1346 -793
Lines 84032 50685 -33347
Branches 9335 5631 -3704
============================================
- Hits 39366 25814 -13552
+ Misses 41082 22603 -18479
+ Partials 3584 2268 -1316
```
[see 795 files with indirect coverage changes](https://codecov.io/gh/apache/gobblin/pull/3672/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org