Returns the status of the allocator (which contains all metrics) as string. Be aware this may be expensive
and so should not called too frequently.
762781
public String dumpStats() {
        int heapArenasLen = heapArenas == null ? 0 : heapArenas.length;
        StringBuilder buf = new StringBuilder(512)
                .append(heapArenasLen)
                .append(" heap arena(s):")
                .append(StringUtil.NEWLINE);
        if (heapArenasLen > 0) {
            for (PoolArena<byte[]> a: heapArenas) {
                buf.append(a);
            }
        }

        int directArenasLen = directArenas == null ? 0 : directArenas.length;

        buf.append(directArenasLen)
           .append(" direct arena(s):")
           .append(StringUtil.NEWLINE);
        if (directArenasLen > 0) {
            for (PoolArena<ByteBuffer> a: directArenas) {
                buf.append(a);
            }
        }

        return buf.toString();
    }
226280
@Override
    public byte[] getValue() {
        StringBuilder sb = new StringBuilder(64);
        sb.append(component).append(MetricUtils.AT).append(taskId).append(MetricUtils.AT)
                .append(streamId).append(MetricUtils.AT).append(metricType).append(MetricUtils.AT)
                .append(host).append(MetricUtils.AT).append(port).append(MetricUtils.AT)
                .append(metricGroup).append(MetricUtils.AT).append(metricName);
        return sb.toString().getBytes();
    }
891751
def status(self):
        """"""
        self._check_valid()
        if self._ret_val == swiglpk.GLP_ENOPFS:
            return 'No primal feasible solution'
        elif self._ret_val == swiglpk.GLP_ENODFS:
            return 'No dual feasible solution'
        return str(swiglpk.glp_get_status(self._problem._p))
1139465
static String statusToString(int status)
    {
        String result = null;

        if (status == STATUS_INACTIVE)
        {
            result = "INACTIVE";
        }
        else if (status == STATUS_ACTIVE)
        {
            result = "ACTIVE";
        }
        else if (status == STATUS_KEYPOINTING)
        {
            result = "KEYPOINTING";
        }
        else if (status == STATUS_INVALID)
        {
            result = "INVALID";
        }
        else
        {
            result = "UNKNOWN";
        }

        return result;
    }
935509
def ncores_allocated(self):
        
        return sum(task.manager.num_cores for task in self if task.status in [task.S_SUB, task.S_RUN])
1298573
private FinalApplicationStatus getYarnStatus(ApplicationStatus status) {
		if (status == null) {
			return FinalApplicationStatus.UNDEFINED;
		}
		else {
			switch (status) {
				case SUCCEEDED:
					return FinalApplicationStatus.SUCCEEDED;
				case FAILED:
					return FinalApplicationStatus.FAILED;
				case CANCELED:
					return FinalApplicationStatus.KILLED;
				default:
					return FinalApplicationStatus.UNDEFINED;
			}
		}
	}
172220
public java.lang.String getAllocatorName() {
    java.lang.Object ref = allocatorName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      allocatorName_ = s;
      return s;
    }
  }
1108287
def get_statusmsg(self) -> str:
        
        if self._last_status is None:
            return self._last_status
        return self._last_status.decode()
531917
public Status getStatus() {
        String status = m_resultFields.get(STATUS);
        if (status == null) {
            return Status.OK;
        } else {
            return Status.valueOf(status.toUpperCase());
        }
    }
354217
def _GetStat(self):
    
    stat_object = super(TSKPartitionFileEntry, self)._GetStat()

    bytes_per_sector = tsk_partition.TSKVolumeGetBytesPerSector(
        self._tsk_volume)

    # File data stat information.
    if self._tsk_vs_part is not None:
      number_of_sectors = tsk_partition.TSKVsPartGetNumberOfSectors(
          self._tsk_vs_part)

      if number_of_sectors:
        stat_object.size = number_of_sectors * bytes_per_sector

    # Date and time stat information.

    # Ownership and permissions stat information.

    # File entry type stat information.

    # The root file entry is virtual and should have type directory.
    if not self._is_virtual:
      stat_object.is_allocated = tsk_partition.TSKVsPartIsAllocated(
          self._tsk_vs_part)

    return stat_object
