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
AnAccumuloProperties
contains specific configuration information for theAccumuloStore
, such as database connection strings. It wrapsProperties
and lazy loads the all properties from a file when first used.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLIENT_SIDE_BLOOM_FILTER_SIZE
static String
ENABLE_KERBEROS
static String
ENABLE_KERBEROS_DEFAULT
static String
ENABLE_VALIDATOR_ITERATOR
static String
ENABLE_VALIDATOR_ITERATOR_DEFAULT
static String
FALSE_POSITIVE_RATE
static String
HDFS_SKIP_PERMISSIONS
static String
INSTANCE_NAME
static String
KEY_PACKAGE_CLASS
static String
KEYTAB_PATH
static String
MAX_BLOOM_FILTER_TO_PASS_TO_AN_ITERATOR
static String
MAX_BUFFER_SIZE_FOR_BATCH_WRITER
static String
MAX_ENTRIES_FOR_BATCH_SCANNER
static String
MAX_TIME_OUT_FOR_BATCH_WRITER
static String
NAMESPACE
static String
NUM_THREADS_FOR_BATCH_WRITER
static String
PASSWORD
static String
PRINCIPAL
static String
TABLE_CREATED_TIME
static String
TABLE_REPLICATION_FACTOR
static String
THREADS_FOR_BATCH_SCANNER
static String
USER
static String
ZOOKEEPERS
-
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 AccumuloProperties
clone()
int
getClientSideBloomFilterSize()
Gets the size that should be used for the creation of bloom filters on the client side.boolean
getEnableKerberos()
Gets the flag determining whether Kerberos should be enabled and used for Accumulo connections.boolean
getEnableValidatorIterator()
Gets the flag determining whether the validator iterator should be enabled.double
getFalsePositiveRate()
Gets the allowable rate of false positives for bloom filters (Generally the higher the value the faster the filter).String
getInstance()
Gets the Accumulo instance name.String
getJsonSerialiserModules()
String
getKeyPackageClass()
Gets the key package that should be used in conjunction with this table.String
getKeytabPath()
Gets the keytab path for the Accumulo Kerberos principal.int
getMaxBloomFilterToPassToAnIterator()
Gets the size that should be used for the creation of bloom filters on the server side.Long
getMaxBufferSizeForBatchWriterInBytes()
Gets the memory buffer size that should be used for the Accumulo batch writers.int
getMaxEntriesForBatchScanner()
Gets the max number of items that should be read into the scanner at any one time.Long
getMaxTimeOutForBatchWriterInMilliseconds()
Gets the time out/latency that should be used for the Accumulo batch writers.String
getNamespace()
Gets the namespace for the Accumulo table.int
getNumThreadsForBatchWriter()
Gets the number of threads that should be used for the Accumulo batch writers.String
getPassword()
Gets the password for the Accumulo user.String
getPrincipal()
Gets the configured Accumulo Kerberos principal.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.int
getThreadsForBatchScanner()
Gets the number of threads to use in the batch scanner.String
getUser()
Gets the configured Accumulo user.String
getZookeepers()
Gets the list of Zookeeper servers.static AccumuloProperties
loadStoreProperties(InputStream storePropertiesStream)
static AccumuloProperties
loadStoreProperties(String pathStr)
static AccumuloProperties
loadStoreProperties(Path storePropertiesPath)
void
setClientSideBloomFilterSize(String clientSideBloomFilterSize)
Sets the size that should be used for the creation of bloom filters on the client side.void
setEnableKerberos(boolean enableKerberos)
Sets the flag determining whether Kerberos should be enabled and used for Accumulo connections.void
setEnableValidatorIterator(boolean enableValidatorIterator)
Sets the flag determining whether the validator iterator should be enabled.void
setFalsePositiveRate(String falsePositiveRate)
Sets the allowable rate of false positives for bloom filters (Generally the higher the value the faster the filter).void
setInstance(String instance)
Sets the Accumulo instance name.void
setKeyPackageClass(String keyPackageClass)
Sets the key package that should be used in conjunction with this table.void
setKeytabPath(String keytabPath)
Sets the keytab path for the Accumulo Kerberos principal.void
setMaxBloomFilterToPassToAnIterator(String maxBloomFilterToPassToAnIterator)
Sets the size that should be used for the creation of bloom filters on the server side.void
setMaxBufferSizeForBatchWriterInBytes(String maxBufferSizeForBatchWriterInBytes)
Sets the memory buffer size that should be used for the Accumulo batch writers.void
setMaxEntriesForBatchScanner(String maxEntriesForBatchScanner)
Sets the max number of items that should be read into the scanner at any one time.void
setMaxTimeOutForBatchWriterInMilliseconds(String maxTimeOutForBatchWriterInMilliseconds)
Sets the time out/latency that should be used for the Accumulo batch writers.void
setNamespace(String namespace)
Sets the namespace to use for the Accumulo table.void
setNumThreadsForBatchWriter(String numThreadsForBatchWriter)
Sets the number of threads that should be used for the Accumulo batch writers.void
setPassword(String password)
Sets the password to use for the Accumulo user.void
setPrincipal(String principal)
Sets the configured Accumulo Kerberos principal.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.void
setThreadsForBatchScanner(String threadsForBatchScanner)
Sets the number of threads to use in the batch scanner.void
setUser(String user)
Sets the configured Accumulo user.void
setZookeepers(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:
clone
in 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
AccumuloKeyPackage
to 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:
getJsonSerialiserModules
in classStoreProperties
-
-