|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.HTableDescriptor
public class HTableDescriptor
HTableDescriptor contains the name of an HTable, and its column families.
Field Summary | |
---|---|
static boolean |
DEFAULT_DEFERRED_LOG_FLUSH
|
static long |
DEFAULT_MAX_FILESIZE
|
static long |
DEFAULT_MEMSTORE_FLUSH_SIZE
|
static boolean |
DEFAULT_READONLY
|
static String |
DEFERRED_LOG_FLUSH
|
static ImmutableBytesWritable |
DEFERRED_LOG_FLUSH_KEY
|
Map<byte[],HColumnDescriptor> |
families
|
static String |
FAMILIES
|
static ImmutableBytesWritable |
FAMILIES_KEY
|
static String |
IS_META
|
static ImmutableBytesWritable |
IS_META_KEY
|
static String |
IS_ROOT
|
static ImmutableBytesWritable |
IS_ROOT_KEY
|
static String |
MAX_FILESIZE
|
static ImmutableBytesWritable |
MAX_FILESIZE_KEY
|
static String |
MEMSTORE_FLUSHSIZE
|
static ImmutableBytesWritable |
MEMSTORE_FLUSHSIZE_KEY
|
static HTableDescriptor |
META_TABLEDESC
Table descriptor for .META. catalog table |
static String |
READONLY
|
static ImmutableBytesWritable |
READONLY_KEY
|
static HTableDescriptor |
ROOT_TABLEDESC
Table descriptor for |
static byte |
TABLE_DESCRIPTOR_VERSION
|
protected Map<ImmutableBytesWritable,ImmutableBytesWritable> |
values
|
Constructor Summary | |
---|---|
|
HTableDescriptor()
Constructs an empty object. |
|
HTableDescriptor(byte[] name)
Constructor. |
protected |
HTableDescriptor(byte[] name,
HColumnDescriptor[] families)
Private constructor used internally creating table descriptors for catalog tables: e.g. |
protected |
HTableDescriptor(byte[] name,
HColumnDescriptor[] families,
Map<ImmutableBytesWritable,ImmutableBytesWritable> values)
Private constructor used internally creating table descriptors for catalog tables: e.g. |
|
HTableDescriptor(HTableDescriptor desc)
Constructor. |
|
HTableDescriptor(String name)
Constructor. |
Method Summary | |
---|---|
void |
addFamily(HColumnDescriptor family)
Adds a column family. |
int |
compareTo(HTableDescriptor other)
|
boolean |
equals(Object obj)
|
HColumnDescriptor[] |
getColumnFamilies()
|
Collection<HColumnDescriptor> |
getFamilies()
|
Set<byte[]> |
getFamiliesKeys()
|
HColumnDescriptor |
getFamily(byte[] column)
|
long |
getMaxFileSize()
|
long |
getMemStoreFlushSize()
|
byte[] |
getName()
|
String |
getNameAsString()
|
static org.apache.hadoop.fs.Path |
getTableDir(org.apache.hadoop.fs.Path rootdir,
byte[] tableName)
|
byte[] |
getValue(byte[] key)
|
String |
getValue(String key)
|
Map<ImmutableBytesWritable,ImmutableBytesWritable> |
getValues()
|
boolean |
hasFamily(byte[] c)
Checks to see if this table contains the given column family |
int |
hashCode()
|
boolean |
isDeferredLogFlush()
|
static byte[] |
isLegalTableName(byte[] b)
Check passed buffer is legal user-space table name. |
boolean |
isMetaRegion()
|
boolean |
isMetaTable()
|
static boolean |
isMetaTable(byte[] n)
|
boolean |
isReadOnly()
|
boolean |
isRootRegion()
|
void |
readFields(DataInput in)
|
void |
remove(byte[] key)
|
HColumnDescriptor |
removeFamily(byte[] column)
|
void |
setDeferredLogFlush(boolean isDeferredLogFlush)
|
void |
setMaxFileSize(long maxFileSize)
|
void |
setMemStoreFlushSize(long memstoreFlushSize)
|
protected void |
setMetaRegion(boolean isMeta)
|
void |
setName(byte[] name)
|
void |
setReadOnly(boolean readOnly)
|
protected void |
setRootRegion(boolean isRoot)
|
void |
setValue(byte[] key,
byte[] value)
|
void |
setValue(String key,
String value)
|
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte TABLE_DESCRIPTOR_VERSION
protected Map<ImmutableBytesWritable,ImmutableBytesWritable> values
public static final String FAMILIES
public static final ImmutableBytesWritable FAMILIES_KEY
public static final String MAX_FILESIZE
public static final ImmutableBytesWritable MAX_FILESIZE_KEY
public static final String READONLY
public static final ImmutableBytesWritable READONLY_KEY
public static final String MEMSTORE_FLUSHSIZE
public static final ImmutableBytesWritable MEMSTORE_FLUSHSIZE_KEY
public static final String IS_ROOT
public static final ImmutableBytesWritable IS_ROOT_KEY
public static final String IS_META
public static final ImmutableBytesWritable IS_META_KEY
public static final String DEFERRED_LOG_FLUSH
public static final ImmutableBytesWritable DEFERRED_LOG_FLUSH_KEY
public static final boolean DEFAULT_READONLY
public static final long DEFAULT_MEMSTORE_FLUSH_SIZE
public static final long DEFAULT_MAX_FILESIZE
public static final boolean DEFAULT_DEFERRED_LOG_FLUSH
public final Map<byte[],HColumnDescriptor> families
public static final HTableDescriptor ROOT_TABLEDESC
public static final HTableDescriptor META_TABLEDESC
.META.
catalog table
Constructor Detail |
---|
protected HTableDescriptor(byte[] name, HColumnDescriptor[] families)
protected HTableDescriptor(byte[] name, HColumnDescriptor[] families, Map<ImmutableBytesWritable,ImmutableBytesWritable> values)
public HTableDescriptor()
HTableDescriptor(byte[])
public HTableDescriptor(String name)
name
- Table name.
IllegalArgumentException
- if passed a table name
that is made of other than 'word' characters, underscore or period: i.e.
[a-zA-Z_0-9.].- See Also:
- HADOOP-1581 HBASE: Un-openable tablename bug
public HTableDescriptor(byte[] name)
name
- Table name.
IllegalArgumentException
- if passed a table name
that is made of other than 'word' characters, underscore or period: i.e.
[a-zA-Z_0-9-.].- See Also:
- HADOOP-1581 HBASE: Un-openable tablename bug
public HTableDescriptor(HTableDescriptor desc)
Makes a deep copy of the supplied descriptor. Can make a modifiable descriptor from an UnmodifyableHTableDescriptor.
desc
- The descriptor.Method Detail |
---|
public boolean isRootRegion()
protected void setRootRegion(boolean isRoot)
isRoot
- true if this is the root regionpublic boolean isMetaRegion()
protected void setMetaRegion(boolean isMeta)
isMeta
- true if this is a meta region (part of the root or meta
tables)public boolean isMetaTable()
public static boolean isMetaTable(byte[] n)
n
- Table name.
public static byte[] isLegalTableName(byte[] b)
b
- Table name.
b
param
NullPointerException
- If passed b
is null
IllegalArgumentException
- if passed a table name
that is made of other than 'word' characters or underscores: i.e.
[a-zA-Z_0-9].
public byte[] getValue(byte[] key)
key
- The key.
public String getValue(String key)
key
- The key.
public Map<ImmutableBytesWritable,ImmutableBytesWritable> getValues()
public void setValue(byte[] key, byte[] value)
key
- The key.value
- The value.public void setValue(String key, String value)
key
- The key.value
- The value.public void remove(byte[] key)
key
- Key whose key and value we're to remove from HTD parameters.public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly
- True if all of the columns in the table should be read
only.public boolean isDeferredLogFlush()
public void setDeferredLogFlush(boolean isDeferredLogFlush)
isDeferredLogFlush
- true if that table's log is hlfush by oter means
only.public byte[] getName()
public String getNameAsString()
public long getMaxFileSize()
public void setName(byte[] name)
name
- name of tablepublic void setMaxFileSize(long maxFileSize)
maxFileSize
- The maximum file size that a store file can grow to
before a split is triggered.public long getMemStoreFlushSize()
public void setMemStoreFlushSize(long memstoreFlushSize)
memstoreFlushSize
- memory cache flush size for each hregionpublic void addFamily(HColumnDescriptor family)
family
- HColumnDescriptor of familyto add.public boolean hasFamily(byte[] c)
c
- Family name or column name.
public String toString()
toString
in class Object
getNameAsString()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(HTableDescriptor other)
compareTo
in interface Comparable<HTableDescriptor>
public Collection<HColumnDescriptor> getFamilies()
public Set<byte[]> getFamiliesKeys()
public HColumnDescriptor[] getColumnFamilies()
public HColumnDescriptor getFamily(byte[] column)
column
-
public HColumnDescriptor removeFamily(byte[] column)
column
-
public static org.apache.hadoop.fs.Path getTableDir(org.apache.hadoop.fs.Path rootdir, byte[] tableName)
rootdir
- qualified path of HBase root directorytableName
- name of table
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |