HBASE-23777 Removed deprecated createTableDescriptor(String, int, int, int, KeepDeletedCells) from HBaseTestingUtility
Signed-off-by: stack <stack@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
5a3ad6f08f
commit
12f1c7c1ce
|
@ -1899,19 +1899,6 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
||||||
public static final byte [] START_KEY_BYTES = {FIRST_CHAR, FIRST_CHAR, FIRST_CHAR};
|
public static final byte [] START_KEY_BYTES = {FIRST_CHAR, FIRST_CHAR, FIRST_CHAR};
|
||||||
public static final String START_KEY = new String(START_KEY_BYTES, HConstants.UTF8_CHARSET);
|
public static final String START_KEY = new String(START_KEY_BYTES, HConstants.UTF8_CHARSET);
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
|
|
||||||
* {@link #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)} instead.
|
|
||||||
* @see #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)
|
|
||||||
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13893">HBASE-13893</a>
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public HTableDescriptor createTableDescriptor(final String name,
|
|
||||||
final int minVersions, final int versions, final int ttl, KeepDeletedCells keepDeleted) {
|
|
||||||
return this.createTableDescriptor(TableName.valueOf(name), minVersions, versions, ttl,
|
|
||||||
keepDeleted);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a table of name <code>name</code>.
|
* Create a table of name <code>name</code>.
|
||||||
* @param name Name to give table.
|
* @param name Name to give table.
|
||||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.HConstants;
|
||||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||||
import org.apache.hadoop.hbase.KeepDeletedCells;
|
import org.apache.hadoop.hbase.KeepDeletedCells;
|
||||||
import org.apache.hadoop.hbase.PrivateCellUtil;
|
import org.apache.hadoop.hbase.PrivateCellUtil;
|
||||||
|
import org.apache.hadoop.hbase.TableName;
|
||||||
import org.apache.hadoop.hbase.client.Delete;
|
import org.apache.hadoop.hbase.client.Delete;
|
||||||
import org.apache.hadoop.hbase.client.Get;
|
import org.apache.hadoop.hbase.client.Get;
|
||||||
import org.apache.hadoop.hbase.client.Put;
|
import org.apache.hadoop.hbase.client.Put;
|
||||||
|
@ -104,7 +105,7 @@ public class TestKeepDeletes {
|
||||||
@Test
|
@Test
|
||||||
public void testBasicScenario() throws Exception {
|
public void testBasicScenario() throws Exception {
|
||||||
// keep 3 versions, rows do not expire
|
// keep 3 versions, rows do not expire
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -201,7 +202,7 @@ public class TestKeepDeletes {
|
||||||
@Test
|
@Test
|
||||||
public void testRawScanWithoutKeepingDeletes() throws Exception {
|
public void testRawScanWithoutKeepingDeletes() throws Exception {
|
||||||
// KEEP_DELETED_CELLS is NOT enabled
|
// KEEP_DELETED_CELLS is NOT enabled
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
|
||||||
HConstants.FOREVER, KeepDeletedCells.FALSE);
|
HConstants.FOREVER, KeepDeletedCells.FALSE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -246,7 +247,7 @@ public class TestKeepDeletes {
|
||||||
@Test
|
@Test
|
||||||
public void testWithoutKeepingDeletes() throws Exception {
|
public void testWithoutKeepingDeletes() throws Exception {
|
||||||
// KEEP_DELETED_CELLS is NOT enabled
|
// KEEP_DELETED_CELLS is NOT enabled
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
|
||||||
HConstants.FOREVER, KeepDeletedCells.FALSE);
|
HConstants.FOREVER, KeepDeletedCells.FALSE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -299,7 +300,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRawScanWithColumns() throws Exception {
|
public void testRawScanWithColumns() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
Region region = hbu.createLocalHRegion(htd, null, null);
|
Region region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -323,7 +324,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRawScan() throws Exception {
|
public void testRawScan() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
Region region = hbu.createLocalHRegion(htd, null, null);
|
Region region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -413,7 +414,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteMarkerExpirationEmptyStore() throws Exception {
|
public void testDeleteMarkerExpirationEmptyStore() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -456,7 +457,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteMarkerExpiration() throws Exception {
|
public void testDeleteMarkerExpiration() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -519,7 +520,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWithOldRow() throws Exception {
|
public void testWithOldRow() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -597,7 +598,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRanges() throws Exception {
|
public void testRanges() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
Region region = hbu.createLocalHRegion(htd, null, null);
|
Region region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -679,7 +680,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteMarkerVersioning() throws Exception {
|
public void testDeleteMarkerVersioning() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -772,7 +773,7 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWithMixedCFs() throws Exception {
|
public void testWithMixedCFs() throws Exception {
|
||||||
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
|
||||||
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
HConstants.FOREVER, KeepDeletedCells.TRUE);
|
||||||
Region region = hbu.createLocalHRegion(htd, null, null);
|
Region region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
|
@ -824,8 +825,8 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWithMinVersions() throws Exception {
|
public void testWithMinVersions() throws Exception {
|
||||||
HTableDescriptor htd =
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 3,
|
||||||
hbu.createTableDescriptor(name.getMethodName(), 3, 1000, 1, KeepDeletedCells.TRUE);
|
1000, 1, KeepDeletedCells.TRUE);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
long ts = EnvironmentEdgeManager.currentTime() - 2000; // 2s in the past
|
long ts = EnvironmentEdgeManager.currentTime() - 2000; // 2s in the past
|
||||||
|
@ -903,8 +904,8 @@ public class TestKeepDeletes {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWithTTL() throws Exception {
|
public void testWithTTL() throws Exception {
|
||||||
HTableDescriptor htd =
|
HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 1,
|
||||||
hbu.createTableDescriptor(name.getMethodName(), 1, 1000, 1, KeepDeletedCells.TTL);
|
1000, 1, KeepDeletedCells.TTL);
|
||||||
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
HRegion region = hbu.createLocalHRegion(htd, null, null);
|
||||||
|
|
||||||
long ts = EnvironmentEdgeManager.currentTime() - 2000; // 2s in the past
|
long ts = EnvironmentEdgeManager.currentTime() - 2000; // 2s in the past
|
||||||
|
|
Loading…
Reference in New Issue