Accumulo.newClient()
@Deprecated public class ClientConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ClientConfiguration.ClientProperty
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_CONF_FILENAME
Deprecated.
|
static String |
USER_ACCUMULO_DIR_NAME
Deprecated.
|
static String |
USER_CONF_FILENAME
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(String key)
Deprecated.
|
static ClientConfiguration |
create()
Deprecated.
Initializes an empty configuration object to be further configured with other methods on the
class.
|
static ClientConfiguration |
deserialize(String serializedConfig)
Deprecated.
|
static ClientConfiguration |
fromFile(File file)
Deprecated.
Initializes a configuration object from the contents of a configuration file.
|
static ClientConfiguration |
fromMap(Map<String,String> properties)
Deprecated.
Initializes a configuration object from the contents of a map.
|
String |
get(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.
|
String |
getString(String key)
Deprecated.
|
boolean |
hasSasl()
Deprecated.
Show whether SASL has been set on this configuration.
|
static ClientConfiguration |
loadDefault()
Deprecated.
Attempts to load a configuration file from the system using the default search paths.
|
String |
serialize()
Deprecated.
|
void |
setProperty(ClientConfiguration.ClientProperty prop,
String value)
Deprecated.
Sets the value of property to value
|
void |
setProperty(String prop,
String value)
Deprecated.
Sets the value of property to value
|
ClientConfiguration |
with(ClientConfiguration.ClientProperty prop,
String value)
Deprecated.
Same as
setProperty(ClientProperty, String) but returns the ClientConfiguration for
chaining purposes |
ClientConfiguration |
with(String prop,
String value)
Deprecated.
Same as
setProperty(String, String) but returns the ClientConfiguration for chaining
purposes |
ClientConfiguration |
withInstance(String instanceName)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_NAME |
ClientConfiguration |
withInstance(UUID instanceId)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_ID |
ClientConfiguration |
withKeystore(String path)
Deprecated.
Same as
withKeystore(String, String, String) with password null and type null |
ClientConfiguration |
withKeystore(String path,
String password,
String type)
Deprecated.
Same as
with(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 |
ClientConfiguration |
withSasl(boolean saslEnabled)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_RPC_SASL_ENABLED. |
ClientConfiguration |
withSasl(boolean saslEnabled,
String kerberosServerPrimary)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_RPC_SASL_ENABLED and
ClientProperty.GENERAL_KERBEROS_PRINCIPAL. |
ClientConfiguration |
withSsl(boolean sslEnabled)
Deprecated.
Same as
withSsl(boolean, boolean) with useJsseConfig set to false |
ClientConfiguration |
withSsl(boolean sslEnabled,
boolean useJsseConfig)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_RPC_SSL_ENABLED and
ClientProperty.RPC_USE_JSSE |
ClientConfiguration |
withTruststore(String path)
Deprecated.
Same as
withTruststore(String, String, String) with password null and type null |
ClientConfiguration |
withTruststore(String path,
String password,
String type)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.RPC_SSL_TRUSTORE_PATH,
ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and ClientProperty.RPC_SSL_TRUSTORE_TYPE |
ClientConfiguration |
withZkHosts(String zooKeepers)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_ZK_HOST |
ClientConfiguration |
withZkTimeout(int timeout)
Deprecated.
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_ZK_TIMEOUT |
public static final String USER_ACCUMULO_DIR_NAME
public static final String USER_CONF_FILENAME
public static final String GLOBAL_CONF_FILENAME
public static ClientConfiguration loadDefault()
If ACCUMULO_CLIENT_CONF_PATH is not set, uses the following in this order:
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.
PropertiesConfiguration
,
File.pathSeparator
public static ClientConfiguration create()
public static ClientConfiguration fromFile(File file)
file
- the path to the configuration filepublic static ClientConfiguration fromMap(Map<String,String> properties)
properties
- a map containing the configuration properties to usepublic static ClientConfiguration deserialize(String serializedConfig)
public String serialize()
public String get(ClientConfiguration.ClientProperty prop)
public Map<String,String> getAllPropertiesWithPrefix(ClientConfiguration.ClientProperty property)
property
- prefix property, must be of type PropertyType.PREFIXIllegalArgumentException
- if property is not a prefixpublic void setProperty(ClientConfiguration.ClientProperty prop, String value)
public ClientConfiguration with(ClientConfiguration.ClientProperty prop, String value)
setProperty(ClientProperty, String)
but returns the ClientConfiguration for
chaining purposespublic void setProperty(String prop, String value)
public ClientConfiguration with(String prop, String value)
setProperty(String, String)
but returns the ClientConfiguration for chaining
purposespublic ClientConfiguration withInstance(String instanceName)
with(ClientProperty, String)
for ClientProperty.INSTANCE_NAMEpublic ClientConfiguration withInstance(UUID instanceId)
with(ClientProperty, String)
for ClientProperty.INSTANCE_IDpublic ClientConfiguration withZkHosts(String zooKeepers)
with(ClientProperty, String)
for ClientProperty.INSTANCE_ZK_HOSTpublic ClientConfiguration withZkTimeout(int timeout)
with(ClientProperty, String)
for ClientProperty.INSTANCE_ZK_TIMEOUTpublic ClientConfiguration withSsl(boolean sslEnabled)
withSsl(boolean, boolean)
with useJsseConfig set to falsepublic ClientConfiguration withSsl(boolean sslEnabled, boolean useJsseConfig)
with(ClientProperty, String)
for ClientProperty.INSTANCE_RPC_SSL_ENABLED and
ClientProperty.RPC_USE_JSSEpublic ClientConfiguration withTruststore(String path)
withTruststore(String, String, String)
with password null and type nullpublic ClientConfiguration withTruststore(String path, String password, String type)
with(ClientProperty, String)
for ClientProperty.RPC_SSL_TRUSTORE_PATH,
ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and ClientProperty.RPC_SSL_TRUSTORE_TYPEpublic ClientConfiguration withKeystore(String path)
withKeystore(String, String, String)
with password null and type nullpublic ClientConfiguration withKeystore(String path, String password, String type)
with(ClientProperty, String)
for ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH,
ClientProperty.RPC_SSL_KEYSTORE_PATH, ClientProperty.RPC_SSL_KEYSTORE_PASSWORD, and
ClientProperty.RPC_SSL_KEYSTORE_TYPEpublic ClientConfiguration withSasl(boolean saslEnabled)
with(ClientProperty, String)
for ClientProperty.INSTANCE_RPC_SASL_ENABLED.public boolean hasSasl()
public ClientConfiguration withSasl(boolean saslEnabled, String kerberosServerPrimary)
with(ClientProperty, String)
for ClientProperty.INSTANCE_RPC_SASL_ENABLED and
ClientProperty.GENERAL_KERBEROS_PRINCIPAL.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')public boolean containsKey(String key)
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.