zhedoubushishi commented on a change in pull request #1175: [HUDI-495] Update 
deprecated HBase API
URL: https://github.com/apache/incubator-hudi/pull/1175#discussion_r363919247
 
 

 ##########
 File path: 
hudi-client/src/main/java/org/apache/hudi/index/hbase/HBaseIndex.java
 ##########
 @@ -287,13 +289,10 @@ private boolean checkIfValidCommit(HoodieTableMetaClient 
metaClient, String comm
           hbaseConnection = getHBaseConnection();
         }
       }
-      HTable hTable = null;
-      try {
-        hTable = (HTable) 
hbaseConnection.getTable(TableName.valueOf(tableName));
+      try (BufferedMutator mutator = 
hbaseConnection.getBufferedMutator(TableName.valueOf(tableName))) {
 
 Review comment:
   Yes I think so. 
   The HTable API doc shows:
   ```
   flushCommits()
   Deprecated. 
   as of 1.0.0. Replaced by BufferedMutator.flush()
   ```
   Also HTable is not threadsafe. 
(https://issues.apache.org/jira/browse/HBASE-17361)

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to