Beispiel #1
0
def get_gc():
    final_dict = {}
    try:
       spark_worm = Worm(spark_url, spark_stage_url, True, True, "Spark")
       running_spark = spark_worm.get_running_spark()
       if running_spark is None:
           running_spark = spark_worm.get_finish_spark()  #get the first finished
       flint_worm = Worm(flint_url, flint_stage_url, True, True,  "Flint")
       running_flint = flint_worm.get_running_spark()
       if running_flint is None:
           running_flint = flint_worm.get_finish_spark()
    except Exception, e:
        print e
        return None
Beispiel #2
0
def get_json():
    """
    you can transform the ip of node which you want to monitor
    :return:
    """
    final_dict = {}
    try:
       spark_worm = Worm(spark_url, spark_stage_url, True, False, "Spark")
       running_spark = spark_worm.get_running_spark()
       if running_spark is None:
           running_spark = spark_worm.get_finish_spark()  #get the first finished
       flint_worm = Worm(flint_url, flint_stage_url, True, False,  "Flint")
       running_flint = flint_worm.get_running_spark()
       if running_flint is None:
           running_flint = flint_worm.get_finish_spark()
    except Exception, e:
        print e
        return None