def stop_hive_wait_hdfs(db): hookenv.status_set('maintenance', 'Stopping Apache Hive') hive = Hive(get_dist_config()) hive.stop() hive.close_ports() remove_state('hive.started') hookenv.status_set('blocked', 'Waiting for Hadoop connection')