Provides details about the specified jobflow

   emr.describe_cluster('j-123')

 http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_DescribeCluster.html
196770
def describe_cluster(jobflow_id)
      params = {
        :operation => 'DescribeCluster',
        :cluster_id => jobflow_id,
      }
      aws_result = @aws_request.submit(params)
      yield aws_result if block_given?
      JSON.parse(aws_result)
    end
168443
def parse_cluster(self, global_params, region, cluster):
        
        cluster_id = cluster['Id']
        cluster = api_clients[region].describe_cluster(ClusterId = cluster_id)['Cluster']
        cluster['id'] = cluster.pop('Id')
        cluster['name'] = cluster.pop('Name')
        vpc_id = 'TODO' # The EMR API won't disclose the VPC ID, so wait until all configs have been fetch and look up the VPC based on the subnet ID
        manage_dictionary(self.vpcs, vpc_id, VPCConfig(self.vpc_resource_types))
        self.vpcs[vpc_id].clusters[cluster_id] = cluster
197795
def ls(ctx, name):
    """"""
    session = create_session(ctx.obj['AWS_PROFILE_NAME'])

    client = session.client('emr')
    results = client.list_clusters(
        ClusterStates=['RUNNING', 'STARTING', 'BOOTSTRAPPING', 'WAITING']
    )
    for cluster in results['Clusters']:
        click.echo("{0}\t{1}\t{2}".format(cluster['Id'], cluster['Name'], cluster['Status']['State']))
1021315
def describe(DomainName,
             region=None, key=None, keyid=None, profile=None):
    '''
    

    '''

    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        domain = conn.describe_elasticsearch_domain_config(DomainName=DomainName)
        if domain and 'DomainConfig' in domain:
            domain = domain['DomainConfig']
            keys = ('ElasticsearchClusterConfig', 'EBSOptions', 'AccessPolicies',
                    'SnapshotOptions', 'AdvancedOptions')
            return {'domain': dict([(k, domain.get(k, {}).get('Options')) for k in keys if k in domain])}
        else:
            return {'domain': None}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
1154934
public void createCluster() {
        AmazonElasticMapReduce emr = sparkEmrClientBuilder.build();
        Optional<ClusterSummary> csr = findClusterWithName(emr, sparkClusterName);
        if (csr.isPresent()) {
            String msg = String.format("A cluster with name %s and id %s is already deployed", sparkClusterName, csr.get().getId());
            log.error(msg);
            throw new IllegalStateException(msg);
        } else {
            RunJobFlowResult res = emr.runJobFlow(sparkRunJobFlowRequest);
            String msg = String.format("Your cluster is launched with name %s and id %s.", sparkClusterName, res.getJobFlowId());
            log.info(msg);
        }

    }
577780
public JobDetails getJobByJobID(String cluster, String jobId,
      boolean populateTasks) throws IOException {
    return getJobByJobID(new QualifiedJobId(cluster, jobId), populateTasks);
  }
257384
def append_underlying_workflow_describe(globalworkflow_desc):
    
    if not globalworkflow_desc or \
            globalworkflow_desc['class'] != 'globalworkflow' or \
            not 'regionalOptions' in globalworkflow_desc:
        return globalworkflow_desc

    for region, config in globalworkflow_desc['regionalOptions'].items():
        workflow_id = config['workflow']
        workflow_desc = dxpy.api.workflow_describe(workflow_id)
        globalworkflow_desc['regionalOptions'][region]['workflowDescribe'] = workflow_desc
    return globalworkflow_desc
