Class ConfiguratorBase

    • Constructor Detail

      • ConfiguratorBase

        public ConfiguratorBase()
    • Method Detail

      • enumToConfKey

        protected static String enumToConfKey​(Class<?> implementingClass,
                                              Enum<?> e)
        Provides a configuration key for a given feature enum, prefixed by the implementingClass
        Parameters:
        implementingClass - the class whose name will be used as a prefix for the property configuration key
        e - the enum used to provide the unique part of the configuration key
        Returns:
        the configuration key
        Since:
        1.6.0
      • enumToConfKey

        protected static String enumToConfKey​(Enum<?> e)
        Provides a configuration key for a given feature enum.
        Parameters:
        e - the enum used to provide the unique part of the configuration key
        Returns:
        the configuration key
      • setClientProperties

        public static void setClientProperties​(Class<?> implementingClass,
                                               org.apache.hadoop.conf.Configuration conf,
                                               Properties props,
                                               String clientPropsPath)
      • getClientProperties

        public static Properties getClientProperties​(Class<?> implementingClass,
                                                     org.apache.hadoop.conf.Configuration conf)
      • isClientConfigured

        public static Boolean isClientConfigured​(Class<?> implementingClass,
                                                 org.apache.hadoop.conf.Configuration conf)
        Determines if the connector info has already been set for this instance.
        Parameters:
        implementingClass - the class whose name will be used as a prefix for the property configuration key
        conf - the Hadoop configuration object to configure
        Returns:
        true if the connector info has already been set, false otherwise
        Since:
        1.6.0
      • createClient

        public static AccumuloClient createClient​(Class<?> implementingClass,
                                                  org.apache.hadoop.conf.Configuration conf)
        Creates an AccumuloClient based on the configuration that must be closed by user
        Parameters:
        implementingClass - class whose name will be used as a prefix for the property configuration
        conf - Hadoop configuration object
        Returns:
        AccumuloClient that must be closed by user
        Since:
        2.0.0
      • setVisibilityCacheSize

        public static void setVisibilityCacheSize​(org.apache.hadoop.conf.Configuration conf,
                                                  int visibilityCacheSize)
        Sets the valid visibility count for this job.
        Parameters:
        conf - the Hadoop configuration object to configure
        visibilityCacheSize - the LRU cache size
      • getVisibilityCacheSize

        public static int getVisibilityCacheSize​(org.apache.hadoop.conf.Configuration conf)
        Gets the valid visibility count for this job.
        Parameters:
        conf - the Hadoop configuration object to configure
        Returns:
        the valid visibility count
      • setJobStored

        public static void setJobStored​(Class<?> implementingClass,
                                        org.apache.hadoop.conf.Configuration conf)
        The store method was called.
        Since:
        2.0.0
      • checkJobStored

        public static void checkJobStored​(Class<?> implementingClass,
                                          org.apache.hadoop.conf.Configuration conf)
        Checks if the job store method was called. If not throw exception.
        Since:
        2.0.0