|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.migration.v5.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 String |
BLOCKCACHE
|
static String |
BLOOMFILTER
|
static String |
COMPRESSION
|
static boolean |
DEFAULT_BLOCKCACHE
Default setting for whether to use a block cache or not. |
static boolean |
DEFAULT_BLOOMFILTER
Default setting for whether or not to use bloomfilters. |
static HColumnDescriptor.CompressionType |
DEFAULT_COMPRESSION
Default compression type. |
static boolean |
DEFAULT_IN_MEMORY
Default setting for whether to serve from memory or not. |
static int |
DEFAULT_LENGTH
Default maximum cell length. |
static int |
DEFAULT_TTL
Default time to live of cell contents. |
static int |
DEFAULT_VERSIONS
Default number of versions of a record to keep. |
static String |
FOREVER
|
static String |
IN_MEMORY
|
static String |
LENGTH
|
static String |
TTL
|
Constructor Summary | |
---|---|
HColumnDescriptor()
Default constructor. |
|
HColumnDescriptor(byte[] columnName)
Construct a column descriptor specifying only the family name The other attributes are defaulted. |
|
HColumnDescriptor(byte[] columnName,
int maxVersions,
HColumnDescriptor.CompressionType compression,
boolean inMemory,
boolean blockCacheEnabled,
int maxValueLength,
int timeToLive,
boolean bloomFilter)
Constructor |
|
HColumnDescriptor(String columnName)
Construct a column descriptor specifying only the family name The other attributes are defaulted. |
|
HColumnDescriptor(org.apache.hadoop.io.Text columnName)
Construct a column descriptor specifying only the family name The other attributes are defaulted. |
Method Summary | |
---|---|
int |
compareTo(Object o)
|
boolean |
equals(Object obj)
|
HColumnDescriptor.CompressionType |
getCompression()
|
HColumnDescriptor.CompressionType |
getCompressionType()
|
int |
getMaxValueLength()
|
int |
getMaxVersions()
|
byte[] |
getName()
|
String |
getNameAsString()
|
int |
getTimeToLive()
|
int |
hashCode()
|
boolean |
isBlockCacheEnabled()
|
boolean |
isBloomFilterEnabled()
|
boolean |
isInMemory()
|
static byte[] |
isLegalFamilyName(byte[] b)
|
void |
readFields(DataInput in)
|
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 String COMPRESSION
public static final String IN_MEMORY
public static final String BLOCKCACHE
public static final String LENGTH
public static final String TTL
public static final String BLOOMFILTER
public static final String FOREVER
public static final HColumnDescriptor.CompressionType DEFAULT_COMPRESSION
public static final int DEFAULT_VERSIONS
public static final int DEFAULT_LENGTH
public static final boolean DEFAULT_IN_MEMORY
public static final boolean DEFAULT_BLOCKCACHE
public static final boolean DEFAULT_BLOOMFILTER
public static final int DEFAULT_TTL
Constructor Detail |
---|
public HColumnDescriptor()
public HColumnDescriptor(String columnName)
columnName
- - column family namepublic HColumnDescriptor(org.apache.hadoop.io.Text columnName)
columnName
- - column family namepublic HColumnDescriptor(byte[] columnName)
columnName
- Column family name. Must have the ':' ending.public HColumnDescriptor(byte[] columnName, int maxVersions, HColumnDescriptor.CompressionType compression, boolean inMemory, boolean blockCacheEnabled, int maxValueLength, int timeToLive, boolean bloomFilter)
columnName
- Column family name. Must have the ':' ending.maxVersions
- Maximum number of versions to keepcompression
- Compression typeinMemory
- If true, column data should be kept in an HRegionServer's
cacheblockCacheEnabled
- If true, MapFile blocks should be cachedmaxValueLength
- Restrict values to <= this valuetimeToLive
- Time-to-live of cell contents, in seconds from last timestamp
(use HConstants.FOREVER for unlimited TTL)bloomFilter
- 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 <= 0Method Detail |
---|
public static byte[] isLegalFamilyName(byte[] b)
b
- Family name.
b
IllegalArgumentException
- If not null and not a legitimate family
name: i.e. 'printable' and ends in a ':' (Null passes are allowed because
b
can be null when deserializing).public byte[] getName()
public String getNameAsString()
public HColumnDescriptor.CompressionType getCompression()
public int getMaxVersions()
public HColumnDescriptor.CompressionType getCompressionType()
public boolean isInMemory()
public int getMaxValueLength()
public int getTimeToLive()
public boolean isBlockCacheEnabled()
public boolean isBloomFilterEnabled()
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
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(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |