Package uk.gov.gchq.gaffer.accumulostore
Class AccumuloProperties
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.StoreProperties
-
- uk.gov.gchq.gaffer.accumulostore.AccumuloProperties
-
- All Implemented Interfaces:
Cloneable
public class AccumuloProperties extends StoreProperties
AnAccumuloPropertiescontains specific configuration information for theAccumuloStore, such as database connection strings. It wrapsPropertiesand lazy loads the all properties from a file when first used.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLIENT_SIDE_BLOOM_FILTER_SIZEstatic StringENABLE_KERBEROSstatic StringENABLE_KERBEROS_DEFAULTstatic StringENABLE_VALIDATOR_ITERATORstatic StringENABLE_VALIDATOR_ITERATOR_DEFAULTstatic StringFALSE_POSITIVE_RATEstatic StringHDFS_SKIP_PERMISSIONSstatic StringINSTANCE_NAMEstatic StringKEY_PACKAGE_CLASSstatic StringKEYTAB_PATHstatic StringMAX_BLOOM_FILTER_TO_PASS_TO_AN_ITERATORstatic StringMAX_BUFFER_SIZE_FOR_BATCH_WRITERstatic StringMAX_ENTRIES_FOR_BATCH_SCANNERstatic StringMAX_TIME_OUT_FOR_BATCH_WRITERstatic StringNAMESPACEstatic StringNUM_THREADS_FOR_BATCH_WRITERstatic StringPASSWORDstatic StringPRINCIPALstatic StringTABLE_CREATED_TIMEstatic StringTABLE_REPLICATION_FACTORstatic StringTHREADS_FOR_BATCH_SCANNERstatic StringUSERstatic StringZOOKEEPERS-
Fields inherited from class uk.gov.gchq.gaffer.store.StoreProperties
ADMIN_AUTH, EXECUTOR_SERVICE_THREAD_COUNT, EXECUTOR_SERVICE_THREAD_COUNT_DEFAULT, GAFFER_NAMED_OPERATION_NESTED, JOB_TRACKER_ENABLED, JSON_SERIALISER_CLASS, JSON_SERIALISER_MODULES, NAMED_OPERATION_ENABLED, NAMED_VIEW_ENABLED, OPERATION_DECLARATIONS, OPERATION_DECLARATIONS_JSON, REFLECTION_PACKAGES, RESCHEDULE_JOBS_ON_START, SCHEMA_CLASS, STORE_CLASS, STORE_PROPERTIES_CLASS, STRICT_JSON
-
-
Constructor Summary
Constructors Constructor Description AccumuloProperties()AccumuloProperties(Path propFileLocation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AccumuloPropertiesclone()intgetClientSideBloomFilterSize()Gets the size that should be used for the creation of bloom filters on the client side.booleangetEnableKerberos()Gets the flag determining whether Kerberos should be enabled and used for Accumulo connections.booleangetEnableValidatorIterator()Gets the flag determining whether the validator iterator should be enabled.doublegetFalsePositiveRate()Gets the allowable rate of false positives for bloom filters (Generally the higher the value the faster the filter).StringgetInstance()Gets the Accumulo instance name.StringgetJsonSerialiserModules()StringgetKeyPackageClass()Gets the key package that should be used in conjunction with this table.StringgetKeytabPath()Gets the keytab path for the Accumulo Kerberos principal.intgetMaxBloomFilterToPassToAnIterator()Gets the size that should be used for the creation of bloom filters on the server side.LonggetMaxBufferSizeForBatchWriterInBytes()Gets the memory buffer size that should be used for the Accumulo batch writers.intgetMaxEntriesForBatchScanner()Gets the max number of items that should be read into the scanner at any one time.LonggetMaxTimeOutForBatchWriterInMilliseconds()Gets the time out/latency that should be used for the Accumulo batch writers.StringgetNamespace()Gets the namespace for the Accumulo table.intgetNumThreadsForBatchWriter()Gets the number of threads that should be used for the Accumulo batch writers.StringgetPassword()Gets the password for the Accumulo user.StringgetPrincipal()Gets the configured Accumulo Kerberos principal.StringgetTableFileReplicationFactor()Gets the replication factor to be applied to tables created by Gaffer, if not set then the table will use your general Accumulo settings default value.intgetThreadsForBatchScanner()Gets the number of threads to use in the batch scanner.StringgetUser()Gets the configured Accumulo user.StringgetZookeepers()Gets the list of Zookeeper servers.static AccumuloPropertiesloadStoreProperties(InputStream storePropertiesStream)static AccumuloPropertiesloadStoreProperties(String pathStr)static AccumuloPropertiesloadStoreProperties(Path storePropertiesPath)voidsetClientSideBloomFilterSize(String clientSideBloomFilterSize)Sets the size that should be used for the creation of bloom filters on the client side.voidsetEnableKerberos(boolean enableKerberos)Sets the flag determining whether Kerberos should be enabled and used for Accumulo connections.voidsetEnableValidatorIterator(boolean enableValidatorIterator)Sets the flag determining whether the validator iterator should be enabled.voidsetFalsePositiveRate(String falsePositiveRate)Sets the allowable rate of false positives for bloom filters (Generally the higher the value the faster the filter).voidsetInstance(String instance)Sets the Accumulo instance name.voidsetKeyPackageClass(String keyPackageClass)Sets the key package that should be used in conjunction with this table.voidsetKeytabPath(String keytabPath)Sets the keytab path for the Accumulo Kerberos principal.voidsetMaxBloomFilterToPassToAnIterator(String maxBloomFilterToPassToAnIterator)Sets the size that should be used for the creation of bloom filters on the server side.voidsetMaxBufferSizeForBatchWriterInBytes(String maxBufferSizeForBatchWriterInBytes)Sets the memory buffer size that should be used for the Accumulo batch writers.voidsetMaxEntriesForBatchScanner(String maxEntriesForBatchScanner)Sets the max number of items that should be read into the scanner at any one time.voidsetMaxTimeOutForBatchWriterInMilliseconds(String maxTimeOutForBatchWriterInMilliseconds)Sets the time out/latency that should be used for the Accumulo batch writers.voidsetNamespace(String namespace)Sets the namespace to use for the Accumulo table.voidsetNumThreadsForBatchWriter(String numThreadsForBatchWriter)Sets the number of threads that should be used for the Accumulo batch writers.voidsetPassword(String password)Sets the password to use for the Accumulo user.voidsetPrincipal(String principal)Sets the configured Accumulo Kerberos principal.voidsetTableFileReplicationFactor(String replicationFactor)Sets the replication factor to be applied to tables created by Gaffer, if not set then the table will use your general Accumulo settings default value.voidsetThreadsForBatchScanner(String threadsForBatchScanner)Sets the number of threads to use in the batch scanner.voidsetUser(String user)Sets the configured Accumulo user.voidsetZookeepers(String zookeepers)Sets the list of Zookeeper servers.-
Methods inherited from class uk.gov.gchq.gaffer.store.StoreProperties
addOperationDeclarationPaths, containsKey, equals, get, get, getAdminAuth, getCacheServiceClass, getCacheServiceClass, getCacheServiceDefaultSuffix, getCacheServiceJobTrackerSuffix, getCacheServiceNamedOperationSuffix, getCacheServiceNamedViewSuffix, getDefaultCacheServiceClass, getJobExecutorThreadCount, getJobTrackerCacheServiceClass, getJobTrackerEnabled, getJsonSerialiserClass, getNamedOperationCacheServiceClass, getNamedOperationEnabled, getNamedViewCacheServiceClass, getNamedViewEnabled, getOperationDeclarationPaths, getOperationDeclarations, getProperties, getReflectionPackages, getRescheduleJobsOnStart, getSchemaClass, getSchemaClassName, getStoreClass, getStorePropertiesClass, getStorePropertiesClassName, getStrictJson, hashCode, isNestedNamedOperationAllow, isNestedNamedOperationAllow, loadStoreProperties, loadStoreProperties, loadStoreProperties, loadStoreProperties, loadStoreProperties, merge, set, setAdminAuth, setCacheServiceClass, setCacheServiceNameSuffix, setDefaultCacheServiceClass, setJobTrackerCacheServiceClass, setJobTrackerEnabled, setJsonSerialiserClass, setJsonSerialiserClass, setJsonSerialiserModules, setJsonSerialiserModules, setNamedOperationCacheServiceClass, setNamedOperationEnabled, setNamedViewCacheServiceClass, setNamedViewEnabled, setNestedNamedOperationAllow, setOperationDeclarationPaths, setProperties, setReflectionPackages, setRescheduleJobsOnStart, setSchemaClass, setSchemaClass, setStoreClass, setStoreClass, setStorePropertiesClass, setStorePropertiesClassName, setStrictJson, toString, updateStorePropertiesClass, updateStorePropertiesClass
-
-
-
-
Field Detail
-
KEY_PACKAGE_CLASS
public static final String KEY_PACKAGE_CLASS
- See Also:
- Constant Field Values
-
INSTANCE_NAME
public static final String INSTANCE_NAME
- See Also:
- Constant Field Values
-
ZOOKEEPERS
public static final String ZOOKEEPERS
- See Also:
- Constant Field Values
-
USER
public static final String USER
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
ENABLE_KERBEROS
public static final String ENABLE_KERBEROS
- See Also:
- Constant Field Values
-
PRINCIPAL
public static final String PRINCIPAL
- See Also:
- Constant Field Values
-
KEYTAB_PATH
public static final String KEYTAB_PATH
- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
THREADS_FOR_BATCH_SCANNER
public static final String THREADS_FOR_BATCH_SCANNER
- See Also:
- Constant Field Values
-
MAX_ENTRIES_FOR_BATCH_SCANNER
public static final String MAX_ENTRIES_FOR_BATCH_SCANNER
- See Also:
- Constant Field Values
-
CLIENT_SIDE_BLOOM_FILTER_SIZE
public static final String CLIENT_SIDE_BLOOM_FILTER_SIZE
- See Also:
- Constant Field Values
-
FALSE_POSITIVE_RATE
public static final String FALSE_POSITIVE_RATE
- See Also:
- Constant Field Values
-
MAX_BLOOM_FILTER_TO_PASS_TO_AN_ITERATOR
public static final String MAX_BLOOM_FILTER_TO_PASS_TO_AN_ITERATOR
- See Also:
- Constant Field Values
-
MAX_BUFFER_SIZE_FOR_BATCH_WRITER
public static final String MAX_BUFFER_SIZE_FOR_BATCH_WRITER
- See Also:
- Constant Field Values
-
MAX_TIME_OUT_FOR_BATCH_WRITER
public static final String MAX_TIME_OUT_FOR_BATCH_WRITER
- See Also:
- Constant Field Values
-
NUM_THREADS_FOR_BATCH_WRITER
public static final String NUM_THREADS_FOR_BATCH_WRITER
- See Also:
- Constant Field Values
-
TABLE_REPLICATION_FACTOR
public static final String TABLE_REPLICATION_FACTOR
- See Also:
- Constant Field Values
-
ENABLE_VALIDATOR_ITERATOR
public static final String ENABLE_VALIDATOR_ITERATOR
- See Also:
- Constant Field Values
-
HDFS_SKIP_PERMISSIONS
public static final String HDFS_SKIP_PERMISSIONS
- See Also:
- Constant Field Values
-
TABLE_CREATED_TIME
public static final String TABLE_CREATED_TIME
- See Also:
- Constant Field Values
-
ENABLE_VALIDATOR_ITERATOR_DEFAULT
public static final String ENABLE_VALIDATOR_ITERATOR_DEFAULT
- See Also:
- Constant Field Values
-
ENABLE_KERBEROS_DEFAULT
public static final String ENABLE_KERBEROS_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AccumuloProperties
public AccumuloProperties()
-
AccumuloProperties
public AccumuloProperties(Path propFileLocation)
-
-
Method Detail
-
loadStoreProperties
public static AccumuloProperties loadStoreProperties(String pathStr)
-
loadStoreProperties
public static AccumuloProperties loadStoreProperties(InputStream storePropertiesStream)
-
loadStoreProperties
public static AccumuloProperties loadStoreProperties(Path storePropertiesPath)
-
clone
public AccumuloProperties clone()
- Overrides:
clonein classStoreProperties
-
setNumThreadsForBatchWriter
public void setNumThreadsForBatchWriter(String numThreadsForBatchWriter)
Sets the number of threads that should be used for the Accumulo batch writers.- Parameters:
numThreadsForBatchWriter- The number of concurrent threads to use in the batch writer.
-
setMaxTimeOutForBatchWriterInMilliseconds
public void setMaxTimeOutForBatchWriterInMilliseconds(String maxTimeOutForBatchWriterInMilliseconds)
Sets the time out/latency that should be used for the Accumulo batch writers.- Parameters:
maxTimeOutForBatchWriterInMilliseconds- The timeout to use on the batch writer.
-
setMaxBufferSizeForBatchWriterInBytes
public void setMaxBufferSizeForBatchWriterInBytes(String maxBufferSizeForBatchWriterInBytes)
Sets the memory buffer size that should be used for the Accumulo batch writers.- Parameters:
maxBufferSizeForBatchWriterInBytes- The buffer size in bytes to use in the batch writer.
-
getNumThreadsForBatchWriter
public int getNumThreadsForBatchWriter()
Gets the number of threads that should be used for the Accumulo batch writers.- Returns:
- The number of concurrent threads to use in the batch writer.
-
getMaxTimeOutForBatchWriterInMilliseconds
public Long getMaxTimeOutForBatchWriterInMilliseconds()
Gets the time out/latency that should be used for the Accumulo batch writers.- Returns:
- The timeout to use on the batch writer.
-
getMaxBufferSizeForBatchWriterInBytes
public Long getMaxBufferSizeForBatchWriterInBytes()
Gets the memory buffer size that should be used for the Accumulo batch writers.- Returns:
- The buffer size in bytes to use in the batch writer.
-
getZookeepers
public String getZookeepers()
Gets the list of Zookeeper servers.- Returns:
- A comma separated list of Zookeeper servers.
-
setZookeepers
public void setZookeepers(String zookeepers)
Sets the list of Zookeeper servers.- Parameters:
zookeepers- the list of Zookeeper servers.
-
getInstance
public String getInstance()
Gets the Accumulo instance name.- Returns:
- Return the instance name of Accumulo set in the properties file.
-
setInstance
public void setInstance(String instance)
Sets the Accumulo instance name.- Parameters:
instance- the Accumulo instance name.
-
getUser
public String getUser()
Gets the configured Accumulo user.- Returns:
- Get the configured accumulo user.
-
setUser
public void setUser(String user)
Sets the configured Accumulo user.- Parameters:
user- the configured Accumulo user.
-
getPassword
public String getPassword()
Gets the password for the Accumulo user.- Returns:
- the password for the configured Accumulo user.
-
setPassword
public void setPassword(String password)
Sets the password to use for the Accumulo user.- Parameters:
password- the password to use for the Accumulo user.
-
getEnableKerberos
public boolean getEnableKerberos()
Gets the flag determining whether Kerberos should be enabled and used for Accumulo connections.- Returns:
- true if Kerberos should be enabled.
-
setEnableKerberos
public void setEnableKerberos(boolean enableKerberos)
Sets the flag determining whether Kerberos should be enabled and used for Accumulo connections.- Parameters:
enableKerberos- true if Kerberos should be enabled.
-
getPrincipal
public String getPrincipal()
Gets the configured Accumulo Kerberos principal.- Returns:
- Get the configured Accumulo Kerberos principal.
-
setPrincipal
public void setPrincipal(String principal)
Sets the configured Accumulo Kerberos principal.- Parameters:
principal- the configured Accumulo Kerberos principal.
-
getKeytabPath
public String getKeytabPath()
Gets the keytab path for the Accumulo Kerberos principal.- Returns:
- the keytab path for the configured Accumulo Kerberos principal.
-
setKeytabPath
public void setKeytabPath(String keytabPath)
Sets the keytab path for the Accumulo Kerberos principal.- Parameters:
keytabPath- the path to a keytab to use for the Accumulo Kerberos principal.
-
getNamespace
public String getNamespace()
Gets the namespace for the Accumulo table.- Returns:
- the namespace for the configured Accumulo table.
-
setNamespace
public void setNamespace(String namespace)
Sets the namespace to use for the Accumulo table.- Parameters:
namespace- the namespace to use for the Accumulo table.
-
getThreadsForBatchScanner
public int getThreadsForBatchScanner()
Gets the number of threads to use in the batch scanner.- Returns:
- An integer representing the number of threads to use in the batch scanner.
-
setThreadsForBatchScanner
public void setThreadsForBatchScanner(String threadsForBatchScanner)
Sets the number of threads to use in the batch scanner.- Parameters:
threadsForBatchScanner- the number of threads to use in the batch scanner.
-
getMaxEntriesForBatchScanner
public int getMaxEntriesForBatchScanner()
Gets the max number of items that should be read into the scanner at any one time.- Returns:
- An integer representing the max number of items that should be read into the scanner at any one time.
-
setMaxEntriesForBatchScanner
public void setMaxEntriesForBatchScanner(String maxEntriesForBatchScanner)
Sets the max number of items that should be read into the scanner at any one time.- Parameters:
maxEntriesForBatchScanner- the max number of items that should be read into the scanner at any one time.
-
getClientSideBloomFilterSize
public int getClientSideBloomFilterSize()
Gets the size that should be used for the creation of bloom filters on the client side.- Returns:
- An integer representing the size that should be used for the creation of bloom filters on the client side.
-
setClientSideBloomFilterSize
public void setClientSideBloomFilterSize(String clientSideBloomFilterSize)
Sets the size that should be used for the creation of bloom filters on the client side.- Parameters:
clientSideBloomFilterSize- the size that should be used for the creation of bloom filters on the client side.
-
getFalsePositiveRate
public double getFalsePositiveRate()
Gets the allowable rate of false positives for bloom filters (Generally the higher the value the faster the filter).- Returns:
- A number representing the rate of false positives for bloom filters (Generally the higher the value the faster the filter).
-
setFalsePositiveRate
public void setFalsePositiveRate(String falsePositiveRate)
Sets the allowable rate of false positives for bloom filters (Generally the higher the value the faster the filter).- Parameters:
falsePositiveRate- the allowable rate of false positives for bloom filters (Generally the higher the value the faster the filter).
-
getMaxBloomFilterToPassToAnIterator
public int getMaxBloomFilterToPassToAnIterator()
Gets the size that should be used for the creation of bloom filters on the server side.- Returns:
- An integer representing the size that should be used for the creation of bloom filters on the server side.
-
setMaxBloomFilterToPassToAnIterator
public void setMaxBloomFilterToPassToAnIterator(String maxBloomFilterToPassToAnIterator)
Sets the size that should be used for the creation of bloom filters on the server side.- Parameters:
maxBloomFilterToPassToAnIterator- the size that should be used for the creation of bloom filters on the server side.
-
getKeyPackageClass
public String getKeyPackageClass()
Gets the key package that should be used in conjunction with this table.- Returns:
- An implementation of
AccumuloKeyPackageto be used for this accumulo table.
-
setKeyPackageClass
public void setKeyPackageClass(String keyPackageClass)
Sets the key package that should be used in conjunction with this table.- Parameters:
keyPackageClass- the key package that should be used in conjunction with this table.
-
getTableFileReplicationFactor
public String getTableFileReplicationFactor()
Gets the replication factor to be applied to tables created by Gaffer, if not set then the table will use your general Accumulo settings default value.- Returns:
- The replication factor to be applied to tables created by Gaffer.
-
setTableFileReplicationFactor
public void setTableFileReplicationFactor(String replicationFactor)
Sets the replication factor to be applied to tables created by Gaffer, if not set then the table will use your general Accumulo settings default value.- Parameters:
replicationFactor- the replication factor to be applied to tables created by gaffer, if not set then the table will use your general accumulo settings default value.
-
getEnableValidatorIterator
public boolean getEnableValidatorIterator()
Gets the flag determining whether the validator iterator should be enabled.- Returns:
- true if the validator iterator should be enabled.
-
setEnableValidatorIterator
public void setEnableValidatorIterator(boolean enableValidatorIterator)
Sets the flag determining whether the validator iterator should be enabled.- Parameters:
enableValidatorIterator- true if the validator iterator should be enabled.
-
getJsonSerialiserModules
public String getJsonSerialiserModules()
- Overrides:
getJsonSerialiserModulesin classStoreProperties
-
-