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:
[email protected]


With regards,
Apache Git Services

Reply via email to