863804
function buildClusterAllocationExplain (opts) {
  // eslint-disable-next-line no-unused-vars
  const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
  /**
   * Perform a [cluster.allocation_explain](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html) request
   *
   * @param {boolean} include_yes_decisions - Return 'YES' decisions in explanation (default: false)
   * @param {boolean} include_disk_info - Return information about disk usage and shard sizes (default: false)
   * @param {object} body - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
   */

  const acceptedQuerystring = [
    'include_yes_decisions',
    'include_disk_info',
    'pretty',
    'human',
    'error_trace',
    'source',
    'filter_path'
  ]

  const snakeCase = {
    includeYesDecisions: 'include_yes_decisions',
    includeDiskInfo: 'include_disk_info',
    errorTrace: 'error_trace',
    filterPath: 'filter_path'
  }

  return function clusterAllocationExplain (params, options, callback) {
    options = options || {}
    if (typeof options === 'function') {
      callback = options
      options = {}
    }
    if (typeof params === 'function' || params == null) {
      callback = params
      params = {}
      options = {}
    }

    // validate headers object
    if (options.headers != null && typeof options.headers !== 'object') {
      const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
      return handleError(err, callback)
    }

    var warnings = []
    var { method, body, ...querystring } = params
    querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)

    if (method == null) {
      method = body == null ? 'GET' : 'POST'
    }

    var ignore = options.ignore
    if (typeof ignore === 'number') {
      options.ignore = [ignore]
    }

    var path = ''

    path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'

    // build request object
    const request = {
      method,
      path,
      body: body || '',
      querystring
    }

    options.warnings = warnings.length === 0 ? null : warnings
    return makeRequest(request, options, callback)
  }
}
1372144
def _get_cluster_dict(cluster_name, cluster_ref):
    '''
    
    '''

    log.trace('Building a dictionary representation of cluster \'%s\'', cluster_name)
    props = salt.utils.vmware.get_properties_of_managed_object(
        cluster_ref,
        properties=['configurationEx'])
    res = {'ha': {'enabled': props['configurationEx'].dasConfig.enabled},
           'drs': {'enabled': props['configurationEx'].drsConfig.enabled}}
    # Convert HA properties of interest
    ha_conf = props['configurationEx'].dasConfig
    log.trace('ha_conf = %s', ha_conf)
    res['ha']['admission_control_enabled'] = ha_conf.admissionControlEnabled
    if ha_conf.admissionControlPolicy and \
       isinstance(ha_conf.admissionControlPolicy,
                  vim.ClusterFailoverResourcesAdmissionControlPolicy):
        pol = ha_conf.admissionControlPolicy
        res['ha']['admission_control_policy'] = \
                {'cpu_failover_percent': pol.cpuFailoverResourcesPercent,
                 'memory_failover_percent': pol.memoryFailoverResourcesPercent}
    if ha_conf.defaultVmSettings:
        def_vm_set = ha_conf.defaultVmSettings
        res['ha']['default_vm_settings'] = \
                {'isolation_response': def_vm_set.isolationResponse,
                 'restart_priority': def_vm_set.restartPriority}
    res['ha']['hb_ds_candidate_policy'] = \
            ha_conf.hBDatastoreCandidatePolicy
    if ha_conf.hostMonitoring:
        res['ha']['host_monitoring'] = ha_conf.hostMonitoring
    if ha_conf.option:
        res['ha']['options'] = [{'key': o.key, 'value': o.value}
                                for o in ha_conf.option]
    res['ha']['vm_monitoring'] = ha_conf.vmMonitoring
    # Convert DRS properties
    drs_conf = props['configurationEx'].drsConfig
    log.trace('drs_conf = %s', drs_conf)
    res['drs']['vmotion_rate'] = 6 - drs_conf.vmotionRate
    res['drs']['default_vm_behavior'] = drs_conf.defaultVmBehavior
    # vm_swap_placement
    res['vm_swap_placement'] = props['configurationEx'].vmSwapPlacement
    # Convert VSAN properties
    si = salt.utils.vmware.get_service_instance_from_managed_object(
        cluster_ref)

    if salt.utils.vsan.vsan_supported(si):
        # XXX The correct way of retrieving the VSAN data (on the if branch)
        #  is not supported before 60u2 vcenter
        vcenter_info = salt.utils.vmware.get_service_info(si)
        if int(vcenter_info.build) >= 3634794:  # 60u2
            # VSAN API is fully supported by the VC starting with 60u2
            vsan_conf = salt.utils.vsan.get_cluster_vsan_info(cluster_ref)
            log.trace('vsan_conf = %s', vsan_conf)
            res['vsan'] = {'enabled': vsan_conf.enabled,
                           'auto_claim_storage':
                           vsan_conf.defaultConfig.autoClaimStorage}
            if vsan_conf.dataEfficiencyConfig:
                data_eff = vsan_conf.dataEfficiencyConfig
                res['vsan'].update({
                    # We force compression_enabled to be True/False
                    'compression_enabled':
                    data_eff.compressionEnabled or False,
                    'dedup_enabled': data_eff.dedupEnabled})
        else:  # before 60u2 (no advanced vsan info)
            if props['configurationEx'].vsanConfigInfo:
                default_config = \
                        props['configurationEx'].vsanConfigInfo.defaultConfig
                res['vsan'] = {
                    'enabled': props['configurationEx'].vsanConfigInfo.enabled,
                    'auto_claim_storage': default_config.autoClaimStorage}
    return res
480159
def confirm_message
      cluster = Cluster.new

      case self.type
      when 'Elasticrawl::ParseJob'
        message = segment_list
      else
        message = []
      end

      message.push('Job configuration')
      message.push(self.job_desc)
      message.push('')
      message.push(cluster.cluster_desc)

      message.join("\n")
    end