955959
public Integer getAllocationSize()
   {
      if(childNode.getAttribute("allocation-size") != null && !childNode.getAttribute("allocation-size").equals("null"))
      {
         return Integer.valueOf(childNode.getAttribute("allocation-size"));
      }
      return null;
   }
974259
def get_global(self):
        
        if self._has_global_stats:
            if self.global_num_inst == 0:
                return (self.name, float('nan'))
            else:
                return (self.name, self.global_sum_metric / self.global_num_inst)
        else:
            return self.get()
119790
private static Bundle getAllocCounts() {
        Bundle results = new Bundle();
        results.putLong(METRIC_KEY_GLOBAL_ALLOC_COUNT, Debug.getGlobalAllocCount());
        results.putLong(METRIC_KEY_GLOBAL_ALLOC_SIZE, Debug.getGlobalAllocSize());
        results.putLong(METRIC_KEY_GLOBAL_FREED_COUNT, Debug.getGlobalFreedCount());
        results.putLong(METRIC_KEY_GLOBAL_FREED_SIZE, Debug.getGlobalFreedSize());
        results.putLong(METRIC_KEY_GC_INVOCATION_COUNT, Debug.getGlobalGcInvocationCount());
        return results;
    }
914336
def status(self, timeout=None):
        
        assembler = commons.StatusRequestAssembler(self._url)

        obj = yield self._post(assembler.url, assembler.data, timeout)

        status = Status._parse(obj)

        returnValue(status)
1212910
private String getQualifiedMetricName(String metricName) {
    try {
      if (SecurityUtils.isAuthenticationEnabled(mConfiguration)
          && AuthenticatedClientUser.get(mConfiguration) != null) {
        return Metric.getMetricNameWithTags(metricName, CommonMetrics.TAG_USER,
            AuthenticatedClientUser.get(mConfiguration).getName(), WorkerMetrics.TAG_UFS,
            MetricsSystem.escape(new AlluxioURI(mPath)), WorkerMetrics.TAG_UFS_TYPE,
            mUnderFileSystem.getUnderFSType());
      }
    } catch (IOException e) {
      // fall through
    }
    return Metric.getMetricNameWithTags(metricName, WorkerMetrics.TAG_UFS,
        MetricsSystem.escape(new AlluxioURI(mPath)), WorkerMetrics.TAG_UFS_TYPE,
        mUnderFileSystem.getUnderFSType());
  }
979214
public String getStatusString()
	{
		switch (status) {
		case ErrorCodes.NO_ERROR:
			return "connection state is normal";
		case ErrorCodes.CONNECTION_ID:
			return "server could not find active data connection with specified ID";
		case ErrorCodes.DATA_CONNECTION:
			return "server detected error concerning the data connection";
		case ErrorCodes.KNX_CONNECTION:
			return "server detected error concerning the KNX bus/subsystem connection";
		default:
			return "unknown status";
		}
	}
606658
private Deferred<Object> resolveMetric() {
    if (metric == null || metric.isEmpty()) {
      throw new IllegalArgumentException("The metric cannot be empty");
    }
    if (tags == null) {
      throw new IllegalArgumentException("Tags cannot be null or empty "
          + "when getting a TSUID");
    }
    
    class TagsCB implements Callback<Object, ArrayList<byte[]>> {
      @Override
      public Object call(final ArrayList<byte[]> tag_list) throws Exception {
        setTagUIDs(tag_list);
        return null;
      }
      @Override
      public String toString() {
        return "Tag resolution callback";
      }
    }
    
    class MetricCB implements Callback<Deferred<Object>, byte[]> {
      @Override
      public Deferred<Object> call(final byte[] uid) 
          throws Exception {
        setMetricUID(uid);
        if (tags.isEmpty()) {
          setTagUIDs(new ArrayList<byte[]>(0));
          return null;
        }
        return Tags.resolveAllAsync(tsdb, tags).addCallback(new TagsCB());
      }
      @Override
      public String toString() {
        return "Metric resolution callback";
      }
    }
    
    return tsdb.getUIDAsync(UniqueIdType.METRIC, metric)
        .addCallbackDeferring(new MetricCB());
  }