Example #1
0
 def list_clusters(self):
     try:
         return [
             models.Cluster(pool)
             for pool in self.__list_clusters(aztk.models.Software.spark)
         ]
     except batch_error.BatchErrorException as e:
         raise error.AztkError(helpers.format_batch_exception(e))
Example #2
0
 def wait_until_cluster_is_ready(self, cluster_id: str):
     try:
         util.wait_for_master_to_be_ready(self, cluster_id)
         pool = self.batch_client.pool.get(cluster_id)
         nodes = self.batch_client.compute_node.list(pool_id=cluster_id)
         return models.Cluster(pool, nodes)
     except batch_error.BatchErrorException as e:
         raise error.AztkError(helpers.format_batch_exception(e))
Example #3
0
File: list.py Project: cmatc13/aztk
def list_clusters(core_cluster_operations):
    try:
        software_metadata_key = base_models.Software.spark
        return [
            models.Cluster(cluster)
            for cluster in core_cluster_operations.list(software_metadata_key)
        ]
    except batch_error.BatchErrorException as e:
        raise error.AztkError(helpers.format_batch_exception(e))
Example #4
0
 def get_cluster(self, cluster_id: str):
     try:
         pool, nodes = self.__get_pool_details(cluster_id)
         return models.Cluster(pool, nodes)
     except batch_error.BatchErrorException as e:
         raise error.AztkError(helpers.format_batch_exception(e))
Example #5
0
def get_cluster(core_cluster_operations, cluster_id: str):
    try:
        cluster = core_cluster_operations.get(cluster_id)
        return models.Cluster(cluster)
    except BatchErrorException as e:
        raise error.AztkError(helpers.format_batch_exception(e))