HBaseTestingUtility
.@Deprecated public abstract class HBaseTestCase extends junit.framework.TestCase
HBaseTestingUtility
,
HBASE-11912Modifier and Type | Field and Description |
---|---|
protected static byte[][] |
COLUMNS
Deprecated.
|
org.apache.hadoop.conf.Configuration |
conf
Deprecated.
|
protected static byte[] |
fam1
Deprecated.
|
protected static byte[] |
fam2
Deprecated.
|
protected static byte[] |
fam3
Deprecated.
|
protected static char |
FIRST_CHAR
Deprecated.
|
protected org.apache.hadoop.fs.FileSystem |
fs
Deprecated.
|
org.apache.hadoop.hbase.util.FSTableDescriptors |
fsTableDescriptors
Deprecated.
|
protected static char |
LAST_CHAR
Deprecated.
|
private boolean |
localfs
Deprecated.
|
private static org.slf4j.Logger |
LOG
Deprecated.
|
protected static int |
MAXVERSIONS
Deprecated.
|
protected org.apache.hadoop.hbase.regionserver.HRegion |
meta
Deprecated.
|
protected static String |
PUNCTUATION
Deprecated.
|
protected String |
START_KEY
Deprecated.
|
protected static byte[] |
START_KEY_BYTES
Deprecated.
|
protected static org.apache.hadoop.fs.Path |
testDir
Deprecated.
|
protected HBaseTestingUtility |
testUtil
Deprecated.
|
Constructor and Description |
---|
HBaseTestCase()
Deprecated.
constructor
|
HBaseTestCase(String name)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static long |
addContent(org.apache.hadoop.hbase.regionserver.Region r,
byte[] columnFamily)
Deprecated.
|
static long |
addContent(org.apache.hadoop.hbase.regionserver.Region r,
byte[] columnFamily,
byte[] column)
Deprecated.
Add content to region
r on the passed column
column . |
static long |
addContent(org.apache.hadoop.hbase.client.Table updater,
String columnFamily)
Deprecated.
Add content to region
r on the passed column
column . |
static long |
addContent(org.apache.hadoop.hbase.client.Table updater,
String columnFamily,
byte[] startKeyBytes,
byte[] endKey)
Deprecated.
Add content to region
r on the passed column
column . |
static long |
addContent(org.apache.hadoop.hbase.client.Table updater,
String family,
String column)
Deprecated.
|
static long |
addContent(org.apache.hadoop.hbase.client.Table updater,
String family,
String column,
byte[] startKeyBytes,
byte[] endKey)
Deprecated.
|
static long |
addContent(org.apache.hadoop.hbase.client.Table updater,
String columnFamily,
String column,
byte[] startKeyBytes,
byte[] endKey,
long ts)
Deprecated.
Add content to region
r on the passed column
column . |
static void |
assertByteEquals(byte[] expected,
byte[] actual)
Deprecated.
|
static void |
assertEquals(byte[] expected,
byte[] actual)
Deprecated.
|
protected void |
assertResultEquals(org.apache.hadoop.hbase.regionserver.HRegion region,
byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
byte[] value)
Deprecated.
|
protected void |
closeRootAndMeta()
Deprecated.
|
protected void |
createMetaRegion()
Deprecated.
You must call
closeRootAndMeta() when done after calling this
method. |
org.apache.hadoop.hbase.regionserver.HRegion |
createNewHRegion(org.apache.hadoop.hbase.HTableDescriptor desc,
byte[] startKey,
byte[] endKey)
Deprecated.
You must call close on the returned region and then close on the log file it created.
|
org.apache.hadoop.hbase.regionserver.HRegion |
createNewHRegion(org.apache.hadoop.hbase.HTableDescriptor desc,
byte[] startKey,
byte[] endKey,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
|
protected org.apache.hadoop.hbase.HTableDescriptor |
createTableDescriptor(String name)
Deprecated.
Create a table of name
name with COLUMNS for
families. |
protected org.apache.hadoop.hbase.HTableDescriptor |
createTableDescriptor(String name,
int versions)
Deprecated.
Create a table of name
name with COLUMNS for
families. |
protected org.apache.hadoop.hbase.HTableDescriptor |
createTableDescriptor(String name,
int minVersions,
int versions,
int ttl,
org.apache.hadoop.hbase.KeepDeletedCells keepDeleted)
Deprecated.
Create a table of name
name with COLUMNS for
families. |
protected org.apache.hadoop.fs.Path |
getUnitTestdir(String testName)
Deprecated.
|
protected org.apache.hadoop.hbase.regionserver.HRegion |
openClosedRegion(org.apache.hadoop.hbase.regionserver.HRegion closedRegion)
Deprecated.
|
protected void |
setUp()
Deprecated.
Note that this method must be called after the mini hdfs cluster has
started or we end up with a local file system.
|
static void |
shutdownDfs(org.apache.hadoop.hdfs.MiniDFSCluster cluster)
Deprecated.
Common method to close down a MiniDFSCluster and the associated file system
|
protected void |
tearDown()
Deprecated.
|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
private static final org.slf4j.Logger LOG
protected static final byte[] fam1
protected static final byte[] fam2
protected static final byte[] fam3
protected static final byte[][] COLUMNS
private boolean localfs
protected static org.apache.hadoop.fs.Path testDir
protected org.apache.hadoop.fs.FileSystem fs
protected org.apache.hadoop.hbase.regionserver.HRegion meta
protected static final char FIRST_CHAR
protected static final char LAST_CHAR
protected static final String PUNCTUATION
protected static final byte[] START_KEY_BYTES
protected static final int MAXVERSIONS
protected final HBaseTestingUtility testUtil
public volatile org.apache.hadoop.conf.Configuration conf
public final org.apache.hadoop.hbase.util.FSTableDescriptors fsTableDescriptors
public HBaseTestCase()
public HBaseTestCase(String name)
name
- protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
protected org.apache.hadoop.fs.Path getUnitTestdir(String testName)
testName
- HBaseCommonTestingUtility.getBaseTestDir()
public org.apache.hadoop.hbase.regionserver.HRegion createNewHRegion(org.apache.hadoop.hbase.HTableDescriptor desc, byte[] startKey, byte[] endKey) throws IOException
HBaseTestingUtility.closeRegionAndWAL(HRegion)
to close both the region and the WAL.desc
- startKey
- endKey
- HRegion
IOException
public org.apache.hadoop.hbase.regionserver.HRegion createNewHRegion(org.apache.hadoop.hbase.HTableDescriptor desc, byte[] startKey, byte[] endKey, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
protected org.apache.hadoop.hbase.regionserver.HRegion openClosedRegion(org.apache.hadoop.hbase.regionserver.HRegion closedRegion) throws IOException
IOException
protected org.apache.hadoop.hbase.HTableDescriptor createTableDescriptor(String name)
name
with COLUMNS
for
families.name
- Name to give table.protected org.apache.hadoop.hbase.HTableDescriptor createTableDescriptor(String name, int versions)
name
with COLUMNS
for
families.name
- Name to give table.versions
- How many versions to allow per column.protected org.apache.hadoop.hbase.HTableDescriptor createTableDescriptor(String name, int minVersions, int versions, int ttl, org.apache.hadoop.hbase.KeepDeletedCells keepDeleted)
name
with COLUMNS
for
families.name
- Name to give table.versions
- How many versions to allow per column.public static long addContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily, byte[] column) throws IOException
r
on the passed column
column
.
Adds data of the from 'aaa', 'aab', etc where key and value are the same.r
- columnFamily
- column
- IOException
public static long addContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily) throws IOException
IOException
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily) throws IOException
r
on the passed column
column
.
Adds data of the from 'aaa', 'aab', etc where key and value are the same.IOException
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String family, String column) throws IOException
IOException
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, byte[] startKeyBytes, byte[] endKey) throws IOException
r
on the passed column
column
.
Adds data of the from 'aaa', 'aab', etc where key and value are the same.IOException
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String family, String column, byte[] startKeyBytes, byte[] endKey) throws IOException
IOException
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, String column, byte[] startKeyBytes, byte[] endKey, long ts) throws IOException
r
on the passed column
column
.
Adds data of the from 'aaa', 'aab', etc where key and value are the same.IOException
protected void assertResultEquals(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] row, byte[] family, byte[] qualifier, long timestamp, byte[] value) throws IOException
IOException
public static void shutdownDfs(org.apache.hadoop.hdfs.MiniDFSCluster cluster)
cluster
- protected void createMetaRegion() throws IOException
closeRootAndMeta()
when done after calling this
method. It does cleanup.IOException
protected void closeRootAndMeta() throws IOException
IOException
public static void assertByteEquals(byte[] expected, byte[] actual)
public static void assertEquals(byte[] expected, byte[] actual)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.