org.apache.blur.thrift.generated
Class TableDescriptor

java.lang.Object
  extended by org.apache.blur.thrift.generated.TableDescriptor
All Implemented Interfaces:
Serializable, Cloneable, Comparable<TableDescriptor>, TBase<TableDescriptor,TableDescriptor._Fields>

public class TableDescriptor
extends Object
implements TBase<TableDescriptor,TableDescriptor._Fields>, Serializable, Cloneable

The table descriptor defines the base structure of the table as well as properties need for setup.

See Also:
Serialized Form

Nested Class Summary
static class TableDescriptor._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 boolean blockCaching
          Should block cache be enable or disabled for this table.
 Set<String> blockCachingFileTypes
          The files extensions that you would like to allow block cache to cache.
 String cluster
          The cluster where this table should be created.
 boolean defaultMissingFieldLessIndexing
          If strict is not enabled, defines whether or not field less indexing is enabled on the newly created fields.
 Map<String,String> defaultMissingFieldProps
          If strict is not enabled, defines the properties to be used in the new field creation.
 String defaultMissingFieldType
          If strict is not enabled, the default field type.
 boolean enabled
          Is the table enabled or not, enabled by default.
static Map<TableDescriptor._Fields,FieldMetaData> metaDataMap
           
 String name
          The table name.
 List<String> preCacheCols
          This is a list of fields to prefetch into the blockcache.
 boolean readOnly
          If a table is set to be readonly, that means that mutates through Thrift are NOT allowed.
 int shardCount
          The number of shards within the given table.
 String similarityClass
          Sets the similarity class in Lucene.
 boolean strictTypes
          Whether strict types are enabled or not (default).
 Map<String,String> tableProperties
          The table properties that can modify the default behavior of the table.
 String tableUri
          The location where the table should be stored this can be "file:///" for a local instance of Blur or "hdfs://" for a distributed installation of Blur.
 
Constructor Summary
TableDescriptor()
           
TableDescriptor(boolean enabled, int shardCount, String tableUri, String cluster, String name, String similarityClass, boolean blockCaching, Set<String> blockCachingFileTypes, boolean readOnly, List<String> preCacheCols, Map<String,String> tableProperties, boolean strictTypes, String defaultMissingFieldType, boolean defaultMissingFieldLessIndexing, Map<String,String> defaultMissingFieldProps)
           
TableDescriptor(TableDescriptor other)
          Performs a deep copy on other.
 
