Managing clusters from CLI

You can manage Data Hub clusters from the CLI using the cdp datahub commands.

Required role: The DataHubAdmin or Owner roles at the scope of the Data Hub allow you to manage the Data Hub. Note that EnvironmentAdmin and Owner of the environment can also manage Data Hubs.

Monitoring clusters

  • List all available clusters: cdp datahub list-clusters
  • Describe a specific cluster: cdp datahub describe-cluster --cluster-name <value>
  • Get status of cluster hosts: cdp datahub get-cluster-host-status --cluster-name <value>
  • Get status of cluster services: cdp datahub get-cluster-service-status --cluster-name <value>

Managing clusters

  • When stack provisioning or cluster creation fails, retry the cluster to resume the process from the last failed step: cdp datahub retry-cluster --cluster-name <value>
  • Resize cluster: cdp datahub scale-cluster --cluster-name <value> --instance-group-name <value> --instance-group-desired-count <value>
  • Restart a cluster that is in stopped state: cdp datahub start-cluster --cluster-name <value>
  • Stop cluster that is in running state: cdp datahub stop-cluster --cluster-name <value>
  • Sync your cluster with cloud provider and Cloudera Manager: cdp datahub sync-cluster --cluster-name <value>
  • Repair a cluster when cluster has failed nodes: cdp datahub repair-cluster --cluster-name <value> --instance-group-names <value> --instances <value>

Deleting clusters

  • Delete one or more existing clusters: cdp datahub delete-clusters --cluster-name <value>