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/12/23 22:14:30 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #666: BaseRewriteManifests should keep different manifest for different partitionSpec

rdblue commented on a change in pull request #666: BaseRewriteManifests should keep different manifest for different partitionSpec
URL: https://github.com/apache/incubator-iceberg/pull/666#discussion_r361014309
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/BaseRewriteManifests.java
 ##########
 @@ -312,33 +311,62 @@ long getManifestTargetSizeBytes() {
   }
 
   class WriterWrapper {
-    private ManifestWriter writer;
-
-    synchronized void addEntry(ManifestEntry entry) {
-      if (writer == null) {
-        writer = newWriter();
-      } else if (writer.length() >= getManifestTargetSizeBytes()) {
-        close();
-        writer = newWriter();
+    private final Map<Integer, ManifestWriter> manifestWritersBySpecId = Collections.synchronizedMap(new HashMap<>());
 
 Review comment:
   We usually prefer Guava factory methods, like `Maps.newConcurrentMap()`.

----------------------------------------------------------------
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