Method Summary
 void addToBlockCachingFileTypes(String elem)
           
 void addToPreCacheCols(String elem)
           
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(TableDescriptor other)
           
 TableDescriptor deepCopy()
           
 boolean equals(Object that)
           
 boolean equals(TableDescriptor that)
           
 TableDescriptor._Fields fieldForId(int fieldId)
          Get the F instance that corresponds to fieldId.
 Set<String> getBlockCachingFileTypes()
          The files extensions that you would like to allow block cache to cache.
 Iterator<String> getBlockCachingFileTypesIterator()
           
 int getBlockCachingFileTypesSize()
           
 String getCluster()
          The cluster where this table should be created.
 Map<String,String> getDefaultMissingFieldProps()
          If strict is not enabled, defines the properties to be used in the new field creation.
 int getDefaultMissingFieldPropsSize()
           
 String getDefaultMissingFieldType()
          If strict is not enabled, the default field type.
 Object getFieldValue(TableDescriptor._Fields field)
          Get a field's value by field variable.
 String getName()
          The table name.
 List<String> getPreCacheCols()
          This is a list of fields to prefetch into the blockcache.
 Iterator<String> getPreCacheColsIterator()
           
 int getPreCacheColsSize()
           
 int getShardCount()
          The number of shards within the given table.
 String getSimilarityClass()
          Sets the similarity class in Lucene.
 Map<String,String> getTableProperties()
          The table properties that can modify the default behavior of the table.
 int getTablePropertiesSize()
           
 String getTableUri()
          The location where the table should be stored this can be "file:///" for a local instance of Blur or "hdfs://" for a distributed installation of Blur.
 int hashCode()
           
 boolean isBlockCaching()
          Should block cache be enable or disabled for this table.
 boolean isDefaultMissingFieldLessIndexing()
          If strict is not enabled, defines whether or not field less indexing is enabled on the newly created fields.
 boolean isEnabled()
          Is the table enabled or not, enabled by default.
 boolean isReadOnly()
          If a table is set to be readonly, that means that mutates through Thrift are NOT allowed.
 boolean isSet(TableDescriptor._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetBlockCaching()
          Returns true if field blockCaching is set (has been assigned a value) and false otherwise
 boolean isSetBlockCachingFileTypes()
          Returns true if field blockCachingFileTypes is set (has been assigned a value) and false otherwise
 boolean isSetCluster()
          Returns true if field cluster is set (has been assigned a value) and false otherwise
 boolean isSetDefaultMissingFieldLessIndexing()
          Returns true if field defaultMissingFieldLessIndexing is set (has been assigned a value) and false otherwise
 boolean isSetDefaultMissingFieldProps()
          Returns true if field defaultMissingFieldProps is set (has been assigned a value) and false otherwise
 boolean isSetDefaultMissingFieldType()
          Returns true if field defaultMissingFieldType is set (has been assigned a value) and false otherwise
 boolean isSetEnabled()
          Returns true if field enabled is set (has been assigned a value) and false otherwise
 boolean isSetName()
          Returns true if field name is set (has been assigned a value) and false otherwise
 boolean isSetPreCacheCols()
          Returns true if field preCacheCols is set (has been assigned a value) and false otherwise
 boolean isSetReadOnly()
          Returns true if field readOnly is set (has been assigned a value) and false otherwise
 boolean isSetShardCount()
          Returns true if field shardCount is set (has been assigned a value) and false otherwise
 boolean isSetSimilarityClass()
          Returns true if field similarityClass is set (has been assigned a value) and false otherwise
 boolean isSetStrictTypes()
          Returns true if field strictTypes is set (has been assigned a value) and false otherwise
 boolean isSetTableProperties()
          Returns true if field tableProperties is set (has been assigned a value) and false otherwise
 boolean isSetTableUri()
          Returns true if field tableUri is set (has been assigned a value) and false otherwise
 boolean isStrictTypes()
          Whether strict types are enabled or not (default).
 void putToDefaultMissingFieldProps(String key, String val)
           
 void putToTableProperties(String key, String val)
           
 void read(TProtocol iprot)
          Reads the TObject from the given input protocol.
 TableDescriptor setBlockCaching(boolean blockCaching)
          Should block cache be enable or disabled for this table.
 TableDescriptor setBlockCachingFileTypes(Set<String> blockCachingFileTypes)
          The files extensions that you would like to allow block cache to cache.
 void setBlockCachingFileTypesIsSet(boolean value)
           
 void setBlockCachingIsSet(boolean value)
           
 TableDescriptor setCluster(String cluster)
          The cluster where this table should be created.
 void setClusterIsSet(boolean value)
           
 TableDescriptor setDefaultMissingFieldLessIndexing(boolean defaultMissingFieldLessIndexing)
          If strict is not enabled, defines whether or not field less indexing is enabled on the newly created fields.
 void setDefaultMissingFieldLessIndexingIsSet(boolean value)
           
 TableDescriptor setDefaultMissingFieldProps(Map<String,String> defaultMissingFieldProps)
          If strict is not enabled, defines the properties to be used in the new field creation.
 void setDefaultMissingFieldPropsIsSet(boolean value)
           
 TableDescriptor setDefaultMissingFieldType(String defaultMissingFieldType)
          If strict is not enabled, the default field type.
 void setDefaultMissingFieldTypeIsSet(boolean value)
           
 TableDescriptor setEnabled(boolean enabled)
          Is the table enabled or not, enabled by default.
 void setEnabledIsSet(boolean value)
           
 void setFieldValue(TableDescriptor._Fields field, Object value)
          Set a field's value by field variable.
 TableDescriptor setName(String name)
          The table name.
 void setNameIsSet(boolean value)
           
 TableDescriptor setPreCacheCols(List<String> preCacheCols)
          This is a list of fields to prefetch into the blockcache.
 void setPreCacheColsIsSet(boolean value)
           
 TableDescriptor setReadOnly(boolean readOnly)
          If a table is set to be readonly, that means that mutates through Thrift are NOT allowed.
 void setReadOnlyIsSet(boolean value)
           
 TableDescriptor setShardCount(int shardCount)
          The number of shards within the given table.
 void setShardCountIsSet(boolean value)
           
 TableDescriptor setSimilarityClass(String similarityClass)
          Sets the similarity class in Lucene.
 void setSimilarityClassIsSet(boolean value)
           
 TableDescriptor setStrictTypes(boolean strictTypes)
          Whether strict types are enabled or not (default).
 void setStrictTypesIsSet(boolean value)
           
 TableDescriptor setTableProperties(Map<String,String> tableProperties)
          The table properties that can modify the default behavior of the table.
 void setTablePropertiesIsSet(boolean value)
           
 TableDescriptor setTableUri(String tableUri)
          The location where the table should be stored this can be "file:///" for a local instance of Blur or "hdfs://" for a distributed installation of Blur.
 void setTableUriIsSet(boolean value)
           
 String toString()
           
 void unsetBlockCaching()
           
 void unsetBlockCachingFileTypes()
           
 void unsetCluster()
           
 void unsetDefaultMissingFieldLessIndexing()
           
 void unsetDefaultMissingFieldProps()
           
 void unsetDefaultMissingFieldType()
           
 void unsetEnabled()
           
 void unsetName()
           
 void unsetPreCacheCols()
           
 void unsetReadOnly()
           
 void unsetShardCount()
           
 void unsetSimilarityClass()
           
 void unsetStrictTypes()
           
 void unsetTableProperties()
           
 void unsetTableUri()
           
 void validate()
           
 void write(TProtocol oprot)
          Writes the objects out to the protocol
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

enabled

public boolean enabled
Is the table enabled or not, enabled by default.


shardCount

public int shardCount
The number of shards within the given table.


tableUri

public String tableUri
The location where the table should be stored this can be "file:///" for a local instance of Blur or "hdfs://" for a distributed installation of Blur.


cluster

public String cluster
The cluster where this table should be created.


name

public String name
The table name.


similarityClass

public String similarityClass
Sets the similarity class in Lucene.


blockCaching

public boolean blockCaching
Should block cache be enable or disabled for this table.


blockCachingFileTypes

public Set<String> blockCachingFileTypes
The files extensions that you would like to allow block cache to cache. If null (default) everything is cached.


readOnly

public boolean readOnly
If a table is set to be readonly, that means that mutates through Thrift are NOT allowed. However updates through MapReduce are allowed and in fact they are only allowed if the table is in readOnly mode.


preCacheCols

public List<String> preCacheCols
This is a list of fields to prefetch into the blockcache. The format of the entries should be family dot column, "family.column".


tableProperties

public Map<String,String> tableProperties
The table properties that can modify the default behavior of the table. TODO: Document all options.


strictTypes

public boolean strictTypes
Whether strict types are enabled or not (default). If they are enabled no column can be added without first having it's type defined.


defaultMissingFieldType

public String defaultMissingFieldType
If strict is not enabled, the default field type.


defaultMissingFieldLessIndexing

public boolean defaultMissingFieldLessIndexing
If strict is not enabled, defines whether or not field less indexing is enabled on the newly created fields.


defaultMissingFieldProps

public Map<String,String> defaultMissingFieldProps
If strict is not enabled, defines the properties to be used in the new field creation.


metaDataMap

public static final Map<TableDescriptor._Fields,FieldMetaData> metaDataMap
Constructor Detail

TableDescriptor

public TableDescriptor()

TableDescriptor

public TableDescriptor(boolean enabled,
                       int shardCount,
                       String tableUri,
                       String cluster,
                       String name,
                       String similarityClass,
                       boolean blockCaching,
                       Set<String> blockCachingFileTypes,
                       boolean readOnly,
                       List<String> preCacheCols,
                       Map<String,String> tableProperties,
                       boolean strictTypes,
                       String defaultMissingFieldType,
                       boolean defaultMissingFieldLessIndexing,
                       Map<String,String> defaultMissingFieldProps)

TableDescriptor

public TableDescriptor(TableDescriptor other)
Performs a deep copy on other.

Method Detail

deepCopy

public TableDescriptor deepCopy()
Specified by:
deepCopy in interface TBase<TableDescriptor,TableDescriptor._Fields>

clear

public void clear()
Description copied from interface: TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface TBase<TableDescriptor,TableDescriptor._Fields>

isEnabled

public boolean isEnabled()
Is the table enabled or not, enabled by default.


setEnabled

public TableDescriptor setEnabled(boolean enabled)
Is the table enabled or not, enabled by default.


unsetEnabled

public void unsetEnabled()

isSetEnabled

public boolean isSetEnabled()
Returns true if field enabled is set (has been assigned a value) and false otherwise


setEnabledIsSet

public void setEnabledIsSet(boolean value)

getShardCount

public int getShardCount()
The number of shards within the given table.


setShardCount

public TableDescriptor setShardCount(int shardCount)
The number of shards within the given table.


unsetShardCount

public void unsetShardCount()

isSetShardCount

public boolean isSetShardCount()
Returns true if field shardCount is set (has been assigned a value) and false otherwise


setShardCountIsSet

public void setShardCountIsSet(boolean value)

getTableUri

public String getTableUri()
The location where the table should be stored this can be "file:///" for a local instance of Blur or "hdfs://" for a distributed installation of Blur.


setTableUri

public TableDescriptor setTableUri(String tableUri)
The location where the table should be stored this can be "file:///" for a local instance of Blur or "hdfs://" for a distributed installation of Blur.


unsetTableUri

public void unsetTableUri()

isSetTableUri

public boolean isSetTableUri()
Returns true if field tableUri is set (has been assigned a value) and false otherwise


setTableUriIsSet

public void setTableUriIsSet(boolean value)

getCluster

public String getCluster()
The cluster where this table should be created.


setCluster

public TableDescriptor setCluster(String cluster)
The cluster where this table should be created.


unsetCluster

public void unsetCluster()

isSetCluster

public boolean isSetCluster()
Returns true if field cluster is set (has been assigned a value) and false otherwise


setClusterIsSet

public void setClusterIsSet(boolean value)

getName

public String getName()
The table name.


setName

public TableDescriptor setName(String name)
The table name.


unsetName

public void unsetName()

isSetName

public boolean isSetName()
Returns true if field name is set (has been assigned a value) and false otherwise


setNameIsSet

public void setNameIsSet(boolean value)

getSimilarityClass

public String getSimilarityClass()
Sets the similarity class in Lucene.


setSimilarityClass

public TableDescriptor setSimilarityClass(String similarityClass)
Sets the similarity class in Lucene.


unsetSimilarityClass

public void unsetSimilarityClass()

isSetSimilarityClass

public boolean isSetSimilarityClass()
Returns true if field similarityClass is set (has been assigned a value) and false otherwise


setSimilarityClassIsSet

public void setSimilarityClassIsSet(boolean value)

isBlockCaching

public boolean isBlockCaching()
Should block cache be enable or disabled for this table.


setBlockCaching

public TableDescriptor setBlockCaching(boolean blockCaching)
Should block cache be enable or disabled for this table.


unsetBlockCaching

public void unsetBlockCaching()

isSetBlockCaching

public boolean isSetBlockCaching()
Returns true if field blockCaching is set (has been assigned a value) and false otherwise


setBlockCachingIsSet

public void setBlockCachingIsSet(boolean value)

getBlockCachingFileTypesSize

public int getBlockCachingFileTypesSize()

getBlockCachingFileTypesIterator

public Iterator<String> getBlockCachingFileTypesIterator()

addToBlockCachingFileTypes

public void addToBlockCachingFileTypes(String elem)

getBlockCachingFileTypes

public Set<String> getBlockCachingFileTypes()
The files extensions that you would like to allow block cache to cache. If null (default) everything is cached.


setBlockCachingFileTypes

public TableDescriptor setBlockCachingFileTypes(Set<String> blockCachingFileTypes)
The files extensions that you would like to allow block cache to cache. If null (default) everything is cached.


unsetBlockCachingFileTypes

public void unsetBlockCachingFileTypes()

isSetBlockCachingFileTypes

public boolean isSetBlockCachingFileTypes()
Returns true if field blockCachingFileTypes is set (has been assigned a value) and false otherwise


setBlockCachingFileTypesIsSet

public void setBlockCachingFileTypesIsSet(boolean value)

isReadOnly

public boolean isReadOnly()
If a table is set to be readonly, that means that mutates through Thrift are NOT allowed. However updates through MapReduce are allowed and in fact they are only allowed if the table is in readOnly mode.


setReadOnly

public TableDescriptor setReadOnly(boolean readOnly)
If a table is set to be readonly, that means that mutates through Thrift are NOT allowed. However updates through MapReduce are allowed and in fact they are only allowed if the table is in readOnly mode.


unsetReadOnly

public void unsetReadOnly()

isSetReadOnly

public boolean isSetReadOnly()
Returns true if field readOnly is set (has been assigned a value) and false otherwise


setReadOnlyIsSet

public void setReadOnlyIsSet(boolean value)

getPreCacheColsSize

public int getPreCacheColsSize()

getPreCacheColsIterator

public Iterator<String> getPreCacheColsIterator()

addToPreCacheCols

public void addToPreCacheCols(String elem)

getPreCacheCols

public List<String> getPreCacheCols()
This is a list of fields to prefetch into the blockcache. The format of the entries should be family dot column, "family.column".


setPreCacheCols

public TableDescriptor setPreCacheCols(List<String> preCacheCols)
This is a list of fields to prefetch into the blockcache. The format of the entries should be family dot column, "family.column".


unsetPreCacheCols

public void unsetPreCacheCols()

isSetPreCacheCols

public boolean isSetPreCacheCols()
Returns true if field preCacheCols is set (has been assigned a value) and false otherwise


setPreCacheColsIsSet

public void setPreCacheColsIsSet(boolean value)

getTablePropertiesSize

public int getTablePropertiesSize()

putToTableProperties

public void putToTableProperties(String key,
                                 String val)

getTableProperties

public Map<String,String> getTableProperties()
The table properties that can modify the default behavior of the table. TODO: Document all options.


setTableProperties

public TableDescriptor setTableProperties(Map<String,String> tableProperties)
The table properties that can modify the default behavior of the table. TODO: Document all options.


unsetTableProperties

public void unsetTableProperties()

isSetTableProperties

public boolean isSetTableProperties()
Returns true if field tableProperties is set (has been assigned a value) and false otherwise


setTablePropertiesIsSet

public void setTablePropertiesIsSet(boolean value)

isStrictTypes

public boolean isStrictTypes()
Whether strict types are enabled or not (default). If they are enabled no column can be added without first having it's type defined.


setStrictTypes

public TableDescriptor setStrictTypes(boolean strictTypes)
Whether strict types are enabled or not (default). If they are enabled no column can be added without first having it's type defined.


unsetStrictTypes

public void unsetStrictTypes()

isSetStrictTypes

public boolean isSetStrictTypes()
Returns true if field strictTypes is set (has been assigned a value) and false otherwise


setStrictTypesIsSet

public void setStrictTypesIsSet(boolean value)

getDefaultMissingFieldType

public String getDefaultMissingFieldType()
If strict is not enabled, the default field type.


setDefaultMissingFieldType

public TableDescriptor setDefaultMissingFieldType(String defaultMissingFieldType)
If strict is not enabled, the default field type.


unsetDefaultMissingFieldType

public void unsetDefaultMissingFieldType()

isSetDefaultMissingFieldType

public boolean isSetDefaultMissingFieldType()
Returns true if field defaultMissingFieldType is set (has been assigned a value) and false otherwise


setDefaultMissingFieldTypeIsSet

public void setDefaultMissingFieldTypeIsSet(boolean value)

isDefaultMissingFieldLessIndexing

public boolean isDefaultMissingFieldLessIndexing()
If strict is not enabled, defines whether or not field less indexing is enabled on the newly created fields.


setDefaultMissingFieldLessIndexing

public TableDescriptor setDefaultMissingFieldLessIndexing(boolean defaultMissingFieldLessIndexing)
If strict is not enabled, defines whether or not field less indexing is enabled on the newly created fields.


unsetDefaultMissingFieldLessIndexing

public void unsetDefaultMissingFieldLessIndexing()

isSetDefaultMissingFieldLessIndexing

public boolean isSetDefaultMissingFieldLessIndexing()
Returns true if field defaultMissingFieldLessIndexing is set (has been assigned a value) and false otherwise


setDefaultMissingFieldLessIndexingIsSet

public void setDefaultMissingFieldLessIndexingIsSet(boolean value)

getDefaultMissingFieldPropsSize

public int getDefaultMissingFieldPropsSize()

putToDefaultMissingFieldProps

public void putToDefaultMissingFieldProps(String key,
                                          String val)

getDefaultMissingFieldProps

public Map<String,String> getDefaultMissingFieldProps()
If strict is not enabled, defines the properties to be used in the new field creation.


setDefaultMissingFieldProps

public TableDescriptor setDefaultMissingFieldProps(Map<String,String> defaultMissingFieldProps)
If strict is not enabled, defines the properties to be used in the new field creation.


unsetDefaultMissingFieldProps

public void unsetDefaultMissingFieldProps()

isSetDefaultMissingFieldProps

public boolean isSetDefaultMissingFieldProps()
Returns true if field defaultMissingFieldProps is set (has been assigned a value) and false otherwise


setDefaultMissingFieldPropsIsSet

public void setDefaultMissingFieldPropsIsSet(boolean value)

setFieldValue

public void setFieldValue(TableDescriptor._Fields field,
                          Object value)
Description copied from interface: TBase
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.

Specified by:
setFieldValue in interface TBase<TableDescriptor,TableDescriptor._Fields>

getFieldValue

public Object getFieldValue(TableDescriptor._Fields field)
Description copied from interface: TBase
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.

Specified by:
getFieldValue in interface TBase<TableDescriptor,TableDescriptor._Fields>

isSet

public boolean isSet(TableDescriptor._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise

Specified by:
isSet in interface TBase<TableDescriptor,TableDescriptor._Fields>

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(TableDescriptor that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(TableDescriptor other)
Specified by:
compareTo in interface Comparable<TableDescriptor>

fieldForId

public TableDescriptor._Fields fieldForId(int fieldId)
Description copied from interface: TBase
Get the F instance that corresponds to fieldId.

Specified by:
fieldForId in interface TBase<TableDescriptor,TableDescriptor._Fields>

read

public void read(TProtocol iprot)
          throws TException
Description copied from interface: TBase
Reads the TObject from the given input protocol.

Specified by:
read in interface TBase<TableDescriptor,TableDescriptor._Fields>
Parameters:
iprot - Input protocol
Throws:
TException

write

public void write(TProtocol oprot)
           throws TException
Description copied from interface: TBase
Writes the objects out to the protocol

Specified by:
write in interface TBase<TableDescriptor,TableDescriptor._Fields>
Parameters:
oprot - Output protocol
Throws:
TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws TException
Throws:
TException


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.