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
Modifier and TypeFieldDescriptionstatic final byte[]
static final String
static final byte[]
static final String
static final byte[]
static final String
static final org.apache.hadoop.hbase.TableName
static final byte[]
static final String
static byte[]
static String
private static final char
private static final char
private static final byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
addContent
(org.apache.hadoop.hbase.client.Table updater, String columnFamily) Add content to regionr
on the passed columncolumn
.static long
addContent
(org.apache.hadoop.hbase.client.Table updater, String columnFamily, byte[] startKeyBytes, byte[] endKey) Add content to regionr
on the passed columncolumn
.static long
addContent
(org.apache.hadoop.hbase.client.Table updater, String family, String column) static long
addContent
(org.apache.hadoop.hbase.client.Table updater, String family, String column, byte[] startKeyBytes, byte[] endKey) static long
addContent
(org.apache.hadoop.hbase.client.Table updater, String columnFamily, String column, byte[] startKeyBytes, byte[] endKey, long ts) Add content to regionr
on the passed columncolumn
.static long
addContent
(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily) static long
addContent
(org.apache.hadoop.hbase.regionserver.Region r, byte[] columnFamily, byte[] column) Add content to regionr
on 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 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 - Throws:
IOException
-
addContent
public static long addContent(org.apache.hadoop.hbase.client.Table updater, String columnFamily) throws IOException 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 - 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 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 - 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 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
-