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 2019/06/10 15:27:27 UTC

[GitHub] [incubator-iceberg] aokolnychyi commented on a change in pull request #201: Add appendManifest to AppendFiles API.

aokolnychyi commented on a change in pull request #201: Add appendManifest to AppendFiles API.
URL: https://github.com/apache/incubator-iceberg/pull/201#discussion_r292060530
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/FastAppend.java
 ##########
 @@ -69,16 +74,35 @@ public FastAppend appendFile(DataFile file) {
     return this;
   }
 
+  @Override
+  public FastAppend appendManifest(ManifestFile manifest) {
+    // the manifest must be rewritten with this update's snapshot ID
+    try (ManifestReader reader = ManifestReader.read(
+        ops.io().newInputFile(manifest.path()), ops.current()::spec)) {
+      appendManifests.add(ManifestWriter.copyAppendManifest(
 
 Review comment:
   Nit: I would, probably, split this line and an equivalent one in `MergeAppend`. 
   
   ```
   OutputFile newManifestPath = manifestPath(manifestCount.getAndIncrement());
   appendManifests.add(ManifestWriter.copyAppendManifest(reader, newManifestPath, snapshotId(), summaryBuilder));
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org