Ejemplo n.º 1
0
    def __init__(self,
                 ssh_context,
                 service_state="UN",
                 number_nodes=5,
                 owns_threshold=40,
                 priority=Priority.NORMAL,
                 timeout=None,
                 hosts=None,
                 cluster_name='anonymous'):
        SshValidation.__init__(self,
                               ssh_context,
                               "Cassandra nodetool status",
                               priority=priority,
                               timeout=timeout,
                               hosts=hosts)
        # Service State is different from Service Status but I don't
        # want to break backwards compatibility so we parse the
        # service_state which is really made up of the service state
        # and service status values.
        if service_state and len(service_state) == 2:
            self.service_status = Status.from_text(service_state[0])
            self.service_state = State.from_text(service_state[1])
        else:
            self.service_state = State.UP
            self.service_status = Status.NORMAL

        self.number_nodes = number_nodes
        self.owns_threshold = owns_threshold
        self.cluster_name = cluster_name
Ejemplo n.º 2
0
 def __init__(self, ssh_context,
              zookeeper_nodes,
              kafka_list_topic_command="/opt/kafka/bin/kafka-list-topic.sh",
              priority=Priority.NORMAL, timeout=None,
              hosts=None):
     SshValidation.__init__(self, ssh_context,
                            "Kafka partition status",
                            priority=priority,
                            timeout=timeout,
                            hosts=hosts)
     self.kafka_list_topic_command = kafka_list_topic_command
     self.zookeeper_nodes = zookeeper_nodes
Ejemplo n.º 3
0
 def __init__(self, ssh_context,
              zookeeper_nodes,
              kafka_list_topic_command="/opt/kafka/bin/kafka-list-topic.sh",
              priority=Priority.NORMAL, timeout=None,
              hosts=None, cluster_name='anonymous'):
     SshValidation.__init__(self, ssh_context,
                            "Kafka partition status",
                            priority=priority,
                            timeout=timeout,
                            hosts=hosts)
     self.kafka_list_topic_command = kafka_list_topic_command
     self.zookeeper_nodes = zookeeper_nodes
     self.cluster_name = cluster_name
Ejemplo n.º 4
0
 def __init__(self, ssh_context, service_state="UN",
              number_nodes=5, owns_threshold=40,
              priority=Priority.NORMAL, timeout=None,
              hosts=None):
     SshValidation.__init__(self, ssh_context,
                            "Cassandra nodetool status",
                            priority=priority,
                            timeout=timeout, hosts=hosts)
     # Service State is different from Service Status but I don't
     # want to break backwards compatibility so we parse the
     # service_state which is really made up of the service state
     # and service status values.
     if service_state and len(service_state) == 2:
         self.service_status = Status.from_text(service_state[0])
         self.service_state = State.from_text(service_state[1])
     else:
         self.service_state = State.UP
         self.service_status = Status.NORMAL
         
     self.number_nodes = number_nodes
     self.owns_threshold = owns_threshold