Class Environment


  • public class Environment
    extends Object
    The test environment that is available for randomwalk tests. This includes configuration properties that are available to any randomwalk test and facilities for creating client-side objects. This class is not thread-safe.
    • Field Detail

      • KEY_INSTANCE

        public static final String KEY_INSTANCE
        The configuration property key for the instance name.
        See Also:
        Constant Field Values
      • KEY_ZOOKEEPERS

        public static final String KEY_ZOOKEEPERS
        The configuration property key for the comma-separated list of ZooKeepers.
        See Also:
        Constant Field Values
      • KEY_MAX_MEM

        public static final String KEY_MAX_MEM
        The configuration property key for the maximum memory for the multi-table batch writer.
        See Also:
        Constant Field Values
      • KEY_MAX_LATENCY

        public static final String KEY_MAX_LATENCY
        The configuration property key for the maximum latency, in milliseconds, for the multi-table batch writer.
        See Also:
        Constant Field Values
      • KEY_NUM_THREADS

        public static final String KEY_NUM_THREADS
        The configuration property key for the number of write threads for the multi-table batch writer.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Environment

        public Environment​(Properties p)
        Creates a new test environment.
        Parameters:
        p - configuration properties
        Throws:
        NullPointerException - if p is null
    • Method Detail

      • getConfigProperty

        public String getConfigProperty​(String key)
        Gets a configuration property.
        Parameters:
        key - key
        Returns:
        property value
      • getUserName

        public String getUserName()
        Gets the configured username.
        Returns:
        username
      • getPassword

        public String getPassword()
        Gets the configured password.
        Returns:
        password
      • getKeytab

        public String getKeytab()
        Gets the configured keytab.
        Returns:
        path to keytab
      • getPid

        public String getPid()
        Gets this process's ID.
        Returns:
        pid
      • getToken

        public AuthenticationToken getToken()
        Gets an authentication token based on the configured password.
        Returns:
        authentication token
      • getInstance

        public Instance getInstance()
        Gets an Accumulo instance object. The same instance is reused after the first call.
        Returns:
        instance
      • isMultiTableBatchWriterInitialized

        public boolean isMultiTableBatchWriterInitialized()
        Checks if a multitable batch writer has been created by this wrapper.
        Returns:
        true if multitable batch writer is already created
      • resetMultiTableBatchWriter

        public void resetMultiTableBatchWriter()
        Clears the multitable batch writer previously created and remembered by this wrapper.