|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.TableName
@InterfaceAudience.Public @InterfaceStability.Evolving public final class TableName
Immutable POJO class for representing a table name. Which is of the form: <table namespace>:<table qualifier> Two special namespaces: 1. hbase - system namespace, used to contain hbase internal tables 2. default - tables with no explicit specified namespace will automatically fall into this namespace. ie a) foo:bar, means namespace=foo and qualifier=bar b) bar, means namespace=default and qualifier=bar c) default:bar, means namespace=default and qualifier=bar
Field Summary | |
---|---|
static TableName |
META_TABLE_NAME
The META table's name. |
static char |
NAMESPACE_DELIM
Namespace delimiter |
static TableName |
NAMESPACE_TABLE_NAME
The Namespace table's name. |
static TableName |
ROOT_TABLE_NAME
The root table's name. |
static String |
VALID_NAMESPACE_REGEX
|
static String |
VALID_TABLE_QUALIFIER_REGEX
|
static String |
VALID_USER_TABLE_REGEX
|
Method Summary | |
---|---|
int |
compareTo(TableName tableName)
|
boolean |
equals(Object o)
|
byte[] |
getName()
|
String |
getNameAsString()
|
byte[] |
getNamespace()
|
String |
getNamespaceAsString()
|
byte[] |
getQualifier()
|
String |
getQualifierAsString()
|
int |
hashCode()
|
static byte[] |
isLegalFullyQualifiedTableName(byte[] tableName)
Check passed byte array, "tableName", is legal user-space table name. |
static void |
isLegalNamespaceName(byte[] namespaceName)
|
static void |
isLegalNamespaceName(byte[] namespaceName,
int offset,
int length)
Valid namespace characters are [a-zA-Z_0-9] |
static void |
isLegalTableQualifierName(byte[] qualifierName)
|
static void |
isLegalTableQualifierName(byte[] qualifierName,
int start,
int end)
Qualifier names can only contain 'word' characters [a-zA-Z_0-9] or '_', '.' or '-'. |
byte[] |
toBytes()
|
String |
toString()
|
static TableName |
valueOf(byte[] name)
|
static TableName |
valueOf(byte[] namespace,
byte[] qualifier)
|
static TableName |
valueOf(String name)
|
static TableName |
valueOf(String namespaceAsString,
String qualifierAsString)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char NAMESPACE_DELIM
public static final String VALID_NAMESPACE_REGEX
public static final String VALID_TABLE_QUALIFIER_REGEX
public static final String VALID_USER_TABLE_REGEX
public static final TableName ROOT_TABLE_NAME
public static final TableName META_TABLE_NAME
public static final TableName NAMESPACE_TABLE_NAME
Method Detail |
---|
public static byte[] isLegalFullyQualifiedTableName(byte[] tableName)
tableName
param
IllegalArgumentException
- if passed a tableName is null or
is made of other than 'word' characters or underscores: i.e.
[a-zA-Z_0-9.-:]
. The ':' is used to delimit the namespace
from the table name and can be used for nothing else.
Namespace names can only contain 'word' characters
[a-zA-Z_0-9]
or '_'
Qualifier names can only contain 'word' characters
[a-zA-Z_0-9]
or '_', '.' or '-'.
The name may not start with '.' or '-'.
Valid fully qualified table names:
foo:bar, namespace=>foo, table=>bar
org:foo.bar, namespace=org, table=>foo.barpublic static void isLegalTableQualifierName(byte[] qualifierName)
public static void isLegalTableQualifierName(byte[] qualifierName, int start, int end)
[a-zA-Z_0-9]
or '_', '.' or '-'.
The name may not start with '.' or '-'.
qualifierName
- byte array containing the qualifier namestart
- start indexend
- end index (exclusive)public static void isLegalNamespaceName(byte[] namespaceName)
public static void isLegalNamespaceName(byte[] namespaceName, int offset, int length)
namespaceName
- offset
- length
- public byte[] getName()
public String getNameAsString()
public byte[] getNamespace()
public String getNamespaceAsString()
public byte[] getQualifier()
public String getQualifierAsString()
public byte[] toBytes()
public String toString()
toString
in class Object
public static TableName valueOf(byte[] namespace, byte[] qualifier)
public static TableName valueOf(String namespaceAsString, String qualifierAsString)
public static TableName valueOf(byte[] name)
public static TableName valueOf(String name)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(TableName tableName)
compareTo
in interface Comparable<TableName>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |