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/01/04 19:31:12 UTC

[GitHub] [iceberg] dmgcodevil commented on a change in pull request #2001: iss1980 a special close flag added to indicate that the writer is closed

dmgcodevil commented on a change in pull request #2001:
URL: https://github.com/apache/iceberg/pull/2001#discussion_r551521695



##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetWriter.java
##########
@@ -192,5 +203,6 @@ public void close() throws IOException {
     flushRowGroup(true);
     writeStore.close();
     writer.end(metadata);
+    this.closed = true;

Review comment:
       I'd also add :
   
   ```java
   else {
     throw new IllegalStateException("writer is closed");
   }
   ```
   
   but note sure if it aligns with Iceberg's coding style 




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



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