Skip to content

Commit

Permalink
[feat][hbase] 任务结束时将数据写出
Browse files Browse the repository at this point in the history
  • Loading branch information
FlechazoW committed Dec 16, 2020
1 parent fea8a43 commit 3d91393
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,8 @@ private Map<String, Object> rowConvertMap(Row record) {

@Override
public void close() throws IOException {
if (conn != null) {
conn.close();
conn = null;
if (!records.isEmpty()) {
dealBatchOperation(records);
}

if (scheduledFuture != null) {
Expand All @@ -311,6 +310,12 @@ public void close() throws IOException {
executor.shutdownNow();
}
}

if (conn != null) {
conn.close();
conn = null;
}

}

private HbaseOutputFormat() {
Expand Down

0 comments on commit 3d91393

Please sign in to comment.