hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [15/47] hbase git commit: HBASE-18433 Convenience method for creating simple ColumnFamilyDescriptor
Date Sat, 29 Jul 2017 23:51:53 GMT
HBASE-18433 Convenience method for creating simple ColumnFamilyDescriptor

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>


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

Branch: refs/heads/HBASE-18426
Commit: 317ce739631495c056a8f82f580c46ccdab3f937
Parents: ec3cb19
Author: Mike Drob <mdrob@apache.org>
Authored: Fri Jul 21 23:05:21 2017 -0500
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Sat Jul 22 23:42:33 2017 +0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/HColumnDescriptor.java  |  3 ++
 .../hbase/client/ColumnFamilyDescriptor.java    |  2 ++
 .../client/ColumnFamilyDescriptorBuilder.java   |  8 +++++
 .../TestColumnFamilyDescriptorBuilder.java      |  2 +-
 .../hadoop/hbase/util/RegionSplitter.java       |  2 +-
 .../hadoop/hbase/client/TestAsyncAdminBase.java |  2 +-
 .../hbase/client/TestAsyncClusterAdminApi.java  |  2 +-
 .../hbase/client/TestAsyncDrainAdminApi.java    |  2 +-
 .../hbase/client/TestAsyncRegionAdminApi.java   |  2 +-
 .../hbase/client/TestAsyncTableAdminApi.java    | 35 ++++++++++----------
 .../hbase/client/TestReplicaWithCluster.java    |  4 +--
 .../hbase/client/TestResultFromCoprocessor.java |  2 +-
 .../master/cleaner/TestSnapshotFromMaster.java  |  2 +-
 13 files changed, 40 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
index fb0b0ee..6764975 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
@@ -104,6 +104,7 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
    *
    * @param familyName Column family name. Must be 'printable' -- digit or
    * letter -- and may not contain a <code>:</code>
