HBASE-14228 Close BufferedMutator and connection in MultiTableOutputFormat

This commit is contained in:
Jerry He 2015-08-18 13:44:41 -07:00
parent 68113abec5
commit 3fa86a98a0
1 changed files with 2 additions and 2 deletions

View File

@ -119,9 +119,9 @@ public class MultiTableOutputFormat extends OutputFormat<ImmutableBytesWritable,
@Override
public void close(TaskAttemptContext context) throws IOException {
for (BufferedMutator mutator : mutatorMap.values()) {
mutator.flush();
mutator.close();
}
if(connection != null){
if (connection != null) {
connection.close();
}
}