hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-19273 IntegrationTestBulkLoad#installSlowingCoproc() uses read-only HTableDescriptor
Date Fri, 17 Nov 2017 05:04:40 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 52273aa8f -> e6e731cb8


HBASE-19273 IntegrationTestBulkLoad#installSlowingCoproc() uses read-only HTableDescriptor


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

Branch: refs/heads/master
Commit: e6e731cb861b6c2412ce06ee87a128998a502d66
Parents: 52273aa
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Nov 16 21:04:33 2017 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu Nov 16 21:04:33 2017 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e6e731cb/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
index 3881097..3fa1054 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
@@ -43,7 +43,6 @@ import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.ClusterStatus.Option;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.IntegrationTestBase;
 import org.apache.hadoop.hbase.IntegrationTestingUtility;
 import org.apache.hadoop.hbase.KeyValue;
@@ -56,6 +55,8 @@ import org.apache.hadoop.hbase.client.RegionLocator;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
 import org.apache.hadoop.hbase.coprocessor.ObserverContext;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
@@ -211,9 +212,10 @@ public class IntegrationTestBulkLoad extends IntegrationTestBase {
 
     TableName t = getTablename();
     Admin admin = util.getAdmin();
-    HTableDescriptor desc = admin.getTableDescriptor(t);
-    desc.addCoprocessor(SlowMeCoproScanOperations.class.getName());
-    HBaseTestingUtility.modifyTableSync(admin, desc);
+    TableDescriptor desc = admin.getDescriptor(t);
+    TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(desc);
+    builder.addCoprocessor(SlowMeCoproScanOperations.class.getName());
+    HBaseTestingUtility.modifyTableSync(admin, builder.build());
   }
 
   @Test


Mime
View raw message