get cluster's summary, it will contain SupervisorSummary and TopologySummary

@return ClusterSummary
760726
@Override
    public ClusterSummary getClusterInfo() throws TException {
        long start = System.nanoTime();
        try {
            StormClusterState stormClusterState = data.getStormClusterState();

            Map<String, Assignment> assignments = new HashMap<>();

            // get TopologySummary
            List<TopologySummary> topologySummaries = NimbusUtils.getTopologySummary(stormClusterState, assignments);

            // all supervisors
            Map<String, SupervisorInfo> supervisorInfos = Cluster.get_all_SupervisorInfo(stormClusterState, null);

            // generate SupervisorSummaries
            List<SupervisorSummary> supervisorSummaries = NimbusUtils.mkSupervisorSummaries(supervisorInfos, assignments);

            NimbusSummary nimbusSummary = NimbusUtils.getNimbusSummary(stormClusterState, supervisorSummaries, data);

            return new ClusterSummary(nimbusSummary, supervisorSummaries, topologySummaries);
        } catch (TException e) {
            LOG.info("Failed to get ClusterSummary ", e);
            throw e;
        } catch (Exception e) {
            LOG.info("Failed to get ClusterSummary ", e);
            throw new TException(e);
        } finally {
            long end = System.nanoTime();
            SimpleJStormMetric.updateNimbusHistogram("getClusterInfo", (end - start) / TimeUtils.NS_PER_US);
        }
    }
554718
@Override
	public Clustering getClusteringResult() {
		List<double[]> microClustering;
		// If the buffer phase is active then the buffer (without duplicates) is
		// equal to the micro clustering
		if (this.bufferPhase) {
			microClustering = new ArrayList<double[]>(this.buffer.size());
			for (double[] pointA : this.buffer) {
				// Searches for a duplicate of the current point
				boolean duplicate = false;
				for (double[] pointB : microClustering) {
					int i;
					for (i = 0; i < pointA.length; i++) {
						if (pointA[i] != pointB[i + 1]) {
							break;
						}
					}
					if (i == pointA.length) {
						duplicate = true;
						pointB[0] += 1;
						break;
					}
				}

				if (!duplicate) {
					// Copies the point to an array with the weight in the first
					// element
					double[] pointWeighted = new double[pointA.length + 1];
					pointWeighted[0] = 1;
					System.arraycopy(pointA, 0, pointWeighted, 1, pointA.length);
					microClustering.add(pointWeighted);
				}
			}
		} else {
			// Collects all nodes as arrays with the weight in the first element
			microClustering = this.root
					.addToClusteringCenters(new ArrayList<double[]>(this.rootCount));
		}
		// Runs the k-means algorithm five times on the micro clustering
		List<double[]> result = null;
		double minValue = Double.POSITIVE_INFINITY;
		for (int i = 0; i < 5; i++) {
			// Creates the starting centroids
			List<double[]> newResult = CoresetKMeans
					.generatekMeansPlusPlusCentroids(this.numClusters,
							microClustering, this.clustererRandom);
			// Runs the k-means algorithm with changing the starting centroids
			double newValue = CoresetKMeans.kMeans(newResult, microClustering);
			// Selects the result with minimum costs
			if (newValue < minValue) {
				result = newResult;
				minValue = newValue;
			}
		}

		// Prepares the points for the clustering result
		AutoExpandVector<Cluster> resultClustering = new AutoExpandVector<Cluster>(
				result.size());
		for (double[] point : result) {
			resultClustering.add(new SphereCluster(point, 0.0));
		}
		return new Clustering(resultClustering);
	}
183758
public String summarize ()
    {
        StringBuilder buf = new StringBuilder();
        buf.append(_count).append(":");
        for (int ii = 0; ii < _buckets.length; ii++) {
            if (ii > 0) {
                buf.append(",");
            }
            buf.append(_buckets[ii]);
        }
        return buf.toString();
    }
898606
public function getSummary()
    {
        if ($this->ActionSummary) {
            return $this->obj('ActionSummary');
        }
        if ($this->Type == 'SiteTree') {
            return $this->SiteTree()->obj('ActionSummary');
        }
    }
835213
public org.tensorflow.distruntime.ClusterDef getCluster() {
    return cluster_ == null ? org.tensorflow.distruntime.ClusterDef.getDefaultInstance() : cluster_;
  }
320291
public java.util.List<ClusterDbRevision> getClusterDbRevisions() {
        if (clusterDbRevisions == null) {
            clusterDbRevisions = new com.amazonaws.internal.SdkInternalList<ClusterDbRevision>();
        }
        return clusterDbRevisions;
    }
