hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject [18/50] [abbrv] hbase git commit: HBASE-1989 Admin (et al.) not accurate with Column vs. Column-Family usage
Date Wed, 20 May 2015 15:25:31 GMT
HBASE-1989 Admin (et al.) not accurate with Column vs. Column-Family
usage

Fix check style issues & rename parameter

Incorporate comments

Signed-off-by: stack <stack@apache.org>


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

Branch: refs/heads/hbase-11339
Commit: ec51d7b2e600fab2c3490e794dd13e27ec1cee01
Parents: b03ff8c
Author: Lars Francke <lars.francke@gmail.com>
Authored: Fri May 1 00:57:56 2015 +0200
Committer: stack <stack@apache.org>
Committed: Mon May 11 09:46:28 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/client/Admin.java   |  64 +++++++--
 .../apache/hadoop/hbase/client/HBaseAdmin.java  | 144 +++++++++++++------
 .../IntegrationTestIngestWithEncryption.java    |   2 +-
 .../hadoop/hbase/rest/SchemaResource.java       |   4 +-
 .../hadoop/hbase/backup/TestHFileArchiving.java |   2 +-
 .../apache/hadoop/hbase/client/TestAdmin1.java  |  20 +--
 .../client/TestRestoreSnapshotFromClient.java   |   2 +-
 .../client/TestSnapshotCloneIndependence.java   |   2 +-
 .../hbase/client/TestSnapshotMetadata.java      |   2 +-
 .../hbase/coprocessor/TestMasterObserver.java   |  10 +-
 .../hbase/io/encoding/TestChangingEncoding.java |   2 +-
 .../encoding/TestLoadAndSwitchEncodeOnDisk.java |   2 +-
 .../hbase/master/TestTableLockManager.java      |   2 +-
 .../handler/TestTableDeleteFamilyHandler.java   |   6 +-
 .../TestTableDescriptorModification.java        |  16 +--
 .../regionserver/TestEncryptionKeyRotation.java |   2 +-
 .../visibility/TestVisibilityLabels.java        |   6 +-
 .../apache/hadoop/hbase/util/LoadTestTool.java  |   4 +-
 18 files changed, 200 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index 116a369..b20568e 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -489,34 +489,80 @@ public interface Admin extends Abortable, Closeable {
   Pair<Integer, Integer> getAlterStatus(final byte[] tableName) throws IOException;
 
   /**
-   * Add a column to an existing table. Asynchronous operation.
+   * Add a column family to an existing table. Asynchronous operation.
    *
-   * @param tableName name of the table to add column to
-   * @param column column descriptor of column to be added
+   * @param tableName name of the table to add column family to
+   * @param columnFamily column family descriptor of column family to be added
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #addColumnFamily(TableName, HColumnDescriptor)}.
    */
-  void addColumn(final TableName tableName, final HColumnDescriptor column) throws IOException;
+  @Deprecated
+  void addColumn(final TableName tableName, final HColumnDescriptor columnFamily)
+    throws IOException;
+
+  /**
+   * Add a column family to an existing table. Asynchronous operation.
+   *
+   * @param tableName name of the table to add column family to
+   * @param columnFamily column family descriptor of column family to be added
+   * @throws IOException if a remote or network exception occurs
+   */
+  void addColumnFamily(final TableName tableName, final HColumnDescriptor columnFamily)
+    throws IOException;
+
+  /**
+   * Delete a column family from a table. Asynchronous operation.
+   *
+   * @param tableName name of table
+   * @param columnFamily name of column family to be deleted
+   * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #deleteColumnFamily(TableName, byte[])}}.
+   */
+  @Deprecated
+  void deleteColumn(final TableName tableName, final byte[] columnFamily) throws IOException;
 
   /**
-   * Delete a column from a table. Asynchronous operation.
+   * Delete a column family from a table. Asynchronous operation.
    *
    * @param tableName name of table
-   * @param columnName name of column to be deleted
+   * @param columnFamily name of column family to be deleted
    * @throws IOException if a remote or network exception occurs
    */
-  void deleteColumn(final TableName tableName, final byte[] columnName) throws IOException;
+  void deleteColumnFamily(final TableName tableName, final byte[] columnFamily) throws IOException;
 
   /**
    * Modify an existing column family on a table. Asynchronous operation.
    *
    * @param tableName name of table
-   * @param descriptor new column descriptor to use
+   * @param columnFamily new column family descriptor to use
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #modifyColumnFamily(TableName, HColumnDescriptor)}.
    */
-  void modifyColumn(final TableName tableName, final HColumnDescriptor descriptor)
+  @Deprecated
+  void modifyColumn(final TableName tableName, final HColumnDescriptor columnFamily)
       throws IOException;
 
   /**
+   * Modify an existing column family on a table. Asynchronous operation.
+   *
+   * @param tableName name of table
+   * @param columnFamily new column family descriptor to use
+   * @throws IOException if a remote or network exception occurs
+   */
+  void modifyColumnFamily(final TableName tableName, final HColumnDescriptor columnFamily)
+      throws IOException;
+
+
+  /**
    * Close a region. For expert-admins.  Runs close on the regionserver.  The master will
not be
    * informed of the close.
    *

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index 28df05c..c0de45b 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -1349,95 +1349,137 @@ public class HBaseAdmin implements Admin {
   }
 
   /**
-   * Add a column to an existing table.
+   * Add a column family to an existing table.
    * Asynchronous operation.
    *
-   * @param tableName name of the table to add column to
-   * @param column column descriptor of column to be added
+   * @param tableName name of the table to add column family to
+   * @param columnFamily column family descriptor of column family to be added
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #addColumnFamily(TableName, HColumnDescriptor)}.
    */
-  public void addColumn(final byte[] tableName, HColumnDescriptor column)
+  @Deprecated
+  public void addColumn(final byte[] tableName, HColumnDescriptor columnFamily)
   throws IOException {
-    addColumn(TableName.valueOf(tableName), column);
+    addColumnFamily(TableName.valueOf(tableName), columnFamily);
   }
 
-
   /**
-   * Add a column to an existing table.
+   * Add a column family to an existing table.
    * Asynchronous operation.
    *
-   * @param tableName name of the table to add column to
-   * @param column column descriptor of column to be added
+   * @param tableName name of the table to add column family to
+   * @param columnFamily column family descriptor of column family to be added
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #addColumnFamily(TableName, HColumnDescriptor)}.
    */
-  public void addColumn(final String tableName, HColumnDescriptor column)
+  @Deprecated
+  public void addColumn(final String tableName, HColumnDescriptor columnFamily)
   throws IOException {
-    addColumn(TableName.valueOf(tableName), column);
+    addColumnFamily(TableName.valueOf(tableName), columnFamily);
   }
 
   /**
-   * Add a column to an existing table.
+   * Add a column family to an existing table.
    * Asynchronous operation.
    *
-   * @param tableName name of the table to add column to
-   * @param column column descriptor of column to be added
+   * @param tableName name of the table to add column family to
+   * @param columnFamily column family descriptor of column family to be added
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #addColumnFamily(TableName, HColumnDescriptor)}.
    */
   @Override
-  public void addColumn(final TableName tableName, final HColumnDescriptor column)
+  @Deprecated
+  public void addColumn(final TableName tableName, final HColumnDescriptor columnFamily)
+  throws IOException {
+    addColumnFamily(tableName, columnFamily);
+  }
+
+  @Override
+  public void addColumnFamily(final TableName tableName, final HColumnDescriptor columnFamily)
   throws IOException {
     executeCallable(new MasterCallable<Void>(getConnection()) {
       @Override
       public Void call(int callTimeout) throws ServiceException {
-        AddColumnRequest req = RequestConverter.buildAddColumnRequest(tableName, column);
-        master.addColumn(null,req);
+        AddColumnRequest req = RequestConverter.buildAddColumnRequest(tableName, columnFamily);
+        master.addColumn(null, req);
         return null;
       }
     });
   }
 
   /**
-   * Delete a column from a table.
+   * Delete a column family from a table.
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param columnName name of column to be deleted
+   * @param columnFamily name of column family to be deleted
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #deleteColumnFamily(TableName, byte[])}.
    */
-  public void deleteColumn(final byte[] tableName, final String columnName)
+  @Deprecated
+  public void deleteColumn(final byte[] tableName, final String columnFamily)
   throws IOException {
-    deleteColumn(TableName.valueOf(tableName), Bytes.toBytes(columnName));
+    deleteColumnFamily(TableName.valueOf(tableName), Bytes.toBytes(columnFamily));
   }
 
   /**
-   * Delete a column from a table.
+   * Delete a column family from a table.
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param columnName name of column to be deleted
+   * @param columnFamily name of column family to be deleted
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #deleteColumnFamily(TableName, byte[])}.
    */
-  public void deleteColumn(final String tableName, final String columnName)
+  @Deprecated
+  public void deleteColumn(final String tableName, final String columnFamily)
   throws IOException {
-    deleteColumn(TableName.valueOf(tableName), Bytes.toBytes(columnName));
+    deleteColumnFamily(TableName.valueOf(tableName), Bytes.toBytes(columnFamily));
   }
 
   /**
-   * Delete a column from a table.
+   * Delete a column family from a table.
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param columnName name of column to be deleted
+   * @param columnFamily name of column family to be deleted
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #deleteColumnFamily(TableName, byte[])}.
    */
   @Override
-  public void deleteColumn(final TableName tableName, final byte [] columnName)
+  @Deprecated
+  public void deleteColumn(final TableName tableName, final byte[] columnFamily)
+  throws IOException {
+    deleteColumnFamily(tableName, columnFamily);
+  }
+
+  @Override
+  public void deleteColumnFamily(final TableName tableName, final byte[] columnFamily)
   throws IOException {
     executeCallable(new MasterCallable<Void>(getConnection()) {
       @Override
       public Void call(int callTimeout) throws ServiceException {
-        DeleteColumnRequest req = RequestConverter.buildDeleteColumnRequest(tableName, columnName);
-        master.deleteColumn(null,req);
+        DeleteColumnRequest req =
+          RequestConverter.buildDeleteColumnRequest(tableName, columnFamily);
+        master.deleteColumn(null, req);
         return null;
       }
     });
@@ -1448,12 +1490,17 @@ public class HBaseAdmin implements Admin {
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param descriptor new column descriptor to use
+   * @param columnFamily new column family descriptor to use
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #modifyColumnFamily(TableName, HColumnDescriptor)}.
    */
-  public void modifyColumn(final String tableName, HColumnDescriptor descriptor)
+  @Deprecated
+  public void modifyColumn(final String tableName, HColumnDescriptor columnFamily)
   throws IOException {
-    modifyColumn(TableName.valueOf(tableName), descriptor);
+    modifyColumnFamily(TableName.valueOf(tableName), columnFamily);
   }
 
   /**
@@ -1461,31 +1508,46 @@ public class HBaseAdmin implements Admin {
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param descriptor new column descriptor to use
+   * @param columnFamily new column family descriptor to use
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #modifyColumnFamily(TableName, HColumnDescriptor)}.
    */
-  public void modifyColumn(final byte[] tableName, HColumnDescriptor descriptor)
+  @Deprecated
+  public void modifyColumn(final byte[] tableName, HColumnDescriptor columnFamily)
   throws IOException {
-    modifyColumn(TableName.valueOf(tableName), descriptor);
+    modifyColumnFamily(TableName.valueOf(tableName), columnFamily);
   }
 
-
-
   /**
    * Modify an existing column family on a table.
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param descriptor new column descriptor to use
+   * @param columnFamily new column family descriptor to use
    * @throws IOException if a remote or network exception occurs
+   * @deprecated As of release 2.0.0.
+   *             (<a href="https://issues.apache.org/jira/browse/HBASE-1989">HBASE-1989</a>).
+   *             This will be removed in HBase 3.0.0.
+   *             Use {@link #modifyColumnFamily(TableName, HColumnDescriptor)}.
    */
   @Override
-  public void modifyColumn(final TableName tableName, final HColumnDescriptor descriptor)
+  @Deprecated
+  public void modifyColumn(final TableName tableName, final HColumnDescriptor columnFamily)
+  throws IOException {
+    modifyColumnFamily(tableName, columnFamily);
+  }
+
+  @Override
+  public void modifyColumnFamily(final TableName tableName, final HColumnDescriptor columnFamily)
   throws IOException {
     executeCallable(new MasterCallable<Void>(getConnection()) {
       @Override
       public Void call(int callTimeout) throws ServiceException {
-        ModifyColumnRequest req = RequestConverter.buildModifyColumnRequest(tableName, descriptor);
+        ModifyColumnRequest req =
+          RequestConverter.buildModifyColumnRequest(tableName, columnFamily);
         master.modifyColumn(null,req);
         return null;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithEncryption.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithEncryption.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithEncryption.java
index 7460b83..d531604 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithEncryption.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithEncryption.java
@@ -101,7 +101,7 @@ public class IntegrationTestIngestWithEncryption extends IntegrationTestIngest
{
       LOG.info("Updating CF schema for " + getTablename() + "." +
         columnDescriptor.getNameAsString());
       admin.disableTable(getTablename());
-      admin.modifyColumn(getTablename(), columnDescriptor);
+      admin.modifyColumnFamily(getTablename(), columnDescriptor);
       admin.enableTable(getTablename());
       util.waitFor(30000, 1000, true, new Predicate<IOException>() {
         @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/SchemaResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/SchemaResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/SchemaResource.java
index 9826b67..c0e7153 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/SchemaResource.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/SchemaResource.java
@@ -159,9 +159,9 @@ public class SchemaResource extends ResourceBase {
             hcd.setValue(e.getKey().getLocalPart(), e.getValue().toString());
           }
           if (htd.hasFamily(hcd.getName())) {
-            admin.modifyColumn(name, hcd);
+            admin.modifyColumnFamily(name, hcd);
           } else {
-            admin.addColumn(name, hcd);
+            admin.addColumnFamily(name, hcd);
           }
         }
       } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
index 3fc7594..6d5933a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
@@ -341,7 +341,7 @@ public class TestHFileArchiving {
     List<String> storeFiles = region.getStoreFileList(columns);
 
     // then delete the table so the hfiles get archived
-    UTIL.getHBaseAdmin().deleteColumn(TABLE_NAME, TEST_FAM);
+    UTIL.getHBaseAdmin().deleteColumnFamily(TABLE_NAME, TEST_FAM);
 
     assertArchiveFiles(fs, storeFiles, 30000);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
index 7917dfd..bd6d2bb 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
@@ -145,7 +145,7 @@ public class TestAdmin1 {
     HColumnDescriptor nonexistentHcd = new HColumnDescriptor(nonexistentColumn);
     Exception exception = null;
     try {
-      this.admin.addColumn(nonexistentTable, nonexistentHcd);
+      this.admin.addColumnFamily(nonexistentTable, nonexistentHcd);
     } catch (IOException e) {
       exception = e;
     }
@@ -161,7 +161,7 @@ public class TestAdmin1 {
 
     exception = null;
     try {
-      this.admin.deleteColumn(nonexistentTable, nonexistentColumn);
+      this.admin.deleteColumnFamily(nonexistentTable, nonexistentColumn);
     } catch (IOException e) {
       exception = e;
     }
@@ -185,7 +185,7 @@ public class TestAdmin1 {
 
     exception = null;
     try {
-      this.admin.modifyColumn(nonexistentTable, nonexistentHcd);
+      this.admin.modifyColumnFamily(nonexistentTable, nonexistentHcd);
     } catch (IOException e) {
       exception = e;
     }
@@ -211,7 +211,7 @@ public class TestAdmin1 {
     try {
       exception = null;
       try {
-        this.admin.deleteColumn(htd.getTableName(), nonexistentHcd.getName());
+        this.admin.deleteColumnFamily(htd.getTableName(), nonexistentHcd.getName());
       } catch (IOException e) {
         exception = e;
       }
@@ -220,7 +220,7 @@ public class TestAdmin1 {
 
       exception = null;
       try {
-        this.admin.modifyColumn(htd.getTableName(), nonexistentHcd);
+        this.admin.modifyColumnFamily(htd.getTableName(), nonexistentHcd);
       } catch (IOException e) {
         exception = e;
       }
@@ -545,7 +545,7 @@ public class TestAdmin1 {
     final byte [] hcdName = hcd.getName();
     expectedException = false;
     try {
-      this.admin.modifyColumn(tableName, hcd);
+      this.admin.modifyColumnFamily(tableName, hcd);
     } catch (TableNotDisabledException re) {
       expectedException = true;
     }
@@ -561,7 +561,7 @@ public class TestAdmin1 {
     xtracol.setValue(xtracolName, xtracolName);
     expectedException = false;
     try {
-      this.admin.addColumn(tableName, xtracol);
+      this.admin.addColumnFamily(tableName, xtracol);
     } catch (TableNotDisabledException re) {
       expectedException = true;
     }
@@ -573,7 +573,7 @@ public class TestAdmin1 {
     assertTrue(hcd.getValue(xtracolName).equals(xtracolName));
 
     // Delete the just-added column.
-    this.admin.deleteColumn(tableName, xtracol.getName());
+    this.admin.deleteColumnFamily(tableName, xtracol.getName());
     modifiedHtd = this.admin.getTableDescriptor(tableName);
     hcd = modifiedHtd.getFamily(xtracol.getName());
     assertTrue(hcd == null);
@@ -1292,10 +1292,10 @@ public class TestAdmin1 {
       //expected
     }
 
-    this.admin.addColumn(tableName, new HColumnDescriptor("col2"));
+    this.admin.addColumnFamily(tableName, new HColumnDescriptor("col2"));
     this.admin.enableTable(tableName);
     try {
-      this.admin.deleteColumn(tableName, Bytes.toBytes("col2"));
+      this.admin.deleteColumnFamily(tableName, Bytes.toBytes("col2"));
     } catch (TableNotDisabledException e) {
       LOG.info(e);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
index 5284c8c..821d5c2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
@@ -181,7 +181,7 @@ public class TestRestoreSnapshotFromClient {
 
     // Add one column family and put some data in it
     admin.disableTable(tableName);
-    admin.addColumn(tableName, new HColumnDescriptor(TEST_FAMILY2));
+    admin.addColumnFamily(tableName, new HColumnDescriptor(TEST_FAMILY2));
     admin.enableTable(tableName);
     assertEquals(2, table.getTableDescriptor().getFamilies().size());
     HTableDescriptor htd = admin.getTableDescriptor(tableName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
index 54bbbae..095b3c6 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java
@@ -355,7 +355,7 @@ public class TestSnapshotCloneIndependence {
     HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAM_2);
 
     admin.disableTable(localTableName);
-    admin.addColumn(localTableName, hcd);
+    admin.addColumnFamily(localTableName, hcd);
 
     // Verify that it is not in the snapshot
     admin.enableTable(localTableName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
index e3c7ef9..1a774e5 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
@@ -296,7 +296,7 @@ public class TestSnapshotMetadata {
 
       admin.disableTable(originalTableName);
       HColumnDescriptor hcd = new HColumnDescriptor(newFamilyName);
-      admin.addColumn(originalTableName, hcd);
+      admin.addColumnFamily(originalTableName, hcd);
       assertTrue("New column family was not added.",
         admin.getTableDescriptor(originalTableName).toString().contains(newFamilyNameAsString));
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
index f5ea748..45f46e1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
@@ -1259,14 +1259,14 @@ public class TestMasterObserver {
       cp.wasModifyTableCalled());
 
     // add a column family
-    admin.addColumn(tableName, new HColumnDescriptor(TEST_FAMILY2));
+    admin.addColumnFamily(tableName, new HColumnDescriptor(TEST_FAMILY2));
     assertTrue("New column family shouldn't have been added to test table",
       cp.preAddColumnCalledOnly());
 
     // modify a column family
     HColumnDescriptor hcd1 = new HColumnDescriptor(TEST_FAMILY2);
     hcd1.setMaxVersions(25);
-    admin.modifyColumn(tableName, hcd1);
+    admin.modifyColumnFamily(tableName, hcd1);
     assertTrue("Second column family should be modified",
       cp.preModifyColumnCalledOnly());
 
@@ -1313,7 +1313,7 @@ public class TestMasterObserver {
     assertTrue("Test table should have been modified",
         cp.wasModifyTableCalled());
     // add a column family
-    admin.addColumn(tableName, new HColumnDescriptor(TEST_FAMILY2));
+    admin.addColumnFamily(tableName, new HColumnDescriptor(TEST_FAMILY2));
     assertTrue("New column family should have been added to test table",
         cp.wasAddColumnCalled());
     assertTrue("Add column handler should be called.",
@@ -1322,7 +1322,7 @@ public class TestMasterObserver {
     // modify a column family
     HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAMILY2);
     hcd.setMaxVersions(25);
-    admin.modifyColumn(tableName, hcd);
+    admin.modifyColumnFamily(tableName, hcd);
     assertTrue("Second column family should be modified",
         cp.wasModifyColumnCalled());
     assertTrue("Modify table handler should be called.",
@@ -1346,7 +1346,7 @@ public class TestMasterObserver {
     assertFalse("No column family deleted yet", cp.wasDeleteColumnCalled());
     assertFalse("Delete table column handler should not be called.",
         cp.wasDeleteColumnHandlerCalled());
-    admin.deleteColumn(tableName, TEST_FAMILY2);
+    admin.deleteColumnFamily(tableName, TEST_FAMILY2);
     HTableDescriptor tableDesc = admin.getTableDescriptor(tableName);
     assertNull("'"+Bytes.toString(TEST_FAMILY2)+"' should have been removed",
         tableDesc.getFamily(TEST_FAMILY2));

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
index 918e0f1..53deeb2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
@@ -180,7 +180,7 @@ public class TestChangingEncoding {
       if (!onlineChange) {
         admin.disableTable(tableName);
       }
-      admin.modifyColumn(tableName, hcd);
+      admin.modifyColumnFamily(tableName, hcd);
       if (!onlineChange) {
         admin.enableTable(tableName);
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestLoadAndSwitchEncodeOnDisk.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestLoadAndSwitchEncodeOnDisk.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestLoadAndSwitchEncodeOnDisk.java
index d6088ec..c648a8b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestLoadAndSwitchEncodeOnDisk.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestLoadAndSwitchEncodeOnDisk.java
@@ -79,7 +79,7 @@ public class TestLoadAndSwitchEncodeOnDisk extends
     assertAllOnLine(t);
 
     admin.disableTable(TABLE);
-    admin.modifyColumn(TABLE, hcd);
+    admin.modifyColumnFamily(TABLE, hcd);
 
     System.err.println("\nRe-enabling table\n");
     admin.enableTable(TABLE);

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
index 44b9803..2de1d44 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
@@ -138,7 +138,7 @@ public class TestTableLockManager {
       @Override
       public Object call() throws Exception {
         Admin admin = TEST_UTIL.getHBaseAdmin();
-        admin.addColumn(TABLE_NAME, new HColumnDescriptor(NEW_FAMILY));
+        admin.addColumnFamily(TABLE_NAME, new HColumnDescriptor(NEW_FAMILY));
         LOG.info("Added new column family");
         HTableDescriptor tableDesc = admin.getTableDescriptor(TABLE_NAME);
         assertTrue(tableDesc.getFamiliesKeys().contains(NEW_FAMILY));

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDeleteFamilyHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDeleteFamilyHandler.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDeleteFamilyHandler.java
index b5c82e1..8a8c059 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDeleteFamilyHandler.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDeleteFamilyHandler.java
@@ -151,7 +151,7 @@ public class TestTableDeleteFamilyHandler {
 
     // TEST - Disable and delete the column family
     admin.disableTable(TABLENAME);
-    admin.deleteColumn(TABLENAME, Bytes.toBytes("cf2"));
+    admin.deleteColumnFamily(TABLENAME, Bytes.toBytes("cf2"));
 
     // 5 - Check if only 2 column families exist in the descriptor
     HTableDescriptor afterhtd = admin.getTableDescriptor(TABLENAME);
@@ -241,7 +241,7 @@ public class TestTableDeleteFamilyHandler {
     if (admin.isTableEnabled(TABLENAME)) {
       admin.disableTable(TABLENAME);
     }
-    admin.deleteColumn(TABLENAME, Bytes.toBytes(cfToDelete));
+    admin.deleteColumnFamily(TABLENAME, Bytes.toBytes(cfToDelete));
 
     // 5 - Check if the target column family is gone from the FS
     fileStatus = fs.listStatus(tableDir);
@@ -266,7 +266,7 @@ public class TestTableDeleteFamilyHandler {
 
     try {
       // Test: delete again
-      admin.deleteColumn(TABLENAME, Bytes.toBytes(cfToDelete));
+      admin.deleteColumnFamily(TABLENAME, Bytes.toBytes(cfToDelete));
       Assert.fail("Delete a non-exist column family should fail");
     } catch (InvalidFamilyOperationException e) {
       // Expected.

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDescriptorModification.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDescriptorModification.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDescriptorModification.java
index c4772ab..920d9b5 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDescriptorModification.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/handler/TestTableDescriptorModification.java
@@ -118,7 +118,7 @@ public class TestTableDescriptorModification {
       verifyTableDescriptor(TABLE_NAME, FAMILY_0);
 
       // Modify the table removing one family and verify the descriptor
-      admin.addColumn(TABLE_NAME, new HColumnDescriptor(FAMILY_1));
+      admin.addColumnFamily(TABLE_NAME, new HColumnDescriptor(FAMILY_1));
       verifyTableDescriptor(TABLE_NAME, FAMILY_0, FAMILY_1);
     } finally {
       admin.deleteTable(TABLE_NAME);
@@ -138,12 +138,12 @@ public class TestTableDescriptorModification {
       verifyTableDescriptor(TABLE_NAME, FAMILY_0);
 
       // Modify the table removing one family and verify the descriptor
-      admin.addColumn(TABLE_NAME, new HColumnDescriptor(FAMILY_1));
+      admin.addColumnFamily(TABLE_NAME, new HColumnDescriptor(FAMILY_1));
       verifyTableDescriptor(TABLE_NAME, FAMILY_0, FAMILY_1);
 
       try {
         // Add same column family again - expect failure
-        admin.addColumn(TABLE_NAME, new HColumnDescriptor(FAMILY_1));
+        admin.addColumnFamily(TABLE_NAME, new HColumnDescriptor(FAMILY_1));
         Assert.fail("Delete a non-exist column family should fail");
       } catch (InvalidFamilyOperationException e) {
         // Expected.
@@ -173,7 +173,7 @@ public class TestTableDescriptorModification {
       cfDescriptor.setBlocksize(newBlockSize);
 
       // Modify colymn family
-      admin.modifyColumn(TABLE_NAME, cfDescriptor);
+      admin.modifyColumnFamily(TABLE_NAME, cfDescriptor);
 
       HTableDescriptor htd = admin.getTableDescriptor(TABLE_NAME);
       HColumnDescriptor hcfd = htd.getFamily(FAMILY_0);
@@ -203,7 +203,7 @@ public class TestTableDescriptorModification {
 
       // Modify a column family that is not in the table.
       try {
-        admin.modifyColumn(TABLE_NAME, cfDescriptor);
+        admin.modifyColumnFamily(TABLE_NAME, cfDescriptor);
         Assert.fail("Modify a non-exist column family should fail");
       } catch (InvalidFamilyOperationException e) {
         // Expected.
@@ -228,7 +228,7 @@ public class TestTableDescriptorModification {
       verifyTableDescriptor(TABLE_NAME, FAMILY_0, FAMILY_1);
 
       // Modify the table removing one family and verify the descriptor
-      admin.deleteColumn(TABLE_NAME, FAMILY_1);
+      admin.deleteColumnFamily(TABLE_NAME, FAMILY_1);
       verifyTableDescriptor(TABLE_NAME, FAMILY_0);
     } finally {
       admin.deleteTable(TABLE_NAME);
@@ -249,12 +249,12 @@ public class TestTableDescriptorModification {
       verifyTableDescriptor(TABLE_NAME, FAMILY_0, FAMILY_1);
 
       // Modify the table removing one family and verify the descriptor
-      admin.deleteColumn(TABLE_NAME, FAMILY_1);
+      admin.deleteColumnFamily(TABLE_NAME, FAMILY_1);
       verifyTableDescriptor(TABLE_NAME, FAMILY_0);
 
       try {
         // Delete again - expect failure
-        admin.deleteColumn(TABLE_NAME, FAMILY_1);
+        admin.deleteColumnFamily(TABLE_NAME, FAMILY_1);
         Assert.fail("Delete a non-exist column family should fail");
       } catch (Exception e) {
         // Expected.

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
index c4ae245..45a95c4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
@@ -118,7 +118,7 @@ public class TestEncryptionKeyRotation {
     hcd.setEncryptionKey(EncryptionUtil.wrapKey(conf,
       conf.get(HConstants.CRYPTO_MASTERKEY_NAME_CONF_KEY, User.getCurrent().getShortName()),
       secondCFKey));
-    TEST_UTIL.getHBaseAdmin().modifyColumn(htd.getTableName(), hcd);
+    TEST_UTIL.getHBaseAdmin().modifyColumnFamily(htd.getTableName(), hcd);
     Thread.sleep(5000); // Need a predicate for online schema change
 
     // And major compact

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
index 2cd32b1..3084c61 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
@@ -652,19 +652,19 @@ public abstract class TestVisibilityLabels {
     }
     try {
       HColumnDescriptor hcd = new HColumnDescriptor("testFamily");
-      admin.addColumn(LABELS_TABLE_NAME, hcd);
+      admin.addColumnFamily(LABELS_TABLE_NAME, hcd);
       fail("Lables table should not get altered by user.");
     } catch (Exception e) {
     }
     try {
-      admin.deleteColumn(LABELS_TABLE_NAME, VisibilityConstants.LABELS_TABLE_FAMILY);
+      admin.deleteColumnFamily(LABELS_TABLE_NAME, VisibilityConstants.LABELS_TABLE_FAMILY);
       fail("Lables table should not get altered by user.");
     } catch (Exception e) {
     }
     try {
       HColumnDescriptor hcd = new HColumnDescriptor(VisibilityConstants.LABELS_TABLE_FAMILY);
       hcd.setBloomFilterType(BloomType.ROWCOL);
-      admin.modifyColumn(LABELS_TABLE_NAME, hcd);
+      admin.modifyColumnFamily(LABELS_TABLE_NAME, hcd);
       fail("Lables table should not get altered by user.");
     } catch (Exception e) {
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/ec51d7b2/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
index b817401..ad4f947 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
@@ -300,9 +300,9 @@ public class LoadTestTool extends AbstractHBaseTool {
                       cipher.getName())));
         }
         if (isNewCf) {
-          admin.addColumn(tableName, columnDesc);
+          admin.addColumnFamily(tableName, columnDesc);
         } else {
-          admin.modifyColumn(tableName, columnDesc);
+          admin.modifyColumnFamily(tableName, columnDesc);
         }
       }
       LOG.info("Enabling table " + tableName);


Mime
View raw message