Package org.apache.hadoop.hbase
Class HBaseTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.hadoop.hbase.HBaseTestCase
- All Implemented Interfaces:
junit.framework.Test
Deprecated.
Abstract HBase test class. Initializes a few things that can come in handly like an
HBaseConfiguration and filesystem.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final byte[][]
Deprecated.org.apache.hadoop.conf.Configuration
Deprecated.protected static final byte[]
Deprecated.protected static final byte[]
Deprecated.protected static final byte[]
Deprecated.protected static final char
Deprecated.protected org.apache.hadoop.fs.FileSystem
Deprecated.final org.apache.hadoop.hbase.util.FSTableDescriptors
Deprecated.protected static final char
Deprecated.private boolean
Deprecated.private static final org.slf4j.Logger
Deprecated.protected static final int
Deprecated.protected org.apache.hadoop.hbase.regionserver.HRegion
Deprecated.protected static final String
Deprecated.protected String
Deprecated.protected static final byte[]
Deprecated.protected static org.apache.hadoop.fs.Path
Deprecated.protected final HBaseTestingUtility
Deprecated. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
addContent
(org.apache.hadoop.hbase.client.Table updater, String columnFamily) Deprecated.Add content to regionr
on the passed columncolumn
.static long
addContent
(org.apache.hadoop.hbase.client.Table updater, String columnFamily, byte[] startKeyBytes, byte[] endKey) Deprecated.Add content to regionr
on the passed columncolumn
.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 regionr
on the passed columncolumn
.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 regionr
on the passed columncolumn
.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
Deprecated.protected void
Deprecated.You must callcloseRootAndMeta()
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 namename
withCOLUMNS
for families.protected org.apache.hadoop.hbase.HTableDescriptor
createTableDescriptor
(String name, int versions) Deprecated.Create a table of namename
withCOLUMNS
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 namename
withCOLUMNS
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 systemprotected void
tearDown()
Deprecated.Methods inherited from class junit.framework.TestCase
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
-
Field Details
-
LOG
Deprecated. -
fam1
Deprecated. -
fam2
Deprecated. -
fam3
Deprecated. -
COLUMNS
Deprecated. -
localfs
Deprecated. -
testDir
Deprecated. -
fs
Deprecated. -
meta
Deprecated. -
FIRST_CHAR
Deprecated.- See Also:
-
LAST_CHAR
Deprecated.- See Also:
-
PUNCTUATION
Deprecated.- See Also:
-
START_KEY_BYTES
Deprecated. -
START_KEY
Deprecated. -
MAXVERSIONS
Deprecated.- See Also:
-
testUtil
Deprecated. -
conf
Deprecated. -
fsTableDescriptors
Deprecated.
-
-
Constructor Details
-
HBaseTestCase
public HBaseTestCase()Deprecated.constructor -
HBaseTestCase
Deprecated.
-
-
Method Details
-
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.- Overrides:
setUp
in classjunit.framework.TestCase
- Throws:
Exception
-
tearDown
Deprecated.- Overrides:
tearDown
in classjunit.framework.TestCase
- Throws:
Exception
-
getUnitTestdir
Deprecated.- Returns:
- directory to use for this test
- See Also:
-
createNewHRegion
public org.apache.hadoop.hbase.regionserver.HRegion createNewHRegion(org.apache.hadoop.hbase.HTableDescriptor desc, byte[] startKey, byte[] endKey) throws IOException Deprecated.You must call close on the returned region and then close on the log file it created. DoHBaseTestingUtility.closeRegionAndWAL(HRegion)
to close both the region and the WAL.- Returns:
- An
HRegion
- Throws:
IOException
-
createNewHRegion
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 Deprecated.- Throws:
IOException
-
openClosedRegion
protected org.apache.hadoop.hbase.regionserver.HRegion openClosedRegion(org.apache.hadoop.hbase.regionserver.HRegion closedRegion) throws IOException Deprecated.- Throws:
IOException
-
createTableDescriptor
Deprecated.Create a table of namename
withCOLUMNS
for families.- Parameters:
name
- Name to give table.- Returns:
- Column descriptor.
-
createTableDescriptor
Deprecated.Create a table of namename
withCOLUMNS
for families.- Parameters:
name
- Name to give table.versions
- How many versions to allow per column.- Returns:
- Column descriptor.
-
createTableDescriptor
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 namename
withCOLUMNS
for families.- Parameters:
name
- Name to give table.versions
- How many versions to allow per column.- Returns:
- Column descriptor.
-
addContent
public static long addContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily, byte[] column) throws IOException Deprecated.Add content to regionr
on the passed columncolumn
. Adds data of the from 'aaa', 'aab', etc where key and value are the same.- Returns:
- count of what we added.
- Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily) throws IOException Deprecated.- Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily) throws IOException Deprecated.Add content to regionr
on the passed columncolumn
. Adds data of the from 'aaa', 'aab', etc where key and value are the same.- Returns:
- count of what we added.
- Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String family, String column) throws IOException Deprecated.- Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, byte[] startKeyBytes, byte[] endKey) throws IOException Deprecated.Add content to regionr
on the passed columncolumn
. Adds data of the from 'aaa', 'aab', etc where key and value are the same.- Returns:
- count of what we added.
- Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String family, String column, byte[] startKeyBytes, byte[] endKey) throws IOException Deprecated.- Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, String column, byte[] startKeyBytes, byte[] endKey, long ts) throws IOException Deprecated.Add content to regionr
on the passed columncolumn
. Adds data of the from 'aaa', 'aab', etc where key and value are the same.- Returns:
- count of what we added.
- Throws:
IOException
-
assertResultEquals
protected void assertResultEquals(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] row, byte[] family, byte[] qualifier, long timestamp, byte[] value) throws IOException Deprecated.- Throws:
IOException
-
shutdownDfs
Deprecated.Common method to close down a MiniDFSCluster and the associated file system -
createMetaRegion
Deprecated.You must callcloseRootAndMeta()
when done after calling this method. It does cleanup.- Throws:
IOException
-
closeRootAndMeta
Deprecated.- Throws:
IOException
-
assertByteEquals
Deprecated. -
assertEquals
Deprecated.
-
HBaseTestingUtility
.