185448
public com.google.protobuf.ByteString
      getSummaryBytes() {
    java.lang.Object ref = summary_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      summary_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
750184
public function getSummaryString() {
    $summary = array();
    if (is_array($s = $this->getSummary()) && !empty($s)) {
      foreach ($this->getSummary() as $summaryAttributes) {
        $item = array();
        if (is_array($summaryAttributes) && !empty($summaryAttributes)) {
          foreach ($summaryAttributes as $k => $v) {
            $item[] = $k . ":" . $v;
          }
        }
        $summary[] = implode(",", $item);
      }
    }
    return implode(";", $summary);
  }
1305343
public function getTopology() {
		$descriptor      = new Descriptor('APC', self::TOPOLOGY_BACKEND);
		$memoryFormatter = new Memory();
				
		$info = apc_sma_info(true);
		
		$limit  = $info['seg_size'] * $info['num_seg'];
		$used   = $limit - $info['avail_mem'];
		$filled = $used / $limit * 100;
		
		$descriptor->id     = $this->getTopologyId();
		$descriptor->used   = $memoryFormatter->format($used);
		$descriptor->limit  = $memoryFormatter->format($limit);
		$descriptor->filled = round($filled, 2) . '%';
		
		return $descriptor;
	}
1056059
public double[] toClusterCenter() {
		double[] output = new double[this.sumPoints.length + 1];
		System.arraycopy(this.sumPoints, 0, output, 1, this.sumPoints.length);
		output[0] = this.numPoints;
		for (int i = 1; i < output.length; i++) {
			output[i] /= this.numPoints;
		}
		return output;
	}
325606
public function getTopology() {
		$descriptor = new Descriptor('Memcache', self::TOPOLOGY_BACKEND);
		$descriptor->id = $this->getTopologyId();
		
		if ($this->memcacheClient === null) {
			return $descriptor;
		}
		
		$info = $this->memcacheClient->getextendedstats();
		
		if (count($info) === 1) {
			$serverInfo = current($info);
			
			$descriptor->host = key($info);
			
			$used  = $serverInfo['bytes'];
			$limit = $serverInfo['limit_maxbytes'];
		} else {
			$used   = 0;
			$limit  = 0;
			$hostNm = 0;
			
			foreach ($info as $serverKey => $serverInfo) {
				$used  += $serverInfo['bytes'];
				$limit += $serverInfo['limit_maxbytes'];

				$descriptor->setProperty('host.' . $hostNm ++, $serverKey);
			}
		}
		
		$memoryFormatter = new Memory();
		
		$descriptor->version = $serverInfo['version'];
		$descriptor->used    = $memoryFormatter->format($used);
		$descriptor->limit   = $memoryFormatter->format($limit);
		$descriptor->filled  = round($used / $limit * 100, 2) . '%';
		
		return $descriptor;
	}
349401
public List<Set<Integer>> clusters() {
        List<Set<Integer>> clusters = new ArrayList<Set<Integer>>();
        for (int c = 0; c < numClusters; ++c)
            clusters.add(new HashSet<Integer>());
        for (int i = 0; i < assignments.length; ++i)
            for (int k : assignments[i].assignments()) {
                // Check that the item was place in a cluster
                if (k >= 0)
                    clusters.get(k).add(i);
            }
        return clusters;
    }
1155640
public int getTotalClusterCount() {
    int clusterCount = 0;

    for(int i = 0; i < numclusters.length; i++) {
      clusterCount += numclusters[i];
    }

    return clusterCount;
  }
1113231
public function getSummary() {
    $summary = [];
    switch (TRUE) {
      case ($this->state === Audit::NOT_APPLICABLE):
        $summary[] = "This policy is not applicable to this site.";
        break;

      case ($this->state === Audit::ERROR):
        $tokens = [
          'exception' => isset($this->tokens['exception']) ? $this->tokens['exception'] : 'Unknown exception occured.'
        ];
        $summary[] = strtr('Could not determine the state of ' . $this->getTitle() . ' due to an error:
```
exception
```', $tokens);
        break;

      case ($this->state === Audit::WARNING):
        $summary[] = $this->getWarning();
      case ($this->state === Audit::SUCCESS):
      case ($this->state === Audit::PASS):
      case ($this->state === Audit::NOTICE):
        $summary[] = $this->getSuccess();
        break;

      case ($this->state === Audit::WARNING_FAIL):
        $summary[] = $this->getWarning();
      case ($this->state === Audit::FAILURE):
      case ($this->state === Audit::FAIL):
        $summary[] = $this->getFailure();
        break;

      default:
        throw new AuditResponseException("Unknown AuditResponse state ({$this->state}). Cannot generate summary for '" . $this->getTitle() . "'.");
        break;
    }
    return implode(PHP_EOL, $summary);
  }
35771
def get_cluster_plan(self):
        """"""

        _log.info('Fetching current cluster-topology from Zookeeper...')
        cluster_layout = self.get_topics(fetch_partition_state=False)
        # Re-format cluster-layout
        partitions = [
            {
                'topic': topic_id,
                'partition': int(p_id),
                'replicas': partitions_data['replicas']
            }
            for topic_id, topic_info in six.iteritems(cluster_layout)
            for p_id, partitions_data in six.iteritems(topic_info['partitions'])
        ]
        return {
            'version': 1,
            'partitions': partitions
        }
1110956
public SampleSummary summary() {
		return _samples.stream()
			.filter(Sample::isFull)
			.collect(toSampleSummary(sampleSize()));
	}
277025
def get_cluster_name(self):
        
        return self._get(
            url=self.url + '/api/cluster-name',
            headers=self.headers,
            auth=self.auth
        )