|
||||||||||
| 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.
| 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,
java.util.Map<ImmutableBytesWritable,ImmutableBytesWritable> values)
Private constructor used internally creating table descriptors for catalog tables: e.g. |
|
HTableDescriptor(HTableDescriptor desc)
Constructor. |
|
HTableDescriptor(java.lang.String name)
Constructor. |
| Method Summary | |
|---|---|
void |
addFamily(HColumnDescriptor family)
Adds a column family. |
int |
compareTo(HTableDescriptor other)
|
boolean |
equals(java.lang.Object obj)
|
HColumnDescriptor[] |
getColumnFamilies()
|
java.util.Collection<HColumnDescriptor> |
getFamilies()
|
java.util.Set<byte[]> |
getFamiliesKeys()
|
HColumnDescriptor |
getFamily(byte[] column)
|
long |
getMaxFileSize()
|
long |
getMemStoreFlushSize()
|
byte[] |
getName()
|
java.lang.String |
getNameAsString()
|
static org.apache.hadoop.fs.Path |
getTableDir(org.apache.hadoop.fs.Path rootdir,
byte[] tableName)
|
byte[] |
getValue(byte[] key)
|
java.lang.String |
getValue(java.lang.String key)
|
java.util.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(java.io.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(java.lang.String key,
java.lang.String value)
|
java.lang.String |
toString()
|
void |
write(java.io.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 java.util.Map<ImmutableBytesWritable,ImmutableBytesWritable> values
public static final java.lang.String FAMILIES
public static final ImmutableBytesWritable FAMILIES_KEY
public static final java.lang.String MAX_FILESIZE
public static final ImmutableBytesWritable MAX_FILESIZE_KEY
public static final java.lang.String READONLY
public static final ImmutableBytesWritable READONLY_KEY
public static final java.lang.String MEMSTORE_FLUSHSIZE
public static final ImmutableBytesWritable MEMSTORE_FLUSHSIZE_KEY
public static final java.lang.String IS_ROOT
public static final ImmutableBytesWritable IS_ROOT_KEY
public static final java.lang.String IS_META
public static final ImmutableBytesWritable IS_META_KEY
public static final java.lang.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 java.util.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,
java.util.Map<ImmutableBytesWritable,ImmutableBytesWritable> values)
public HTableDescriptor()
HTableDescriptor(byte[])public HTableDescriptor(java.lang.String name)
name - Table name.
java.lang.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.
java.lang.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
java.lang.NullPointerException - If passed b is null
java.lang.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 java.lang.String getValue(java.lang.String key)
key - The key.
public java.util.Map<ImmutableBytesWritable,ImmutableBytesWritable> getValues()
public void setValue(byte[] key,
byte[] value)
key - The key.value - The value.
public void setValue(java.lang.String key,
java.lang.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 java.lang.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 java.lang.String toString()
toString in class java.lang.ObjectgetNameAsString()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
public void readFields(java.io.DataInput in)
throws java.io.IOException
readFields in interface org.apache.hadoop.io.Writablejava.io.IOException
public void write(java.io.DataOutput out)
throws java.io.IOException
write in interface org.apache.hadoop.io.Writablejava.io.IOExceptionpublic int compareTo(HTableDescriptor other)
compareTo in interface java.lang.Comparable<HTableDescriptor>public java.util.Collection<HColumnDescriptor> getFamilies()
public java.util.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 | |||||||||