You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2015/10/22 06:33:16 UTC
hbase git commit: HBASE-14665 Remove deprecated
HBaseTestingUtility#createTable methods
Repository: hbase
Updated Branches:
refs/heads/master 39521068e -> 7b73899e9
HBASE-14665 Remove deprecated HBaseTestingUtility#createTable methods
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7b73899e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7b73899e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7b73899e
Branch: refs/heads/master
Commit: 7b73899e9507374ea8023082c86077056486706e
Parents: 3952106
Author: Jonathan M Hsieh <jm...@apache.org>
Authored: Wed Oct 21 20:50:54 2015 -0700
Committer: Jonathan M Hsieh <jm...@apache.org>
Committed: Wed Oct 21 21:28:27 2015 -0700
----------------------------------------------------------------------
.../hadoop/hbase/HBaseTestingUtility.java | 279 -------------------
1 file changed, 279 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/7b73899e/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 2cfafb9..ceb0d75 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -1312,19 +1312,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
/**
* Create a table.
* @param tableName
- * @param family
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[])}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[] family) throws IOException {
- return createTable(TableName.valueOf(tableName), new byte[][] { family });
- }
-
- /**
- * Create a table.
- * @param tableName
* @param families
* @return An HTable instance for the created table.
* @throws IOException
@@ -1368,22 +1355,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
return createTable(tableName, new byte[][] { family }, splitKeys);
}
-
- /**
- * Create a table.
- * @param tableName
- * @param families
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][])}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families)
- throws IOException {
- return createTable(tableName, families,
- new Configuration(getConfiguration()));
- }
-
/**
* Create a table.
* @param tableName
@@ -1420,20 +1391,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
return createTable(tableName, families, splitKeys, new Configuration(getConfiguration()));
}
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families, int numVersions, byte[] startKey,
- byte[] endKey, int numRegions) throws IOException {
- return createTable(TableName.valueOf(tableName), families, numVersions, startKey, endKey,
- numRegions);
- }
-
- @Deprecated
- public HTable createTable(String tableName, byte[][] families, int numVersions, byte[] startKey,
- byte[] endKey, int numRegions) throws IOException {
- return createTable(TableName.valueOf(tableName), families, numVersions, startKey, endKey,
- numRegions);
- }
-
public HTable createTable(TableName tableName, byte[][] families,
int numVersions, byte[] startKey, byte[] endKey, int numRegions)
throws IOException{
@@ -1509,21 +1466,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
* Create a table.
* @param tableName
* @param families
- * @param c Configuration to use
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][])}
- */
- @Deprecated
- public HTable createTable(TableName tableName, byte[][] families, final Configuration c)
- throws IOException {
- return createTable(tableName, families, (byte[][]) null, c);
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param families
* @param splitKeys
* @param c Configuration to use
* @return An HTable instance for the created table.
@@ -1537,95 +1479,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
/**
* Create a table.
* @param tableName
- * @param families
- * @param c Configuration to use
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][])}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families, final Configuration c)
- throws IOException {
- HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName));
- for(byte[] family : families) {
- HColumnDescriptor hcd = new HColumnDescriptor(family);
- // Disable blooms (they are on by default as of 0.95) but we disable them here because
- // tests have hard coded counts of what to expect in block cache, etc., and blooms being
- // on is interfering.
- hcd.setBloomFilterType(BloomType.NONE);
- desc.addFamily(hcd);
- }
- getHBaseAdmin().createTable(desc);
- return (HTable) getConnection().getTable(desc.getTableName());
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param families
- * @param c Configuration to use
- * @param numVersions
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][], int)}
- */
- @Deprecated
- public HTable createTable(TableName tableName, byte[][] families,
- final Configuration c, int numVersions)
- throws IOException {
- HTableDescriptor desc = new HTableDescriptor(tableName);
- for(byte[] family : families) {
- HColumnDescriptor hcd = new HColumnDescriptor(family)
- .setMaxVersions(numVersions);
- desc.addFamily(hcd);
- }
- getHBaseAdmin().createTable(desc);
- // HBaseAdmin only waits for regions to appear in hbase:meta we should wait until they are assigned
- waitUntilAllRegionsAssigned(tableName);
- return (HTable) getConnection().getTable(tableName);
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param families
- * @param c Configuration to use
- * @param numVersions
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][], int)}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families,
- final Configuration c, int numVersions)
- throws IOException {
- HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName));
- for (byte[] family : families) {
- HColumnDescriptor hcd = new HColumnDescriptor(family).setMaxVersions(numVersions);
- desc.addFamily(hcd);
- }
- getHBaseAdmin().createTable(desc);
- return (HTable) getConnection().getTable(desc.getTableName());
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param family
- * @param numVersions
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[], int)}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[] family, int numVersions)
- throws IOException {
- return createTable(tableName, new byte[][]{family}, numVersions);
- }
-
- /**
- * Create a table.
- * @param tableName
* @param family
* @param numVersions
* @return An HTable instance for the created table.
@@ -1643,21 +1496,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
* @param numVersions
* @return An HTable instance for the created table.
* @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][], int)}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families, int numVersions)
- throws IOException {
- return createTable(TableName.valueOf(tableName), families, numVersions);
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param families
- * @param numVersions
- * @return An HTable instance for the created table.
- * @throws IOException
*/
public HTable createTable(TableName tableName, byte[][] families, int numVersions)
throws IOException {
@@ -1707,23 +1545,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
* @param blockSize
* @return An HTable instance for the created table.
* @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][], int, int)}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families,
- int numVersions, int blockSize) throws IOException {
- return createTable(TableName.valueOf(tableName),
- families, numVersions, blockSize);
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param families
- * @param numVersions
- * @param blockSize
- * @return An HTable instance for the created table.
- * @throws IOException
*/
public HTable createTable(TableName tableName, byte[][] families,
int numVersions, int blockSize) throws IOException {
@@ -1765,22 +1586,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
* @param numVersions
* @return An HTable instance for the created table.
* @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][], int)}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families,
- int[] numVersions)
- throws IOException {
- return createTable(TableName.valueOf(tableName), families, numVersions);
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param families
- * @param numVersions
- * @return An HTable instance for the created table.
- * @throws IOException
*/
public HTable createTable(TableName tableName, byte[][] families,
int[] numVersions)
@@ -1806,21 +1611,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
* @param splitRows
* @return An HTable instance for the created table.
* @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[], byte[][])}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[] family, byte[][] splitRows)
- throws IOException{
- return createTable(TableName.valueOf(tableName), family, splitRows);
- }
-
- /**
- * Create a table.
- * @param tableName
- * @param family
- * @param splitRows
- * @return An HTable instance for the created table.
- * @throws IOException
*/
public HTable createTable(TableName tableName, byte[] family, byte[][] splitRows)
throws IOException {
@@ -1845,29 +1635,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
}
/**
- * Create a table.
- * @param tableName
- * @param families
- * @param splitRows
- * @return An HTable instance for the created table.
- * @throws IOException
- * @deprecated use {@link #createTable(TableName, byte[][], byte[][])}
- */
- @Deprecated
- public HTable createTable(byte[] tableName, byte[][] families, byte[][] splitRows)
- throws IOException {
- HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName));
- for(byte[] family:families) {
- HColumnDescriptor hcd = new HColumnDescriptor(family);
- desc.addFamily(hcd);
- }
- getHBaseAdmin().createTable(desc, splitRows);
- // HBaseAdmin only waits for regions to appear in hbase:meta we should wait until they are assigned
- waitUntilAllRegionsAssigned(desc.getTableName());
- return (HTable) getConnection().getTable(desc.getTableName());
- }
-
- /**
* Modify a table, synchronous. Waiting logic similar to that of {@code admin.rb#alter_status}.
*/
@SuppressWarnings("serial")
@@ -2159,37 +1926,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
}
/**
- * Truncate a table using the admin command.
- * Effectively disables, deletes, and recreates the table.
- *
- * @param tableName table which must exist.
- * @param preserveRegions keep the existing split points
- * @return HTable for the new table
- * @deprecated use {@link #truncateTable(TableName, boolean)}
- */
- @Deprecated
- public HTable truncateTable(final byte[] tableName, final boolean preserveRegions)
- throws IOException {
- return truncateTable(TableName.valueOf(tableName), preserveRegions);
- }
-
- /**
- * Truncate a table using the admin command.
- * Effectively disables, deletes, and recreates the table.
- * For previous behavior of issuing row deletes, see
- * deleteTableData.
- * Expressly does not preserve regions of existing table.
- *
- * @param tableName table which must exist.
- * @return HTable for the new table
- * @deprecated use {@link #truncateTable(TableName)}
- */
- @Deprecated
- public HTable truncateTable(final byte[] tableName) throws IOException {
- return truncateTable(TableName.valueOf(tableName), false);
- }
-
- /**
* Load table with rows from 'aaa' to 'zzz'.
* @param t Table
* @param f Family
@@ -2881,12 +2617,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
expireSession(nodeZK, false);
}
- @Deprecated
- public void expireSession(ZooKeeperWatcher nodeZK, Server server)
- throws Exception {
- expireSession(nodeZK, false);
- }
-
/**
* Expire a ZooKeeper session as recommended in ZooKeeper documentation
* http://wiki.apache.org/hadoop/ZooKeeper/FAQ#A4
@@ -3657,15 +3387,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
HConstants.DEFAULT_ZOOKEEPER_ZNODE_PARENT);
}
- @Deprecated
- public HTable createRandomTable(String tableName, final Collection<String> families,
- final int maxVersions, final int numColsPerRow, final int numFlushes, final int numRegions,
- final int numRowsPerFlush) throws IOException, InterruptedException {
- return (HTable) this
- .createRandomTable(TableName.valueOf(tableName), families, maxVersions, numColsPerRow,
- numFlushes, numRegions, numRowsPerFlush);
- }
-
/** Creates a random table with the given parameters */
public Table createRandomTable(TableName tableName,
final Collection<String> families,