You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/10/25 16:53:56 UTC
[GitHub] [iceberg] szehon-ho commented on a change in pull request #3365: Flink: Fix the flaky test TestFlinkSink#testHashDistributeMode
szehon-ho commented on a change in pull request #3365:
URL: https://github.com/apache/iceberg/pull/3365#discussion_r735788226
##########
File path: flink/src/test/java/org/apache/iceberg/flink/SimpleDataUtil.java
##########
@@ -267,17 +268,28 @@ public static StructLikeSet actualRowSet(Table table, Long snapshotId, String...
public static Map<Long, List<DataFile>> snapshotToDataFiles(Table table) throws IOException {
table.refresh();
+
Map<Long, List<DataFile>> result = Maps.newHashMap();
- List<ManifestFile> manifestFiles = table.currentSnapshot().dataManifests();
- for (ManifestFile manifestFile : manifestFiles) {
- try (ManifestReader<DataFile> reader = ManifestFiles.read(manifestFile, table.io())) {
- List<DataFile> dataFiles = Lists.newArrayList(reader);
- if (result.containsKey(manifestFile.snapshotId())) {
- result.get(manifestFile.snapshotId()).addAll(dataFiles);
- } else {
- result.put(manifestFile.snapshotId(), dataFiles);
- }
+ Snapshot current = table.currentSnapshot();
Review comment:
I think here ManifestEntry interface and methods are package-protected, hence they can't be used outside (As I mentioned over at the other thread, also looking to fix the original code).
And so was wondering, whether the interface can be exposed as public? I was sure the original reason why it was kept package protected, as "Entries" metadata table is already publically exposed via Spark to users, and it's already pubically documented on the spec.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org