public ContainerInfo getContainerInfo() {
   ContainerInfo ci = new ContainerInfo();
   ci.id = container.getExternalId();
   ci.host = container.host;
   ci.state = container.getState().name();
   ci.jvmName = this.jvmName;
   ci.numOperators = container.getOperators().size();
   ci.memoryMBAllocated = container.getAllocatedMemoryMB();
   ci.lastHeartbeat = lastHeartbeatMillis;
   ci.memoryMBFree = this.memoryMBFree;
   ci.gcCollectionCount = this.gcCollectionCount;
   ci.gcCollectionTime = this.gcCollectionTime;
   ci.startedTime = container.getStartedTime();
   ci.finishedTime = container.getFinishedTime();
   if (this.container.nodeHttpAddress != null) {
     YarnConfiguration conf = new YarnConfiguration();
     ci.containerLogsUrl =
         ConfigUtils.getSchemePrefix(conf)
             + this.container.nodeHttpAddress
             + "/node/containerlogs/"
             + ci.id
             + "/"
             + System.getenv(ApplicationConstants.Environment.USER.toString());
     ci.rawContainerLogsUrl =
         ConfigUtils.getRawContainerLogsUrl(
             conf,
             container.nodeHttpAddress,
             container.getPlan().getLogicalPlan().getAttributes().get(LogicalPlan.APPLICATION_ID),
             ci.id);
   }
   return ci;
 }