code: public ContainerRequest setupContainerAskForRM(int containerMemory, int containerVirtualCores, int priority, String[] racks, String[] hosts) {
          Priority pri = Priority.newInstance(priority);
          Resource capability = Resource.newInstance(containerMemory,
                  containerVirtualCores);
          ContainerRequest request = new ContainerRequest(capability, hosts, racks,
                  pri, false);
          LOG.info("By Thrift Server Requested container  ask: " + request.toString());
          return request;
      }
docs: Setup the request that will be sent to the RM for the container ask.
  
  @return the setup ResourceRequest to be sent to RM