spark_plugin.py
def configure(self, config_map):
        """
        Configuration callback for collectd

        Args:
        config_map (dict): mapping of config name to value
        """
        collectd.info("Configuring Spark Application Plugin ...")

        required_keys = ("Cluster", "Master")

        for key in required_keys:
            if key not in config_map:
                raise ValueError("Missing required config setting: %s" % key)

        for key, value in config_map.items():
            if key == "Cluster":
                if not self._validate_cluster(value):
                    raise ValueError(
                        "Cluster value not: %s, %s, or %s", (SPARK_STANDALONE_MODE, SPARK_MESOS_MODE, SPARK_YARN_MODE)
                    )
                self.cluster_mode = value
                self.global_dimensions["cluster"] = self.cluster_mode
            elif key == "Master":
                if not self._validate_master(value):
                    raise ValueError(
                        "Master not configured as \
                                     (http://host:port)"
                    )
                self.master = value
            elif key == "Dimensions" or key == "Dimension":
                self.global_dimensions.update(_dimensions_str_to_dict(value))

            elif key == "EnhancedMetrics" and value == "True":
                self.enhanced_flag = True
            elif key == "IncludeMetrics":
                _add_metrics_to_set(self.include, value)
            elif key == "ExcludeMetrics":
                _add_metrics_to_set(self.exclude, value)

        collectd.info("Successfully configured Spark Application Plugin")

        Configuration callback for collectd

        Args:
        config_map (dict): mapping of config name to value
        
Configuration callback for collectd
Args:
config_map (dict): mapping of config name to value
Configuration callback for collectd Args : config_map ( dict ) : mapping of config name to value
def configure(self, config_map):
        collectd.info("Configuring Spark Application Plugin ...")
        required_keys = ("Cluster", "Master")
        for key in required_keys:
            if key not in config_map:
                raise ValueError("Missing required config setting: %s" % key)
        for key, value in config_map.items():
            if key == "Cluster":
                if not self._validate_cluster(value):
                    raise ValueError(
                        "Cluster value not: %s, %s, or %s", (SPARK_STANDALONE_MODE, SPARK_MESOS_MODE, SPARK_YARN_MODE)
                    )
                self.cluster_mode = value
                self.global_dimensions["cluster"] = self.cluster_mode
            elif key == "Master":
                if not self._validate_master(value):
                    raise ValueError(
                        "Master not configured as \
                                     (http://host:port)"
                    )
                self.master = value
            elif key == "Dimensions" or key == "Dimension":
                self.global_dimensions.update(_dimensions_str_to_dict(value))
            elif key == "EnhancedMetrics" and value == "True":
                self.enhanced_flag = True
            elif key == "IncludeMetrics":
                _add_metrics_to_set(self.include, value)
            elif key == "ExcludeMetrics":
                _add_metrics_to_set(self.exclude, value)
        collectd.info("Successfully configured Spark Application Plugin")
def configure ( self , config_map ) : collectd . info ( "Configuring Spark Application Plugin ..." ) required_keys = ( "Cluster" , "Master" ) for key in required_keys : if key not in config_map : raise ValueError ( "Missing required config setting: %s" % key ) for key , value in config_map . items ( ) : if key == "Cluster" : if not self . _validate_cluster ( value ) : raise ValueError ( "Cluster value not: %s, %s, or %s" , ( SPARK_STANDALONE_MODE , SPARK_MESOS_MODE , SPARK_YARN_MODE ) ) self . cluster_mode = value self . global_dimensions [ "cluster" ] = self . cluster_mode elif key == "Master" : if not self . _validate_master ( value ) : raise ValueError ( "Master not configured as \
                                     (http://host:port)" ) self . master = value elif key == "Dimensions" or key == "Dimension" : self . global_dimensions . update ( _dimensions_str_to_dict ( value ) ) elif key == "EnhancedMetrics" and value == "True" : self . enhanced_flag = True elif key == "IncludeMetrics" : _add_metrics_to_set ( self . include , value ) elif key == "ExcludeMetrics" : _add_metrics_to_set ( self . exclude , value ) collectd . info ( "Successfully configured Spark Application Plugin" )
Configuration callback for collectd
Args:
config_map (dict): mapping of config name to value
Configuration callback for collectd Args : config_map ( dict ) : mapping of config name to value
"""
        Configuration callback for collectd

        Args:
        config_map (dict): mapping of config name to value
        """
self
config_map