You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by GitBox <gi...@apache.org> on 2019/08/16 01:27:25 UTC

[GitHub] [metron] mmiklavc commented on a change in pull request #1483: METRON-2217 Migrate current HBase client from HTableInterface to Table

mmiklavc commented on a change in pull request #1483: METRON-2217 Migrate current HBase client from HTableInterface to Table
URL: https://github.com/apache/metron/pull/1483#discussion_r314555929
 
 

 ##########
 File path: metron-platform/metron-hbase/metron-hbase-common/src/test/java/org/apache/metron/hbase/client/HBaseClientTest.java
 ##########
 @@ -86,8 +85,14 @@ public static void startHBase() throws Exception {
     // create the table
     table = util.createTable(Bytes.toBytes(tableName), cf);
     util.waitTableEnabled(table.getName());
+    TableProvider provider = new TableProvider() {
+      @Override
+      public Table getTable(Configuration config, String tableName) throws IOException {
+        return table;
+      }
+    };
     // setup the client
-    client = new HBaseClient((c,t) -> table, table.getConfiguration(), tableName);
+    client = new HBaseClient(provider, table.getConfiguration(), tableName);
 
 Review comment:
   I need to revert this change - originally, I add Closeable to the TableProvider interface, which made lambdas unable to work as they currently do. I reverted that change, but haven't reverted the few lambda changes yet. This is partially contingent on how we land on the connection management logic, and whether it's reasonable to not explicitly close those connections.

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


With regards,
Apache Git Services