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
FieldsModifier and TypeFieldDescriptionprotected static final byte[][]Deprecated.org.apache.hadoop.conf.ConfigurationDeprecated.protected static final byte[]Deprecated.protected static final byte[]Deprecated.protected static final byte[]Deprecated.protected static final charDeprecated.protected org.apache.hadoop.fs.FileSystemDeprecated.final org.apache.hadoop.hbase.util.FSTableDescriptorsDeprecated.protected static final charDeprecated.private booleanDeprecated.private static final org.slf4j.LoggerDeprecated.protected static final intDeprecated.protected org.apache.hadoop.hbase.regionserver.HRegionDeprecated.protected static final StringDeprecated.protected StringDeprecated.protected static final byte[]Deprecated.protected static org.apache.hadoop.fs.PathDeprecated.protected final HBaseTestingUtilityDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longaddContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily) Deprecated.Add content to regionron the passed columncolumn.static longaddContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, byte[] startKeyBytes, byte[] endKey) Deprecated.Add content to regionron the passed columncolumn.static longaddContent(org.apache.hadoop.hbase.client.Table updater, String family, String column) Deprecated.static longaddContent(org.apache.hadoop.hbase.client.Table updater, String family, String column, byte[] startKeyBytes, byte[] endKey) Deprecated.static longaddContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, String column, byte[] startKeyBytes, byte[] endKey, long ts) Deprecated.Add content to regionron the passed columncolumn.static longaddContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily) Deprecated.static longaddContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily, byte[] column) Deprecated.Add content to regionron the passed columncolumn.static voidassertByteEquals(byte[] expected, byte[] actual) Deprecated.static voidassertEquals(byte[] expected, byte[] actual) Deprecated.protected voidassertResultEquals(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] row, byte[] family, byte[] qualifier, long timestamp, byte[] value) Deprecated.protected voidDeprecated.protected voidDeprecated.You must callcloseRootAndMeta()when done after calling this method.org.apache.hadoop.hbase.regionserver.HRegioncreateNewHRegion(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.HRegioncreateNewHRegion(org.apache.hadoop.hbase.HTableDescriptor desc, byte[] startKey, byte[] endKey, org.apache.hadoop.conf.Configuration conf) Deprecated.protected org.apache.hadoop.hbase.HTableDescriptorcreateTableDescriptor(String name) Deprecated.Create a table of namenamewithCOLUMNSfor families.protected org.apache.hadoop.hbase.HTableDescriptorcreateTableDescriptor(String name, int versions) Deprecated.Create a table of namenamewithCOLUMNSfor families.protected org.apache.hadoop.hbase.HTableDescriptorcreateTableDescriptor(String name, int minVersions, int versions, int ttl, org.apache.hadoop.hbase.KeepDeletedCells keepDeleted) Deprecated.Create a table of namenamewithCOLUMNSfor families.protected org.apache.hadoop.fs.PathgetUnitTestdir(String testName) Deprecated.protected org.apache.hadoop.hbase.regionserver.HRegionopenClosedRegion(org.apache.hadoop.hbase.regionserver.HRegion closedRegion) Deprecated.protected voidsetUp()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 voidshutdownDfs(org.apache.hadoop.hdfs.MiniDFSCluster cluster) Deprecated.Common method to close down a MiniDFSCluster and the associated file systemprotected voidtearDown()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:
setUpin classjunit.framework.TestCase- Throws:
Exception
-
tearDown
Deprecated.- Overrides:
tearDownin 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 namenamewithCOLUMNSfor families.- Parameters:
name- Name to give table.- Returns:
- Column descriptor.
-
createTableDescriptor
Deprecated.Create a table of namenamewithCOLUMNSfor 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 namenamewithCOLUMNSfor 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 regionron 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 regionron 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 regionron 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 regionron 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.