115411
def get_clusters():
        
        LOGGER.debug("ClusterService.get_clusters")
        params = SessionService.complete_transactional_req(None)
        if MappingService.driver_type != DriverFactory.DRIVER_REST:
            if params is None:
                params = {}
            params['OPERATION'] = 'getClusters'
            args = {'properties': params}
        else:
            if params is None:
                args = {'http_operation': 'GET', 'operation_path': ''}
            else:
                args = {'http_operation': 'GET', 'operation_path': '', 'parameters': params}

        response = ClusterService.requester.call(args)

        if MappingService.driver_type != DriverFactory.DRIVER_REST:
            response = response.get()

        ret = None
        if response.rc == 0:
            ret = []
            for datacenter in response.response_content['clusters']:
                ret.append(Cluster.json_2_cluster(datacenter))
        elif response.rc != 404:
            err_msg = 'ClusterService.get_clusters - Problem while getting clusters. ' \
                      'Reason: ' + str(response.response_content) + ' - ' + str(response.error_message) + \
                      " (" + str(response.rc) + ")"
            LOGGER.warning(err_msg)
            if response.rc == 500 and ArianeMappingOverloadError.ERROR_MSG in response.error_message:
                raise ArianeMappingOverloadError("ClusterService.get_clusters", ArianeMappingOverloadError.ERROR_MSG)
            # traceback.print_stack()
        return ret
836255
def get_description(self):
        
        paths = ['bpmn:collaboration/bpmn:participant/bpmn:documentation',
                 'bpmn:collaboration/bpmn:documentation',
                 'bpmn:process/bpmn:documentation']
        for path in paths:
            elm = self.root.find(path, NS)
            if elm is not None and elm.text:
                return elm.text
23289
public List<Flow> fetchFlowsWithConfig(String cluster, String username,
      String batchDesc, String signature, int limit, String... configProps)
      throws IOException {
    LOG.info(String.format(
        "Fetching last %d matching jobs for cluster=%s, user.name=%s, "
            + "batch.desc=%s, pig.logical.plan.signature=%s",
        limit, cluster, username, batchDesc, signature));

    String configParam = "";
    if (configProps != null && configProps.length > 0) {
      configParam = StringUtil.buildParam("includeConf", configProps);
    }
    String urlString = signature == null
        ? String.format("http://%s/api/v1/flow/%s/%s/%s?limit=%d&%s",
            apiHostname, cluster, username, StringUtil.cleanseToken(batchDesc),
            limit, configParam)
        : String.format("http://%s/api/v1/flow/%s/%s/%s/%s?limit=%d&%s",
            apiHostname, cluster, username, StringUtil.cleanseToken(batchDesc),
            signature, limit, configParam);

    return retrieveFlowsFromURL(urlString);
  }
459587
private StringBuilder buildFlowURL(String cluster, String username,
      String batchDesc, String signature, int limit,
      List<String> flowResponseFilters, List<String> jobResponseFilters)
      throws IOException {
    StringBuilder urlStringBuilder = new StringBuilder();
    urlStringBuilder.append("http://");
    urlStringBuilder.append(apiHostname);
    urlStringBuilder.append(RestJSONResource.SLASH);
    urlStringBuilder.append(URL_PORTION_API_V1);
    urlStringBuilder.append(FLOW_API);
    urlStringBuilder.append(RestJSONResource.SLASH);
    urlStringBuilder.append(cluster);
    urlStringBuilder.append(RestJSONResource.SLASH);
    urlStringBuilder.append(username);
    urlStringBuilder.append(RestJSONResource.SLASH);
    urlStringBuilder.append(StringUtil.cleanseToken(batchDesc));
    if (StringUtils.isNotEmpty(signature)) {
      urlStringBuilder.append(RestJSONResource.SLASH);
      urlStringBuilder.append(signature);
    }
    urlStringBuilder.append(QUESTION_MARK);
    urlStringBuilder.append(LIMIT);
    urlStringBuilder.append(EQUAL_TO);
    urlStringBuilder.append(limit);
    if ((flowResponseFilters != null) && (flowResponseFilters.size() > 0)) {
      urlStringBuilder.append(AND);
      urlStringBuilder
          .append(StringUtil.buildParam("include", flowResponseFilters));
    }

    if ((jobResponseFilters != null) && (jobResponseFilters.size() > 0)) {
      urlStringBuilder.append(AND);
      urlStringBuilder
          .append(StringUtil.buildParam("includeJobField", jobResponseFilters));
    }

    return urlStringBuilder;
  }
1114545
def describe_cache_clusters(name=None, conn=None, region=None, key=None,
                            keyid=None, profile=None, **args):
    '''
    
    '''
    return _describe_resource(name=name, name_param='CacheClusterId', res_type='cache_cluster',
                              info_node='CacheClusters', conn=conn, region=region, key=key,
                              keyid=keyid, profile=profile, **args)
1208145
static void showCluster(
      PrintWriter out, boolean advancedView, JobTracker jobTracker) {
    String cluster = "";
    try {
      cluster = JSPUtil.generateClusterResTable(jobTracker);
      if (cluster.equals("")) {
        return;
      }
    } catch (IOException e) {
      return;
    }
    out.print("<h2>Cluster Resource</h2>\n");
    out.print(cluster);
  }
820702
def analysis_describe(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/describe' % object_id, input_params, always_retry=always_retry, **kwargs)