org.apache.hadoop.hbase.client
Class UnmodifyableHTableDescriptor

java.lang.Object
  extended by org.apache.hadoop.hbase.HTableDescriptor
      extended by org.apache.hadoop.hbase.client.UnmodifyableHTableDescriptor
All Implemented Interfaces:
Comparable<HTableDescriptor>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<HTableDescriptor>

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class UnmodifyableHTableDescriptor
extends HTableDescriptor

Read-only table descriptor.


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.HTableDescriptor
COMPACTION_ENABLED, DEFAULT_COMPACTION_ENABLED, DEFAULT_MEMSTORE_FLUSH_SIZE, DEFAULT_READONLY, DEFERRED_LOG_FLUSH, DURABILITY, IS_META, IS_ROOT, MAX_FILESIZE, MEMSTORE_FLUSHSIZE, META_TABLEDESC, NAMESPACE_COL_DESC_BYTES, NAMESPACE_FAMILY_INFO, NAMESPACE_FAMILY_INFO_BYTES, NAMESPACE_TABLEDESC, OWNER, OWNER_KEY, PRIORITY, READONLY, SPLIT_POLICY
 
Constructor Summary
UnmodifyableHTableDescriptor()
          Default constructor
 
Method Summary
 void addFamily(HColumnDescriptor family)
          Does NOT add a column family.
 HColumnDescriptor removeFamily(byte[] column)
          Removes the HColumnDescriptor with name specified by the parameter column from the table descriptor
 void setMaxFileSize(long maxFileSize)
          Sets the maximum size upto which a region can grow to after which a region split is triggered.
 void setMemStoreFlushSize(long memstoreFlushSize)
          Represents the maximum size of the memstore after which the contents of the memstore are flushed to the filesystem.
 void setReadOnly(boolean readOnly)
          Setting the table as read only sets all the columns in the table as read only.
 void setValue(byte[] key, byte[] value)
          Setter for storing metadata as a (key, value) pair in HTableDescriptor.values map
 void setValue(String key, String value)
          Setter for storing metadata as a (key, value) pair in HTableDescriptor.values map
 
Methods inherited from class org.apache.hadoop.hbase.HTableDescriptor
addCoprocessor, addCoprocessor, addCoprocessorWithSpec, compareTo, convert, convert, equals, getColumnFamilies, getConfiguration, getConfigurationValue, getCoprocessors, getDurability, getFamilies, getFamiliesKeys, getFamily, getMaxFileSize, getMemStoreFlushSize, getName, getNameAsString, getOwnerString, getPriority, getRegionSplitPolicyClassName, getTableDir, getTableName, getValue, getValue, getValues, hasCoprocessor, hasFamily, hashCode, isCompactionEnabled, isDeferredLogFlush, isMetaRegion, isMetaTable, isReadOnly, isRootRegion, metaTableDescriptor, parseFrom, readFields, remove, remove, remove, removeConfiguration, removeCoprocessor, setCompactionEnabled, setConfiguration, setDeferredLogFlush, setDurability, setMetaRegion, setName, setName, setOwner, setOwnerString, setPriority, setRegionSplitPolicyClassName, setRootRegion, setValue, toByteArray, toString, toStringCustomizedValues, toStringTableAttributes, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnmodifyableHTableDescriptor

public UnmodifyableHTableDescriptor()
Default constructor

Method Detail

addFamily

public void addFamily(HColumnDescriptor family)
Does NOT add a column family. This object is immutable

Overrides:
addFamily in class HTableDescriptor
Parameters:
family - HColumnDescriptor of familyto add.

removeFamily

public HColumnDescriptor removeFamily(byte[] column)
Description copied from class: HTableDescriptor
Removes the HColumnDescriptor with name specified by the parameter column from the table descriptor

Overrides:
removeFamily in class HTableDescriptor
Parameters:
column -
Returns:
Column descriptor for the passed family name or the family on passed in column.

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from class: HTableDescriptor
Setting the table as read only sets all the columns in the table as read only. By default all tables are modifiable, but if the readOnly flag is set to true then the contents of the table can only be read but not modified.

Overrides:
setReadOnly in class HTableDescriptor
Parameters:
readOnly - True if all of the columns in the table should be read only.
See Also:
HTableDescriptor.setReadOnly(boolean)

setValue

public void setValue(byte[] key,
                     byte[] value)
Description copied from class: HTableDescriptor
Setter for storing metadata as a (key, value) pair in HTableDescriptor.values map

Overrides:
setValue in class HTableDescriptor
Parameters:
key - The key.
value - The value.
See Also:
HTableDescriptor.setValue(byte[], byte[])

setValue

public void setValue(String key,
                     String value)
Description copied from class: HTableDescriptor
Setter for storing metadata as a (key, value) pair in HTableDescriptor.values map

Overrides:
setValue in class HTableDescriptor
Parameters:
key - The key.
value - The value.
See Also:
HTableDescriptor.setValue(java.lang.String, java.lang.String)

setMaxFileSize

public void setMaxFileSize(long maxFileSize)
Description copied from class: HTableDescriptor
Sets the maximum size upto which a region can grow to after which a region split is triggered. The region size is represented by the size of the biggest store file in that region, i.e. If the biggest store file grows beyond the maxFileSize, then the region split is triggered. This defaults to a value of 256 MB.

This is not an absolute value and might vary. Assume that a single row exceeds the maxFileSize then the storeFileSize will be greater than maxFileSize since a single row cannot be split across multiple regions

Overrides:
setMaxFileSize in class HTableDescriptor
Parameters:
maxFileSize - The maximum file size that a store file can grow to before a split is triggered.
See Also:
HTableDescriptor.setMaxFileSize(long)

setMemStoreFlushSize

public void setMemStoreFlushSize(long memstoreFlushSize)
Description copied from class: HTableDescriptor
Represents the maximum size of the memstore after which the contents of the memstore are flushed to the filesystem. This defaults to a size of 64 MB.

Overrides:
setMemStoreFlushSize in class HTableDescriptor
Parameters:
memstoreFlushSize - memory cache flush size for each hregion
See Also:
HTableDescriptor.setMemStoreFlushSize(long)


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.