cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Better HBase client test code
Date Tue, 18 Nov 2014 15:05:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes ec760bb51 -> c1c40ba6b


Better HBase client test code


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c1c40ba6
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c1c40ba6
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c1c40ba6

Branch: refs/heads/3.0.x-fixes
Commit: c1c40ba6b58f204954bfb27efb86f8e34b5c21b8
Parents: ec760bb
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Nov 18 16:03:48 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Nov 18 16:05:19 2014 +0100

----------------------------------------------------------------------
 .../apache/cxf/jaxrs/ext/search/hbase/HBaseVisitorTest.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c1c40ba6/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseVisitorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseVisitorTest.java
b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseVisitorTest.java
index 0fc7855..c0c07ee 100644
--- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseVisitorTest.java
+++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseVisitorTest.java
@@ -23,7 +23,9 @@ import org.apache.cxf.jaxrs.ext.search.SearchCondition;
 import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.client.HTable;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.client.Scan;
@@ -41,12 +43,12 @@ public class HBaseVisitorTest extends Assert {
     public static final byte[] NAME_QUALIFIER = "name".getBytes();
     
     Table table;
-    @SuppressWarnings("deprecation")
     @Before
     public void setUp() throws Exception {
         try {
             Configuration hBaseConfig =  HBaseConfiguration.create();
-            table = new HTable(hBaseConfig, "books");
+            Connection connection = ConnectionFactory.createConnection(hBaseConfig);
+            table = connection.getTable(TableName.valueOf("books"));
         } catch (Throwable t) {
             t.printStackTrace();
         }


Mime
View raw message