Class FluoConfiguration
- java.lang.Object
-
- org.apache.fluo.api.config.SimpleConfiguration
-
- org.apache.fluo.api.config.FluoConfiguration
-
- All Implemented Interfaces:
Serializable
public class FluoConfiguration extends SimpleConfiguration
Configuration helper class for Fluo- Since:
- 1.0.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FluoConfiguration()
FluoConfiguration(File propertiesFile)
FluoConfiguration(InputStream in)
FluoConfiguration(Map<String,String> map)
FluoConfiguration(SimpleConfiguration other)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FluoConfiguration
addObserver(ObserverSpecification oconf)
Deprecated.since 1.1.0.FluoConfiguration
addObservers(Iterable<ObserverSpecification> observers)
Deprecated.since 1.1.0.FluoConfiguration
clearObservers()
Deprecated.since 1.1.0.String[]
getAccumuloAuthorizations()
String
getAccumuloInstance()
Gets the Apache Accumulo instance property value "fluo.accumulo.instance"String
getAccumuloJars()
Gets CSV list of jar paths to provide to AccumuloString
getAccumuloPassword()
Gets the Apache Accumulo password property value "fluo.accumulo.password"String
getAccumuloTable()
Gets the value of the property "fluo.accumulo.table"String
getAccumuloUser()
Gets the value of the property "fluo.accumulo.user"String
getAccumuloZookeepers()
Gets the value of the property "fluo.accumulo.zookeepers" if it is set, else returns the value of the property "localhost"SimpleConfiguration
getAppConfiguration()
String
getApplicationName()
Returns the application name after verification to avoid characters Zookeeper does not like in nodes and Hadoop does not like in HDFS paths.String
getAppZookeepers()
Returns the zookeeper application name string.SimpleConfiguration
getClientConfiguration()
Returns a SimpleConfiguration clientConfig with properties set from this configurationint
getClientRetryTimeout()
Deprecated.int
getConnectionRetryTimeout()
Returns the value of the property "fluo.connection.retry.timeout.ms" if it is set, else the default value of -1.static SimpleConfiguration
getDefaultConfiguration()
Returns configuration with all Fluo properties set to their default.String
getDfsRoot()
Gets the value of property "fluo.dfs.root" if set, otherwise gets the default ""String
getInstanceZookeepers()
Gets the value of the property "fluo.connection.zookeepers" and if not set returns the default "localhost/fluo"int
getLoaderQueueSize()
Gets the loader queue size.int
getLoaderThreads()
Returns the number of threads each loader runs.String
getMiniDataDir()
Gets the value of the property "fluo.mini.data.dir" if set, otherwise gets the value of the property "${env:FLUO_HOME}/mini"boolean
getMiniStartAccumulo()
Gets the value of the property "fluo.mini.start.accumulo" if set, else gets the value of trueString
getObserverInitDir()
Gets directory where observer jars can be found for initializationString
getObserverJarsUrl()
Gets the directory where observer jars can be foundString
getObserverProvider()
List<ObserverSpecification>
getObserverSpecifications()
Deprecated.since 1.1.0.SimpleConfiguration
getReporterConfiguration(String reporter)
long
getTransactionRollbackTime()
Gets the transaction rollback time, in milliseconds.int
getWorkerThreads()
Gets the value of the property "fluo.worker.num.threads" if set otherwise returns 10String
getZookeeperSecret()
Get the secret configured to access data in zookeeper.int
getZookeeperTimeout()
Gets the value of the property "fluo.connection.zookeeper.timeout" and if not set returns the default 30000boolean
hasRequiredAdminProps()
Returns true if required properties for FluoAdmin are setboolean
hasRequiredClientProps()
Returns true if required properties for FluoClient are setboolean
hasRequiredConnectionProps()
Verifies that the connection properties are set and and valid.boolean
hasRequiredMiniFluoProps()
Returns true if required properties for MiniFluo are setboolean
hasRequiredOracleProps()
Returns true if required properties for Oracle are setboolean
hasRequiredWorkerProps()
Returns true if required properties for Worker are setvoid
print()
Logs all propertiesFluoConfiguration
setAccumuloAuthorizations(String... auths)
FluoConfiguration
setAccumuloInstance(String accumuloInstance)
Sets the Apache Accumulo instance property "fluo.accumulo.instance"FluoConfiguration
setAccumuloJars(String path)
Sets paths to jars to provide to Accumulo.FluoConfiguration
setAccumuloPassword(String accumuloPassword)
Sets the Apache Accumulo password property "fluo.accumulo.password"FluoConfiguration
setAccumuloTable(String table)
Sets Accumulo table.FluoConfiguration
setAccumuloUser(String accumuloUser)
Sets the value of the property "fluo.accumulo.user"FluoConfiguration
setAccumuloZookeepers(String zookeepers)
Sets the value of the property "fluo.accumulo.zookeepers"FluoConfiguration
setApplicationName(String applicationName)
Sets the "fluo.connection.application.name"FluoConfiguration
setClientRetryTimeout(int timeoutMs)
Deprecated.FluoConfiguration
setConnectionRetryTimeout(int timeoutMS)
Sets the connection retry timeout property "fluo.connection.retry.timeout.ms" in milliseconds.static void
setDefaultConfiguration(SimpleConfiguration config)
Sets all Fluo properties to their default in the given configuration.FluoConfiguration
setDfsRoot(String dfsRoot)
Sets the root for the Hadoop DFS value in property "fluo.dfs.root"FluoConfiguration
setInstanceZookeepers(String zookeepers)
Sets the value of the property "fluo.connection.zookeepers"FluoConfiguration
setLoaderQueueSize(int queueSize)
Sets the queue size for the loader.FluoConfiguration
setLoaderThreads(int numThreads)
Sets the non negative number of threads each loader runs.FluoConfiguration
setMiniDataDir(String dataDir)
Sets the value of the property "fluo.mini.data.dir"FluoConfiguration
setMiniStartAccumulo(boolean startAccumulo)
Set the value of the property "fluo.mini.start.accumulo"FluoConfiguration
setObserverInitDir(String observerDir)
Sets directory where observers jars can found for initializationFluoConfiguration
setObserverJarsUrl(String observerJarsUrl)
Sets URL to directory where observer jars can be foundvoid
setObserverProvider(Class<? extends ObserverProvider> clazz)
CallssetObserverProvider(String)
with the class name.void
setObserverProvider(String className)
Configure the observer provider that Fluo workers will use.FluoConfiguration
setTransactionRollbackTime(long time, TimeUnit tu)
Sets the transaction rollback time, in milliseconds.FluoConfiguration
setWorkerThreads(int numThreads)
Sets the number of worker threads, must be positive.void
setZookeeperSecret(String secret)
Setting this before initializing an application will cause Fluo to lock down Zookeeper such that this secret is required to read data from zookeeper.FluoConfiguration
setZookeeperTimeout(int timeout)
Sets the value of the property "fluo.connection.zookeeper.timeout"void
validate()
-
Methods inherited from class org.apache.fluo.api.config.SimpleConfiguration
clear, clearProperty, containsKey, equals, getBoolean, getBoolean, getInt, getInt, getKeys, getKeys, getLong, getLong, getProperties, getRawString, getString, getString, hashCode, load, load, orElse, save, save, setProperties, setProperty, setProperty, setProperty, setProperty, subset, toMap, toString
-
-
-
-
Field Detail
-
FLUO_PREFIX
public static final String FLUO_PREFIX
- See Also:
- Constant Field Values
-
CLIENT_APPLICATION_NAME_PROP
@Deprecated public static final String CLIENT_APPLICATION_NAME_PROP
Deprecated.since 1.2.0 replaced by fluo.connection.application.name- See Also:
- Constant Field Values
-
CLIENT_ACCUMULO_PASSWORD_PROP
@Deprecated public static final String CLIENT_ACCUMULO_PASSWORD_PROP
Deprecated.since 1.2.0 replaced by fluo.accumulo.password- See Also:
- Constant Field Values
-
CLIENT_ACCUMULO_USER_PROP
@Deprecated public static final String CLIENT_ACCUMULO_USER_PROP
Deprecated.since 1.2.0 replaced by fluo.accumulo.user- See Also:
- Constant Field Values
-
CLIENT_ACCUMULO_INSTANCE_PROP
@Deprecated public static final String CLIENT_ACCUMULO_INSTANCE_PROP
Deprecated.since 1.2.0 replaced by fluo.accumulo.instance- See Also:
- Constant Field Values
-
CLIENT_ACCUMULO_ZOOKEEPERS_PROP
@Deprecated public static final String CLIENT_ACCUMULO_ZOOKEEPERS_PROP
Deprecated.since 1.2.0 replaced by fluo.accumulo.zookeepers- See Also:
- Constant Field Values
-
CLIENT_ZOOKEEPER_TIMEOUT_PROP
@Deprecated public static final String CLIENT_ZOOKEEPER_TIMEOUT_PROP
Deprecated.since 1.2.0 replaced by fluo.connection.zookeeper.timeout- See Also:
- Constant Field Values
-
CLIENT_ZOOKEEPER_CONNECT_PROP
@Deprecated public static final String CLIENT_ZOOKEEPER_CONNECT_PROP
Deprecated.since 1.2.0 replaced by fluo.connection.zookeepers- See Also:
- Constant Field Values
-
CLIENT_RETRY_TIMEOUT_MS_PROP
@Deprecated public static final String CLIENT_RETRY_TIMEOUT_MS_PROP
Deprecated.since 1.2.0 replaced by fluo.connection.retry.timeout.ms- See Also:
- Constant Field Values
-
CLIENT_ZOOKEEPER_TIMEOUT_DEFAULT
@Deprecated public static final int CLIENT_ZOOKEEPER_TIMEOUT_DEFAULT
Deprecated.- See Also:
- Constant Field Values
-
CLIENT_ACCUMULO_ZOOKEEPERS_DEFAULT
@Deprecated public static final String CLIENT_ACCUMULO_ZOOKEEPERS_DEFAULT
Deprecated.- See Also:
- Constant Field Values
-
CLIENT_ZOOKEEPER_CONNECT_DEFAULT
@Deprecated public static final String CLIENT_ZOOKEEPER_CONNECT_DEFAULT
Deprecated.- See Also:
- Constant Field Values
-
CLIENT_RETRY_TIMEOUT_MS_DEFAULT
@Deprecated public static final int CLIENT_RETRY_TIMEOUT_MS_DEFAULT
Deprecated.- See Also:
- Constant Field Values
-
CONNECTION_PREFIX
public static final String CONNECTION_PREFIX
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
CONNECTION_APPLICATION_NAME_PROP
public static final String CONNECTION_APPLICATION_NAME_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
CONNECTION_ZOOKEEPER_TIMEOUT_PROP
public static final String CONNECTION_ZOOKEEPER_TIMEOUT_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
CONNECTION_ZOOKEEPER_SECRET
public static final String CONNECTION_ZOOKEEPER_SECRET
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
CONNECTION_ZOOKEEPERS_PROP
public static final String CONNECTION_ZOOKEEPERS_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
CONNECTION_RETRY_TIMEOUT_MS_PROP
public static final String CONNECTION_RETRY_TIMEOUT_MS_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
CONNECTION_ZOOKEEPER_TIMEOUT_DEFAULT
public static final int CONNECTION_ZOOKEEPER_TIMEOUT_DEFAULT
- See Also:
- Constant Field Values
-
CONNECTION_ZOOKEEPERS_DEFAULT
public static final String CONNECTION_ZOOKEEPERS_DEFAULT
- See Also:
- Constant Field Values
-
CONNECTION_RETRY_TIMEOUT_MS_DEFAULT
public static final int CONNECTION_RETRY_TIMEOUT_MS_DEFAULT
- See Also:
- Constant Field Values
-
ACCUMULO_INSTANCE_PROP
public static final String ACCUMULO_INSTANCE_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
ACCUMULO_TABLE_PROP
public static final String ACCUMULO_TABLE_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
ACCUMULO_PASSWORD_PROP
public static final String ACCUMULO_PASSWORD_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
ACCUMULO_USER_PROP
public static final String ACCUMULO_USER_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
ACCUMULO_AUTH_PROP
public static final String ACCUMULO_AUTH_PROP
- See Also:
- Constant Field Values
-
ACCUMULO_ZOOKEEPERS_PROP
public static final String ACCUMULO_ZOOKEEPERS_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
ACCUMULO_JARS_PROP
public static final String ACCUMULO_JARS_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
ACCUMULO_ZOOKEEPERS_DEFAULT
public static final String ACCUMULO_ZOOKEEPERS_DEFAULT
- See Also:
- Constant Field Values
-
ACCUMULO_JARS_DEFAULT
public static final String ACCUMULO_JARS_DEFAULT
- See Also:
- Constant Field Values
-
DFS_ROOT_PROP
public static final String DFS_ROOT_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
DFS_ROOT_DEFAULT
public static final String DFS_ROOT_DEFAULT
- See Also:
- Constant Field Values
-
ADMIN_ACCUMULO_TABLE_PROP
@Deprecated public static final String ADMIN_ACCUMULO_TABLE_PROP
Deprecated.since 1.2.0 replaced by fluo.accumulo.table- See Also:
- Constant Field Values
-
WORKER_NUM_THREADS_PROP
public static final String WORKER_NUM_THREADS_PROP
- See Also:
- Constant Field Values
-
WORKER_NUM_THREADS_DEFAULT
public static final int WORKER_NUM_THREADS_DEFAULT
- See Also:
- Constant Field Values
-
LOADER_NUM_THREADS_PROP
public static final String LOADER_NUM_THREADS_PROP
- See Also:
- Constant Field Values
-
LOADER_QUEUE_SIZE_PROP
public static final String LOADER_QUEUE_SIZE_PROP
- See Also:
- Constant Field Values
-
LOADER_NUM_THREADS_DEFAULT
public static final int LOADER_NUM_THREADS_DEFAULT
- See Also:
- Constant Field Values
-
LOADER_QUEUE_SIZE_DEFAULT
public static final int LOADER_QUEUE_SIZE_DEFAULT
- See Also:
- Constant Field Values
-
MINI_START_ACCUMULO_PROP
public static final String MINI_START_ACCUMULO_PROP
- See Also:
- Constant Field Values
-
MINI_DATA_DIR_PROP
public static final String MINI_DATA_DIR_PROP
- See Also:
- Constant Field Values
-
MINI_START_ACCUMULO_DEFAULT
public static final boolean MINI_START_ACCUMULO_DEFAULT
- See Also:
- Constant Field Values
-
MINI_DATA_DIR_DEFAULT
public static final String MINI_DATA_DIR_DEFAULT
- See Also:
- Constant Field Values
-
OBSERVER_PREFIX
public static final String OBSERVER_PREFIX
The properties below get loaded into/from Zookeeper- See Also:
- Constant Field Values
-
OBSERVER_PROVIDER
public static final String OBSERVER_PROVIDER
- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
OBSERVER_INIT_DIR_PROP
public static final String OBSERVER_INIT_DIR_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
OBSERVER_JARS_URL_PROP
public static final String OBSERVER_JARS_URL_PROP
- Since:
- 1.2.0
- See Also:
- Constant Field Values
-
OBSERVER_PROVIDER_DEFAULT
public static final String OBSERVER_PROVIDER_DEFAULT
- See Also:
- Constant Field Values
-
OBSERVER_INIT_DIR_DEFAULT
public static final String OBSERVER_INIT_DIR_DEFAULT
- See Also:
- Constant Field Values
-
OBSERVER_JARS_URL_DEFAULT
public static final String OBSERVER_JARS_URL_DEFAULT
- See Also:
- Constant Field Values
-
TRANSACTION_PREFIX
public static final String TRANSACTION_PREFIX
- See Also:
- Constant Field Values
-
TRANSACTION_ROLLBACK_TIME_PROP
public static final String TRANSACTION_ROLLBACK_TIME_PROP
- See Also:
- Constant Field Values
-
TRANSACTION_ROLLBACK_TIME_DEFAULT
public static final long TRANSACTION_ROLLBACK_TIME_DEFAULT
- See Also:
- Constant Field Values
-
REPORTER_PREFIX
public static final String REPORTER_PREFIX
- See Also:
- Constant Field Values
-
APP_PREFIX
public static final String APP_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FluoConfiguration
public FluoConfiguration()
-
FluoConfiguration
public FluoConfiguration(SimpleConfiguration other)
-
FluoConfiguration
public FluoConfiguration(InputStream in)
-
FluoConfiguration
public FluoConfiguration(File propertiesFile)
-
-
Method Detail
-
validate
public void validate()
-
setApplicationName
public FluoConfiguration setApplicationName(String applicationName)
Sets the "fluo.connection.application.name"- Parameters:
applicationName
- Must not be null
-
getApplicationName
public String getApplicationName()
Returns the application name after verification to avoid characters Zookeeper does not like in nodes and Hadoop does not like in HDFS paths.Gets the value of the property "fluo.connection.application.name" if set
- Returns:
- The application name
- Throws:
NoSuchElementException
- if the property has not been set
-
setInstanceZookeepers
public FluoConfiguration setInstanceZookeepers(String zookeepers)
Sets the value of the property "fluo.connection.zookeepers"- Parameters:
zookeepers
- The instance to use, must not be null.
-
getInstanceZookeepers
public String getInstanceZookeepers()
Gets the value of the property "fluo.connection.zookeepers" and if not set returns the default "localhost/fluo"- Returns:
- The zookeeper instance.
-
getAppZookeepers
public String getAppZookeepers()
Returns the zookeeper application name string.- Returns:
- The zookeeper application string.
-
setZookeeperTimeout
public FluoConfiguration setZookeeperTimeout(int timeout)
Sets the value of the property "fluo.connection.zookeeper.timeout"- Parameters:
timeout
- This must be a positive integer
-
getZookeeperTimeout
public int getZookeeperTimeout()
Gets the value of the property "fluo.connection.zookeeper.timeout" and if not set returns the default 30000
-
getZookeeperSecret
public String getZookeeperSecret()
Get the secret configured to access data in zookeeper. If the secret is an empty string, then nothing in zookeeper is locked down.Gets the value of the property "fluo.connection.zookeeper.secret"
- Since:
- 1.2.0
-
setZookeeperSecret
public void setZookeeperSecret(String secret)
Setting this before initializing an application will cause Fluo to lock down Zookeeper such that this secret is required to read data from zookeeper. If set to an empty string, then nothing in zookeeper will be locked down. This property defaults to an empty string.Sets the value of the property "fluo.connection.zookeeper.secret"
- Since:
- 1.2.0
-
setClientRetryTimeout
@Deprecated public FluoConfiguration setClientRetryTimeout(int timeoutMs)
Deprecated.
-
getClientRetryTimeout
@Deprecated public int getClientRetryTimeout()
Deprecated.
-
setConnectionRetryTimeout
public FluoConfiguration setConnectionRetryTimeout(int timeoutMS)
Sets the connection retry timeout property "fluo.connection.retry.timeout.ms" in milliseconds. Must be positive.- Since:
- 1.2.0
-
getConnectionRetryTimeout
public int getConnectionRetryTimeout()
Returns the value of the property "fluo.connection.retry.timeout.ms" if it is set, else the default value of -1. The integer returned represents milliseconds and is always positive.- Since:
- 1.2.0
-
setAccumuloInstance
public FluoConfiguration setAccumuloInstance(String accumuloInstance)
Sets the Apache Accumulo instance property "fluo.accumulo.instance"- Parameters:
accumuloInstance
- The instance to connect to, must not be empty
-
getAccumuloInstance
public String getAccumuloInstance()
Gets the Apache Accumulo instance property value "fluo.accumulo.instance"
-
setAccumuloUser
public FluoConfiguration setAccumuloUser(String accumuloUser)
Sets the value of the property "fluo.accumulo.user"- Parameters:
accumuloUser
- The user name to use, must not be null.
-
getAccumuloUser
public String getAccumuloUser()
Gets the value of the property "fluo.accumulo.user"
-
setAccumuloPassword
public FluoConfiguration setAccumuloPassword(String accumuloPassword)
Sets the Apache Accumulo password property "fluo.accumulo.password"- Parameters:
accumuloPassword
- The password to use, must not be null.
-
getAccumuloPassword
public String getAccumuloPassword()
Gets the Apache Accumulo password property value "fluo.accumulo.password"- Throws:
NoSuchElementException
- if "fluo.accumulo.password" is not set
-
setAccumuloAuthorizations
public FluoConfiguration setAccumuloAuthorizations(String... auths)
- Since:
- 2.0.0
-
getAccumuloAuthorizations
public String[] getAccumuloAuthorizations()
- Since:
- 2.0.0
-
setAccumuloZookeepers
public FluoConfiguration setAccumuloZookeepers(String zookeepers)
Sets the value of the property "fluo.accumulo.zookeepers"- Parameters:
zookeepers
- Must not be null
-
getAccumuloZookeepers
public String getAccumuloZookeepers()
Gets the value of the property "fluo.accumulo.zookeepers" if it is set, else returns the value of the property "localhost"
-
setAccumuloTable
public FluoConfiguration setAccumuloTable(String table)
Sets Accumulo table. This property only needs to be set for FluoAdmin as it will be stored and retrieved from Zookeeper for clients.Sets the value of the property "fluo.accumulo.table"
-
getAccumuloTable
public String getAccumuloTable()
Gets the value of the property "fluo.accumulo.table"
-
setAccumuloJars
public FluoConfiguration setAccumuloJars(String path)
Sets paths to jars to provide to Accumulo. If not set, Fluo will find jars on classpathSets the value of the property "fluo.accumulo.jars"
- Parameters:
path
- CSV list of paths, must not be null- Since:
- 1.2.0
-
getAccumuloJars
public String getAccumuloJars()
Gets CSV list of jar paths to provide to AccumuloGets the value of the property "fluo.accumulo.jars" if set, "" else
- Since:
- 1.2.0
-
setDfsRoot
public FluoConfiguration setDfsRoot(String dfsRoot)
Sets the root for the Hadoop DFS value in property "fluo.dfs.root"- Parameters:
dfsRoot
- The path for the dfs root eg: hdfs://host:port/path note: may not be empty.- Since:
- 1.2.0
-
getDfsRoot
public String getDfsRoot()
Gets the value of property "fluo.dfs.root" if set, otherwise gets the default ""- Since:
- 1.2.0
-
setWorkerThreads
public FluoConfiguration setWorkerThreads(int numThreads)
Sets the number of worker threads, must be positive. The default is 10 threads. Sets this value in the property "fluo.worker.num.threads"- Parameters:
numThreads
- The number of threads to use, must be positive
-
getWorkerThreads
public int getWorkerThreads()
Gets the value of the property "fluo.worker.num.threads" if set otherwise returns 10- Returns:
- The number of worker threads being used.
-
getObserverSpecifications
@Deprecated public List<ObserverSpecification> getObserverSpecifications()
Deprecated.since 1.1.0. Replaced bysetObserverProvider(String)
andgetObserverProvider()
-
setObserverProvider
public void setObserverProvider(String className)
Configure the observer provider that Fluo workers will use.Sets the property of "fluo.observer.provider"
- Parameters:
className
- Name of a class that implementsObserverProvider
. Must be non-null and non-empty.- Since:
- 1.1.0
-
setObserverProvider
public void setObserverProvider(Class<? extends ObserverProvider> clazz)
CallssetObserverProvider(String)
with the class name.- Since:
- 1.1.0
-
setObserverInitDir
public FluoConfiguration setObserverInitDir(String observerDir)
Sets directory where observers jars can found for initializationSets the value of the property "fluo.observer.init.dir"
- Parameters:
observerDir
- Path to directory, must not be null- Since:
- 1.2.0
-
getObserverInitDir
public String getObserverInitDir()
Gets directory where observer jars can be found for initializationGets the value of the property "fluo.observer.init.dir" if set, "" otherwise
- Returns:
- Path to directory
- Since:
- 1.2.0
-
setObserverJarsUrl
public FluoConfiguration setObserverJarsUrl(String observerJarsUrl)
Sets URL to directory where observer jars can be foundSets the value of the property "fluo.observer.jars.url"
- Parameters:
observerJarsUrl
- URL to observer jars directory, must not be null- Since:
- 1.2.0
-
getObserverJarsUrl
public String getObserverJarsUrl()
Gets the directory where observer jars can be foundGets the value of the property "fluo.observer.jars.url" if set, "" otherwise
- Since:
- 1.2.0
-
getObserverProvider
public String getObserverProvider()
- Returns:
- The configured
ObserverProvider
class name. If one was not configured, returns "" - Since:
- 1.1.0
-
addObserver
@Deprecated public FluoConfiguration addObserver(ObserverSpecification oconf)
Deprecated.since 1.1.0. Replaced bysetObserverProvider(String)
andgetObserverProvider()
Adds anObserverSpecification
to the configuration using a unique integer prefix that's not currently in use.
-
addObservers
@Deprecated public FluoConfiguration addObservers(Iterable<ObserverSpecification> observers)
Deprecated.since 1.1.0. Replaced bysetObserverProvider(String)
andgetObserverProvider()
Adds multiple observers using unique integer prefixes for each.
-
clearObservers
@Deprecated public FluoConfiguration clearObservers()
Deprecated.since 1.1.0. Replaced bysetObserverProvider(String)
andgetObserverProvider()
Removes any configured observers.
-
setTransactionRollbackTime
public FluoConfiguration setTransactionRollbackTime(long time, TimeUnit tu)
Sets the transaction rollback time, in milliseconds.Sets the value of the property "fluo.tx.rollback.time"
- Parameters:
time
- A long representation of the duration, must be positivetu
- The TimeUnit to use
-
getTransactionRollbackTime
public long getTransactionRollbackTime()
Gets the transaction rollback time, in milliseconds.Gets the value of the property "fluo.tx.rollback.time" if set, 300000L otherwise
- Returns:
- A positive long representation of the rollback time.
-
setLoaderThreads
public FluoConfiguration setLoaderThreads(int numThreads)
Sets the non negative number of threads each loader runs. If setting to zero, must also set the queue size to zero.Sets the value of the property "fluo.loader.num.threads"
- Parameters:
numThreads
- Must be positive
-
getLoaderThreads
public int getLoaderThreads()
Returns the number of threads each loader runs.Gets the value of the property "fluo.loader.num.threads" if set, 10 otherwise
- Returns:
- The number of threads each loader runs.
-
setLoaderQueueSize
public FluoConfiguration setLoaderQueueSize(int queueSize)
Sets the queue size for the loader. This should be set to zero if the number of loader threads is zero.Sets the value of the property "fluo.loader.queue.size"
- Parameters:
queueSize
- The non negative size of the queue.
-
getLoaderQueueSize
public int getLoaderQueueSize()
Gets the loader queue size.Gets the value of the property "fluo.loader.queue.size" if set, 10 otherwise
- Returns:
- the loader queue size.
-
getReporterConfiguration
public SimpleConfiguration getReporterConfiguration(String reporter)
- Parameters:
reporter
- The name of the reporter to get configuration for, i.e. console, jmx, graphite.- Returns:
- A subset of this configuration using the prefix "fluo.metrics.reporter" with the reporter parameter appended. Any change made to subset will be reflected in this configuration, but with the prefix added.
-
getAppConfiguration
public SimpleConfiguration getAppConfiguration()
- Returns:
- A subset of this configuration using the prefix "fluo.app". Any change made
to subset will be reflected in this configuration, but with the prefix added. This
method is useful for setting application configuration before initialization. For
reading application configuration after initialization, see
FluoClient.getAppConfiguration()
andObserverProvider.Context.getAppConfiguration()
-
setMiniStartAccumulo
public FluoConfiguration setMiniStartAccumulo(boolean startAccumulo)
Set the value of the property "fluo.mini.start.accumulo"- Parameters:
startAccumulo
- Flag to mini start Accumulo or not
-
getMiniStartAccumulo
public boolean getMiniStartAccumulo()
Gets the value of the property "fluo.mini.start.accumulo" if set, else gets the value of true
-
setMiniDataDir
public FluoConfiguration setMiniDataDir(String dataDir)
Sets the value of the property "fluo.mini.data.dir"- Parameters:
dataDir
- The path to the directory, must not be null
-
getMiniDataDir
public String getMiniDataDir()
Gets the value of the property "fluo.mini.data.dir" if set, otherwise gets the value of the property "${env:FLUO_HOME}/mini"
-
print
public void print()
Logs all properties
-
hasRequiredConnectionProps
public boolean hasRequiredConnectionProps()
Verifies that the connection properties are set and and valid.- Returns:
- A boolean if the requirements have been met.
-
hasRequiredClientProps
public boolean hasRequiredClientProps()
Returns true if required properties for FluoClient are set
-
hasRequiredAdminProps
public boolean hasRequiredAdminProps()
Returns true if required properties for FluoAdmin are set
-
hasRequiredOracleProps
public boolean hasRequiredOracleProps()
Returns true if required properties for Oracle are set
-
hasRequiredWorkerProps
public boolean hasRequiredWorkerProps()
Returns true if required properties for Worker are set
-
hasRequiredMiniFluoProps
public boolean hasRequiredMiniFluoProps()
Returns true if required properties for MiniFluo are set
-
getClientConfiguration
public SimpleConfiguration getClientConfiguration()
Returns a SimpleConfiguration clientConfig with properties set from this configuration- Returns:
- SimpleConfiguration
-
getDefaultConfiguration
public static SimpleConfiguration getDefaultConfiguration()
Returns configuration with all Fluo properties set to their default. NOTE - some properties do not have defaults and will not be set.
-
setDefaultConfiguration
public static void setDefaultConfiguration(SimpleConfiguration config)
Sets all Fluo properties to their default in the given configuration. NOTE - some properties do not have defaults and will not be set.
-
-