Skip to content

Commit

Permalink
Make sure RcFileWriter closer registers all streams
Browse files Browse the repository at this point in the history
We have seen in production where writeRowGroup() throws an exception
that causes output streams fail to close.
  • Loading branch information
highker committed Aug 30, 2017
1 parent f938b29 commit b576052
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ public void close()
throws IOException
{
try (Closer closer = Closer.create()) {
writeRowGroup();
closer.register(output);
closer.register(keySectionOutput::destroy);
for (ColumnEncoder columnEncoder : columnEncoders) {
closer.register(columnEncoder::destroy);
}
writeRowGroup();
}
}

Expand Down

0 comments on commit b576052

Please sign in to comment.