Package org.apache.accumulo.core.client
Class ClientConfiguration
- java.lang.Object
-
- org.apache.accumulo.core.client.ClientConfiguration
-
@Deprecated public class ClientConfiguration extends Object
Deprecated.since 2.0.0, replaced byAccumulo.newClient()Contains a list of property keys recognized by the Accumulo client and convenience methods for setting them.- Since:
- 1.6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClientConfiguration.ClientPropertyDeprecated.
-
Field Summary
Fields Modifier and Type Field Description static StringGLOBAL_CONF_FILENAMEDeprecated.static StringUSER_ACCUMULO_DIR_NAMEDeprecated.static StringUSER_CONF_FILENAMEDeprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsKey(String key)Deprecated.static ClientConfigurationcreate()Deprecated.Initializes an empty configuration object to be further configured with other methods on the class.static ClientConfigurationdeserialize(String serializedConfig)Deprecated.static ClientConfigurationfromFile(File file)Deprecated.Initializes a configuration object from the contents of a configuration file.static ClientConfigurationfromMap(Map<String,String> properties)Deprecated.Initializes a configuration object from the contents of a map.Stringget(ClientConfiguration.ClientProperty prop)Deprecated.Returns the value for prop, the default value if not present.Map<String,String>getAllPropertiesWithPrefix(ClientConfiguration.ClientProperty property)Deprecated.Gets all properties under the given prefix in this configuration.Iterator<String>getKeys()Deprecated.StringgetString(String key)Deprecated.booleanhasSasl()Deprecated.Show whether SASL has been set on this configuration.static ClientConfigurationloadDefault()Deprecated.Attempts to load a configuration file from the system using the default search paths.Stringserialize()Deprecated.voidsetProperty(String prop, String value)Deprecated.Sets the value of property to valuevoidsetProperty(ClientConfiguration.ClientProperty prop, String value)Deprecated.Sets the value of property to valueClientConfigurationwith(String prop, String value)Deprecated.Same assetProperty(String, String)but returns the ClientConfiguration for chaining purposesClientConfigurationwith(ClientConfiguration.ClientProperty prop, String value)Deprecated.Same assetProperty(ClientProperty, String)but returns the ClientConfiguration for chaining purposesClientConfigurationwithInstance(String instanceName)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_NAMEClientConfigurationwithInstance(UUID instanceId)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_IDClientConfigurationwithKeystore(String path)Deprecated.Same aswithKeystore(String, String, String)with password null and type nullClientConfigurationwithKeystore(String path, String password, String type)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH, ClientProperty.RPC_SSL_KEYSTORE_PATH, ClientProperty.RPC_SSL_KEYSTORE_PASSWORD, and ClientProperty.RPC_SSL_KEYSTORE_TYPEClientConfigurationwithSasl(boolean saslEnabled)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SASL_ENABLED.ClientConfigurationwithSasl(boolean saslEnabled, String kerberosServerPrimary)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SASL_ENABLED and ClientProperty.GENERAL_KERBEROS_PRINCIPAL.ClientConfigurationwithSsl(boolean sslEnabled)Deprecated.Same aswithSsl(boolean, boolean)with useJsseConfig set to falseClientConfigurationwithSsl(boolean sslEnabled, boolean useJsseConfig)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SSL_ENABLED and ClientProperty.RPC_USE_JSSEClientConfigurationwithTruststore(String path)Deprecated.Same aswithTruststore(String, String, String)with password null and type nullClientConfigurationwithTruststore(String path, String password, String type)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.RPC_SSL_TRUSTORE_PATH, ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and ClientProperty.RPC_SSL_TRUSTORE_TYPEClientConfigurationwithZkHosts(String zooKeepers)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_ZK_HOSTClientConfigurationwithZkTimeout(int timeout)Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_ZK_TIMEOUT
-
-
-
Field Detail
-
USER_ACCUMULO_DIR_NAME
public static final String USER_ACCUMULO_DIR_NAME
Deprecated.- See Also:
- Constant Field Values
-
USER_CONF_FILENAME
public static final String USER_CONF_FILENAME
Deprecated.- See Also:
- Constant Field Values
-
GLOBAL_CONF_FILENAME
public static final String GLOBAL_CONF_FILENAME
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadDefault
public static ClientConfiguration loadDefault()
Deprecated.Attempts to load a configuration file from the system using the default search paths. Uses the ACCUMULO_CLIENT_CONF_PATH environment variable, split on File.pathSeparator, for a list of target files.If ACCUMULO_CLIENT_CONF_PATH is not set, uses the following in this order:
- ~/.accumulo/config
- $ACCUMULO_CONF_DIR/client.conf, if $ACCUMULO_CONF_DIR is defined.
- /etc/accumulo/client.conf
- /etc/accumulo/conf/client.conf
A client configuration will then be read from each location using PropertiesConfiguration to construct a configuration. That means the latest item will be the one in the configuration.
- See Also:
PropertiesConfiguration,File.pathSeparator
-
create
public static ClientConfiguration create()
Deprecated.Initializes an empty configuration object to be further configured with other methods on the class.- Since:
- 1.9.0
-
fromFile
public static ClientConfiguration fromFile(File file)
Deprecated.Initializes a configuration object from the contents of a configuration file. Currently supports Java "properties" files. The returned object can be further configured with subsequent calls to other methods on this class.- Parameters:
file- the path to the configuration file- Since:
- 1.9.0
-
fromMap
public static ClientConfiguration fromMap(Map<String,String> properties)
Deprecated.Initializes a configuration object from the contents of a map. The returned object can be further configured with subsequent calls to other methods on this class.- Parameters:
properties- a map containing the configuration properties to use- Since:
- 1.9.0
-
deserialize
public static ClientConfiguration deserialize(String serializedConfig)
Deprecated.
-
serialize
public String serialize()
Deprecated.
-
get
public String get(ClientConfiguration.ClientProperty prop)
Deprecated.Returns the value for prop, the default value if not present.
-
getAllPropertiesWithPrefix
public Map<String,String> getAllPropertiesWithPrefix(ClientConfiguration.ClientProperty property)
Deprecated.Gets all properties under the given prefix in this configuration.- Parameters:
property- prefix property, must be of type PropertyType.PREFIX- Returns:
- a map of property keys to values
- Throws:
IllegalArgumentException- if property is not a prefix
-
setProperty
public void setProperty(ClientConfiguration.ClientProperty prop, String value)
Deprecated.Sets the value of property to value
-
with
public ClientConfiguration with(ClientConfiguration.ClientProperty prop, String value)
Deprecated.Same assetProperty(ClientProperty, String)but returns the ClientConfiguration for chaining purposes
-
setProperty
public void setProperty(String prop, String value)
Deprecated.Sets the value of property to value- Since:
- 1.9.0
-
with
public ClientConfiguration with(String prop, String value)
Deprecated.Same assetProperty(String, String)but returns the ClientConfiguration for chaining purposes- Since:
- 1.9.0
-
withInstance
public ClientConfiguration withInstance(String instanceName)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_NAME
-
withInstance
public ClientConfiguration withInstance(UUID instanceId)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_ID
-
withZkHosts
public ClientConfiguration withZkHosts(String zooKeepers)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_ZK_HOST
-
withZkTimeout
public ClientConfiguration withZkTimeout(int timeout)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_ZK_TIMEOUT
-
withSsl
public ClientConfiguration withSsl(boolean sslEnabled)
Deprecated.Same aswithSsl(boolean, boolean)with useJsseConfig set to false
-
withSsl
public ClientConfiguration withSsl(boolean sslEnabled, boolean useJsseConfig)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SSL_ENABLED and ClientProperty.RPC_USE_JSSE
-
withTruststore
public ClientConfiguration withTruststore(String path)
Deprecated.Same aswithTruststore(String, String, String)with password null and type null
-
withTruststore
public ClientConfiguration withTruststore(String path, String password, String type)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.RPC_SSL_TRUSTORE_PATH, ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and ClientProperty.RPC_SSL_TRUSTORE_TYPE
-
withKeystore
public ClientConfiguration withKeystore(String path)
Deprecated.Same aswithKeystore(String, String, String)with password null and type null
-
withKeystore
public ClientConfiguration withKeystore(String path, String password, String type)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH, ClientProperty.RPC_SSL_KEYSTORE_PATH, ClientProperty.RPC_SSL_KEYSTORE_PASSWORD, and ClientProperty.RPC_SSL_KEYSTORE_TYPE
-
withSasl
public ClientConfiguration withSasl(boolean saslEnabled)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SASL_ENABLED.- Since:
- 1.7.0
-
hasSasl
public boolean hasSasl()
Deprecated.Show whether SASL has been set on this configuration.- Since:
- 1.9.0
-
withSasl
public ClientConfiguration withSasl(boolean saslEnabled, String kerberosServerPrimary)
Deprecated.Same aswith(ClientProperty, String)for ClientProperty.INSTANCE_RPC_SASL_ENABLED and ClientProperty.GENERAL_KERBEROS_PRINCIPAL.- Parameters:
saslEnabled- Should SASL(kerberos) be enabledkerberosServerPrimary- The 'primary' component of the Kerberos principal Accumulo servers use to login (e.g. 'accumulo' in 'accumulo/_HOST@REALM')- Since:
- 1.7.0
-
containsKey
public boolean containsKey(String key)
Deprecated.
-
-