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:04:12 GMT
Repository: cxf
Updated Branches:
  refs/heads/master d70027b90 -> ba48172e9


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/ba48172e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ba48172e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ba48172e

Branch: refs/heads/master
Commit: ba48172e94dbeea25d0bdac2639f1724b4776d50
Parents: d70027b
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:03:48 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/ba48172e/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