|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.HColumnDescriptor
public class HColumnDescriptor
An HColumnDescriptor contains information about a column family such as the number of versions, compression settings, etc. It is used as input when creating a table or adding a column. Once set, the parameters that specify a column cannot be changed without deleting the column and recreating it. If there is data stored in the column, it will be deleted when the column is deleted.
| Nested Class Summary | |
|---|---|
static class |
HColumnDescriptor.CompressionType
The type of compression. |
| Field Summary | |
|---|---|
static BloomFilterDescriptor |
DEFAULT_BLOOM_FILTER_DESCRIPTOR
Default bloom filter description. |
static HColumnDescriptor.CompressionType |
DEFAULT_COMPRESSION_TYPE
Default compression type. |
static boolean |
DEFAULT_IN_MEMORY
Default setting for whether to serve from memory or not. |
static int |
DEFAULT_MAX_VALUE_LENGTH
Default maximum length of cell contents. |
static int |
DEFAULT_N_VERSIONS
Default number of versions of a record to keep. |
static Pattern |
LEGAL_FAMILY_NAME
Legal family names can only contain 'word characters' and end in a colon. |
| Constructor Summary | |
|---|---|
HColumnDescriptor()
Default constructor. |
|
HColumnDescriptor(String columnName)
Construct a column descriptor specifying only the family name The other attributes are defaulted. |
|
HColumnDescriptor(Text name,
int maxVersions,
HColumnDescriptor.CompressionType compression,
boolean inMemory,
int maxValueLength,
BloomFilterDescriptor bloomFilter)
Constructor Specify all parameters. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
|
boolean |
equals(Object obj)
|
BloomFilterDescriptor |
getBloomFilter()
|
HColumnDescriptor.CompressionType |
getCompression()
|
HColumnDescriptor.CompressionType |
getCompressionType()
|
Text |
getFamilyName()
|
int |
getMaxValueLength()
|
int |
getMaxVersions()
|
Text |
getName()
|
int |
hashCode()
|
boolean |
isInMemory()
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in. |
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to out. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Pattern LEGAL_FAMILY_NAME
public static final HColumnDescriptor.CompressionType DEFAULT_COMPRESSION_TYPE
public static final int DEFAULT_N_VERSIONS
public static final boolean DEFAULT_IN_MEMORY
public static final int DEFAULT_MAX_VALUE_LENGTH
public static final BloomFilterDescriptor DEFAULT_BLOOM_FILTER_DESCRIPTOR
| Constructor Detail |
|---|
public HColumnDescriptor()
public HColumnDescriptor(String columnName)
columnName - - column family name
public HColumnDescriptor(Text name,
int maxVersions,
HColumnDescriptor.CompressionType compression,
boolean inMemory,
int maxValueLength,
BloomFilterDescriptor bloomFilter)
name - Column family namemaxVersions - Maximum number of versions to keepcompression - Compression typeinMemory - If true, column data should be kept in an HRegionServer's
cachemaxValueLength - Restrict values to <= this valuebloomFilter - Enable the specified bloom filter for this column
IllegalArgumentException - if passed a family name that is made of
other than 'word' characters: i.e. [a-zA-Z_0-9] and does not
end in a :
IllegalArgumentException - if the number of versions is <= 0| Method Detail |
|---|
public Text getName()
public Text getFamilyName()
public HColumnDescriptor.CompressionType getCompression()
public int getMaxVersions()
public HColumnDescriptor.CompressionType getCompressionType()
public boolean isInMemory()
public int getMaxValueLength()
public BloomFilterDescriptor getBloomFilter()
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void readFields(DataInput in)
throws IOException
in.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.
IOException
public void write(DataOutput out)
throws IOException
out.
write in interface Writableout - DataOuput to serialize this object into.
IOExceptionpublic int compareTo(Object o)
compareTo in interface Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||