+   * @deprecated use {@link ColumnFamilyDescriptorBuilder#of(String)}
    */
   public HColumnDescriptor(final String familyName) {
     this(Bytes.toBytes(familyName));
@@ -115,6 +116,7 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
    *
    * @param familyName Column family name. Must be 'printable' -- digit or
    * letter -- and may not contain a <code>:</code>
+   * @deprecated use {@link ColumnFamilyDescriptorBuilder#of(byte[])}
    */
   public HColumnDescriptor(final byte [] familyName) {
     this(new ModifyableColumnFamilyDescriptor(familyName));
@@ -125,6 +127,7 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
    * Makes a deep copy of the supplied descriptor.
    * Can make a modifiable descriptor from an UnmodifyableHColumnDescriptor.
    * @param desc The descriptor.
+   * @deprecated use {@link ColumnFamilyDescriptorBuilder#copy(ColumnFamilyDescriptor)}
    */
   public HColumnDescriptor(HColumnDescriptor desc) {
     this(desc, true);

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.java
index 6893249..507de93 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.java
@@ -32,6 +32,8 @@ import org.apache.hadoop.hbase.util.Bytes;
  * number of versions, compression settings, etc.
  *
  * It is used as input when creating a table or adding a column.
+ *
+ * To construct a new instance, use the {@link ColumnFamilyDescriptorBuilder} methods
  */
 @InterfaceAudience.Public
 public interface ColumnFamilyDescriptor {

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java
index c456789..613faa9 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java
@@ -376,6 +376,14 @@ public class ColumnFamilyDescriptorBuilder {
     return new ModifyableColumnFamilyDescriptor(desc);
   }
 
+  public static ColumnFamilyDescriptor of(String name) {
+    return of(Bytes.toBytes(name));
+  }
+
+  public static ColumnFamilyDescriptor of(byte[] name) {
+    return newBuilder(name).build();
+  }
+
   private ColumnFamilyDescriptorBuilder(final byte[] name) {
     this.desc = new ModifyableColumnFamilyDescriptor(name);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestColumnFamilyDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestColumnFamilyDescriptorBuilder.java
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestColumnFamilyDescriptorBuilder.java
index 5fe329d..671cb14 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestColumnFamilyDescriptorBuilder.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestColumnFamilyDescriptorBuilder.java
@@ -92,7 +92,7 @@ public class TestColumnFamilyDescriptorBuilder {
   public void testHColumnDescriptorShouldThrowIAEWhenFamiliyNameEmpty()
       throws Exception {
     try {
-      ColumnFamilyDescriptorBuilder.newBuilder("".getBytes()).build();
+      ColumnFamilyDescriptorBuilder.of("");
     } catch (IllegalArgumentException e) {
       assertEquals("Column Family name can not be empty", e.getLocalizedMessage());
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java
index d61c9a5..d487eb0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java
@@ -382,7 +382,7 @@ public class RegionSplitter {
 
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
     for (String cf : columnFamilies) {
-      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(cf)).build());
+      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(cf));
     }
     try (Connection connection = ConnectionFactory.createConnection(conf)) {
       Admin admin = connection.getAdmin();

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminBase.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminBase.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminBase.java
index 52d2946..c3c4045 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminBase.java
@@ -133,7 +133,7 @@ public abstract class TestAsyncAdminBase {
       byte[]... families) {
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
     for (byte[] family : families) {
-      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(family).build());
+      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(family));
     }
     admin.createTable(builder.build(), splitKeys).join();
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncClusterAdminApi.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncClusterAdminApi.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncClusterAdminApi.java
index 3d3f049..1a0ceed 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncClusterAdminApi.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncClusterAdminApi.java
@@ -284,7 +284,7 @@ public class TestAsyncClusterAdminApi extends TestAsyncAdminBase {
   private void createAndLoadTable(TableName[] tables) {
     for (TableName table : tables) {
       TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(table);
-      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build());
+      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
       admin.createTable(builder.build(), Bytes.toBytes("aaaaa"), Bytes.toBytes("zzzzz"),
16).join();
       RawAsyncTable asyncTable = ASYNC_CONN.getRawTable(table);
       List<Put> puts = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDrainAdminApi.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDrainAdminApi.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDrainAdminApi.java
index 88bda10..c31775e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDrainAdminApi.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDrainAdminApi.java
@@ -66,7 +66,7 @@ public class TestAsyncDrainAdminApi extends TestAsyncAdminBase {
 
     // Try for 20 seconds to create table (new region). Will not complete because all RSs
draining.
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
     final Runnable createTable = new Thread() {
       @Override
       public void run() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
index 51e8816..5ec9ed8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
@@ -188,7 +188,7 @@ public class TestAsyncRegionAdminApi extends TestAsyncAdminBase {
       throws IOException, InterruptedException, ExecutionException {
     TableDescriptor desc =
         TableDescriptorBuilder.newBuilder(tableName)
-            .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build()).build();
+            .addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY)).build();
     admin.createTable(desc, Bytes.toBytes("A"), Bytes.toBytes("Z"), 5).get();
 
     // wait till the table is assigned

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java
index f2db244..e6fc2f3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java
@@ -133,7 +133,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
     byte[][] families = { FAMILY, FAMILY_0, FAMILY_1 };
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
     for (byte[] family : families) {
-      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(family).build());
+      builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(family));
     }
     TableDescriptor desc = builder.build();
     admin.createTable(desc).join();
@@ -178,7 +178,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
 
     final TableName tableName3 = TableName.valueOf(tableName.getNameAsString() + "_3");
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName3);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
     admin.createTable(builder.build(), "a".getBytes(), "z".getBytes(), 3).join();
     regionLocations =
         AsyncMetaTableAccessor.getTableHRegionLocations(metaTable, Optional.of(tableName3)).get();
@@ -186,7 +186,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
 
     final TableName tableName4 = TableName.valueOf(tableName.getNameAsString() + "_4");
     builder = TableDescriptorBuilder.newBuilder(tableName4);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
     try {
       admin.createTable(builder.build(), "a".getBytes(), "z".getBytes(), 2).join();
       fail("Should not be able to create a table with only 2 regions using this API.");
@@ -196,7 +196,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
 
     final TableName tableName5 = TableName.valueOf(tableName.getNameAsString() + "_5");
     builder = TableDescriptorBuilder.newBuilder(tableName5);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
     admin.createTable(builder.build(), new byte[] { 1 }, new byte[] { 127 }, 16).join();
     regionLocations =
         AsyncMetaTableAccessor.getTableHRegionLocations(metaTable, Optional.of(tableName5)).get();
@@ -269,7 +269,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
     expectedRegions = 10;
     final TableName tableName2 = TableName.valueOf(tableName.getNameAsString() + "_2");
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName2);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
     admin.createTable(builder.build(), startKey, endKey, expectedRegions).join();
 
     regions =
@@ -319,7 +319,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
     expectedRegions = 5;
     final TableName tableName3 = TableName.valueOf(tableName.getNameAsString() + "_3");
     builder = TableDescriptorBuilder.newBuilder(tableName3);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
     admin.createTable(builder.build(), startKey, endKey, expectedRegions).join();
 
     regions =
@@ -614,14 +614,14 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
   public void testAddColumnFamily() throws Exception {
     // Create a table with two families
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_0).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY_0));
     admin.createTable(builder.build()).join();
     admin.disableTable(tableName).join();
     // Verify the table descriptor
     verifyTableDescriptor(tableName, FAMILY_0);
 
     // Modify the table removing one family and verify the descriptor
-    admin.addColumnFamily(tableName, ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_1).build())
+    admin.addColumnFamily(tableName, ColumnFamilyDescriptorBuilder.of(FAMILY_1))
         .join();
     verifyTableDescriptor(tableName, FAMILY_0, FAMILY_1);
   }
@@ -630,21 +630,20 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
   public void testAddSameColumnFamilyTwice() throws Exception {
     // Create a table with one families
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_0).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY_0));
     admin.createTable(builder.build()).join();
     admin.disableTable(tableName).join();
     // Verify the table descriptor
     verifyTableDescriptor(tableName, FAMILY_0);
 
     // Modify the table removing one family and verify the descriptor
-    admin.addColumnFamily(tableName, ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_1).build())
-        .join();
+    admin.addColumnFamily(tableName, ColumnFamilyDescriptorBuilder.of(FAMILY_1)).join();
     verifyTableDescriptor(tableName, FAMILY_0, FAMILY_1);
 
     try {
       // Add same column family again - expect failure
       this.admin.addColumnFamily(tableName,
-        ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_1).build()).join();
+        ColumnFamilyDescriptorBuilder.of(FAMILY_1)).join();
       Assert.fail("Delete a non-exist column family should fail");
     } catch (Exception e) {
       // Expected.
@@ -654,7 +653,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
   @Test
   public void testModifyColumnFamily() throws Exception {
     TableDescriptorBuilder tdBuilder = TableDescriptorBuilder.newBuilder(tableName);
-    ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_0).build();
+    ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.of(FAMILY_0);
     int blockSize = cfd.getBlocksize();
     admin.createTable(tdBuilder.addColumnFamily(cfd).build()).join();
     admin.disableTable(tableName).join();
@@ -674,7 +673,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
   @Test
   public void testModifyNonExistingColumnFamily() throws Exception {
     TableDescriptorBuilder tdBuilder = TableDescriptorBuilder.newBuilder(tableName);
-    ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_0).build();
+    ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.of(FAMILY_0);
     int blockSize = cfd.getBlocksize();
     admin.createTable(tdBuilder.addColumnFamily(cfd).build()).join();
     admin.disableTable(tableName).join();
@@ -697,8 +696,8 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
   public void testDeleteColumnFamily() throws Exception {
     // Create a table with two families
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_0).build())
-        .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_1).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY_0))
+        .addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY_1));
     admin.createTable(builder.build()).join();
     admin.disableTable(tableName).join();
     // Verify the table descriptor
