Class ClientConfiguration

java.lang.Object
org.apache.accumulo.core.client.ClientConfiguration

@Deprecated(since="2.0.0") public class ClientConfiguration extends Object
Deprecated.
since 2.0.0, replaced by Accumulo.newClient()
Contains a list of property keys recognized by the Accumulo client and convenience methods for setting them.
Since:
1.6.0
  • Field Details

  • Method Details

    • 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:
    • 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

      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

      Deprecated.
      Same as setProperty(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 as setProperty(String, String) but returns the ClientConfiguration for chaining purposes
      Since:
      1.9.0
    • withInstance

      public ClientConfiguration withInstance(String instanceName)
      Deprecated.
      Same as with(ClientProperty, String) for ClientProperty.INSTANCE_NAME
    • withInstance

      public ClientConfiguration withInstance(UUID instanceId)
      Deprecated.
      Same as with(ClientProperty, String) for ClientProperty.INSTANCE_ID
    • withZkHosts

      public ClientConfiguration withZkHosts(String zooKeepers)
      Deprecated.
      Same as with(ClientProperty, String) for ClientProperty.INSTANCE_ZK_HOST
    • withZkTimeout

      public ClientConfiguration withZkTimeout(int timeout)
      Deprecated.
      Same as with(ClientProperty, String) for ClientProperty.INSTANCE_ZK_TIMEOUT
    • withSsl

      public ClientConfiguration withSsl(boolean sslEnabled)
      Deprecated.
      Same as withSsl(boolean, boolean) with useJsseConfig set to false
    • withSsl

      public ClientConfiguration withSsl(boolean sslEnabled, boolean useJsseConfig)
      Deprecated.
      Same as with(ClientProperty, String) for ClientProperty.INSTANCE_RPC_SSL_ENABLED and ClientProperty.RPC_USE_JSSE
    • withTruststore

      public ClientConfiguration withTruststore(String path)
      Deprecated.
      Same as withTruststore(String, String, String) with password null and type null
    • withTruststore

      public 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
    • withKeystore

      public ClientConfiguration withKeystore(String path)
      Deprecated.
      Same as withKeystore(String, String, String) with password null and type null
    • withKeystore

      public 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
    • withSasl

      public ClientConfiguration withSasl(boolean saslEnabled)
      Deprecated.
      Same as with(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 as with(ClientProperty, String) for ClientProperty.INSTANCE_RPC_SASL_ENABLED and ClientProperty.GENERAL_KERBEROS_PRINCIPAL.
      Parameters:
      saslEnabled - Should SASL(kerberos) be enabled
      kerberosServerPrimary - 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.
    • getKeys

      public Iterator<String> getKeys()
      Deprecated.
    • getString

      public String getString(String key)
      Deprecated.