Package org.apache.hadoop.hbase
Class HTestConst
java.lang.Object
org.apache.hadoop.hbase.HTestConst
Similar to
HConstants but for tests. Also provides some simple static utility functions
to generate test data.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]static final Stringstatic final byte[]static final Stringstatic final byte[]static final Stringstatic final org.apache.hadoop.hbase.TableNamestatic final byte[]static final Stringstatic byte[]static Stringprivate static final charprivate static final charprivate static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longaddContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily) Add content to regionron the passed columncolumn.static longaddContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, byte[] startKeyBytes, byte[] endKey) Add content to regionron the passed columncolumn.static longaddContent(org.apache.hadoop.hbase.client.Table updater, String family, String column) static longaddContent(org.apache.hadoop.hbase.client.Table updater, String family, String column, byte[] startKeyBytes, byte[] endKey) static longaddContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, String column, byte[] startKeyBytes, byte[] endKey, long ts) Add content to regionron the passed columncolumn.static longaddContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily) static longaddContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily, byte[] column) Add content to regionron the passed columncolumn.static byte[][]makeNAscii(byte[] base, int n) Generate the given number of unique byte sequences by appending numeric suffixes (ASCII representations of decimal numbers).
-
Field Details
-
DEFAULT_TABLE_STR
- See Also:
-
DEFAULT_TABLE_BYTES
-
DEFAULT_TABLE
-
DEFAULT_CF_STR
- See Also:
-
DEFAULT_CF_BYTES
-
DEFAULT_CF_STR_SET
-
DEFAULT_ROW_STR
- See Also:
-
DEFAULT_ROW_BYTES
-
DEFAULT_QUALIFIER_STR
- See Also:
-
DEFAULT_QUALIFIER_BYTES
-
DEFAULT_VALUE_STR
-
DEFAULT_VALUE_BYTES
-
FIRST_CHAR
- See Also:
-
LAST_CHAR
- See Also:
-
START_KEY_BYTES
-
-
Constructor Details
-
HTestConst
private HTestConst()
-
-
Method Details
-
makeNAscii
Generate the given number of unique byte sequences by appending numeric suffixes (ASCII representations of decimal numbers). -
addContent
public static long addContent(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily, byte[] column) throws IOException 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 - Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily) throws IOException 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 - Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily, byte[] startKeyBytes, byte[] endKey) throws IOException 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 - 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 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
-