@@ -713,8 +712,8 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
   public void testDeleteSameColumnFamilyTwice() throws Exception {
     // Create a table with two families
     TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
-    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_0).build())
-        .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_1).build());
+    builder.addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY_0))
+        .addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY_1));
     admin.createTable(builder.build()).join();
     admin.disableTable(tableName).join();
     // Verify the table descriptor

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
index 898f629..c2c6d28 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
@@ -305,7 +305,7 @@ public class TestReplicaWithCluster {
     TableDescriptor td = TableDescriptorBuilder.newBuilder(TableName.valueOf("testChangeTable"))
             .setRegionReplication(NB_SERVERS)
             .addCoprocessor(SlowMeCopro.class.getName())
-            .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(f).build())
+            .addColumnFamily(ColumnFamilyDescriptorBuilder.of(f))
             .build();
     HTU.getAdmin().createTable(td);
     Table table = HTU.getConnection().getTable(td.getTableName());
@@ -321,7 +321,7 @@ public class TestReplicaWithCluster {
     // Add a CF, it should work.
     TableDescriptor bHdt = HTU.getAdmin().listTableDescriptor(td.getTableName());
     td = TableDescriptorBuilder.newBuilder(td)
-            .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(row).build())
+            .addColumnFamily(ColumnFamilyDescriptorBuilder.of(row))
             .build();
     HTU.getAdmin().disableTable(td.getTableName());
     HTU.getAdmin().modifyTable(td);

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
index ebbf47a..4425fb2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResultFromCoprocessor.java
@@ -56,7 +56,7 @@ public class TestResultFromCoprocessor {
     TEST_UTIL.startMiniCluster(3);
     TableDescriptor desc = TableDescriptorBuilder.newBuilder(TABLE_NAME)
             .addCoprocessor(MyObserver.class.getName())
-            .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build())
+            .addColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY))
             .build();
     TEST_UTIL.getAdmin().createTable(desc);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/317ce739/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
index 7118ab7..5179404 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
@@ -284,7 +284,7 @@ public class TestSnapshotFromMaster {
     // snapshot, the call after snapshot will be a no-op and checks will fail
     UTIL.deleteTable(TABLE_NAME);
     TableDescriptor td = TableDescriptorBuilder.newBuilder(TABLE_NAME)
-            .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(TEST_FAM).build())
+            .addColumnFamily(ColumnFamilyDescriptorBuilder.of(TEST_FAM))
             .setCompactionEnabled(false)
             .build();
     UTIL.getAdmin().createTable(td);


Mime
View raw message