Esempio n. 1
0
def stop_spark():
    from charms.spark import Spark  # in lib/charms; not available until after bootstrap

    hookenv.status_set('maintenance', 'Stopping Apache Spark')
    spark = Spark()
    spark.close_ports()
    spark.stop()
Esempio n. 2
0
def stop_spark():
    hookenv.status_set("maintenance", "Stopping Livy REST server")
    dist = DistConfig(data=layer.options("livy"))
    livy = Livy(dist)
    livy.close_ports()
    livy.stop()
    remove_state("livy.started")

    hookenv.status_set("maintenance", "Stopping Apache Spark")
    dist = DistConfig(data=layer.options("apache-spark"))
    spark = Spark(dist)
    spark.close_ports()
    spark.stop()
    remove_state("spark.started")
Esempio n. 3
0
def stop_spark():
    hookenv.status_set('maintenance', 'Stopping Livy REST server')
    dist = DistConfig(data=layer.options('livy'))
    livy = Livy(dist)
    livy.close_ports()
    livy.stop()
    remove_state('livy.started')

    hookenv.status_set('maintenance', 'Stopping Apache Spark')
    dist = DistConfig(data=layer.options('apache-spark'))
    spark = Spark(dist)
    spark.close_ports()
    spark.stop()
    remove_state('spark.started')
Esempio n. 4
0
def stop_spark():
    hookenv.status_set('maintenance', 'Stopping Apache Spark')
    spark = Spark(get_dist_config())
    spark.close_ports()
    spark.stop()
    remove_state('spark.started')