org.apache.hadoop.yarn.util
Class BuilderUtils

java.lang.Object
  extended by org.apache.hadoop.yarn.util.BuilderUtils

public class BuilderUtils
extends Object

Builder utilities to construct various objects.


Nested Class Summary
static class BuilderUtils.ApplicationIdComparator
           
static class BuilderUtils.ContainerIdComparator
           
static class BuilderUtils.ResourceRequestComparator
           
 
Constructor Summary
BuilderUtils()
           
 
Method Summary
static org.apache.hadoop.yarn.api.records.ApplicationId convert(long clustertimestamp, CharSequence id)
           
static org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest newAllocateRequest(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, int responseID, float appProgress, List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceAsk, List<org.apache.hadoop.yarn.api.records.ContainerId> containersToBeReleased)
           
static org.apache.hadoop.yarn.api.records.ApplicationAttemptId newApplicationAttemptId(org.apache.hadoop.yarn.api.records.ApplicationId appId, int attemptId)
           
static org.apache.hadoop.yarn.api.records.ApplicationId newApplicationId(long clusterTimeStamp, int id)
           
static org.apache.hadoop.yarn.api.records.ApplicationId newApplicationId(RecordFactory recordFactory, long clustertimestamp, CharSequence id)
           
static org.apache.hadoop.yarn.api.records.ApplicationId newApplicationId(RecordFactory recordFactory, long clusterTimeStamp, int id)
           
static org.apache.hadoop.yarn.api.records.ApplicationReport newApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, String user, String queue, String name, String host, int rpcPort, String clientToken, org.apache.hadoop.yarn.api.records.YarnApplicationState state, String diagnostics, String url, long startTime, long finishTime, org.apache.hadoop.yarn.api.records.FinalApplicationStatus finalStatus, org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport appResources, String origTrackingUrl)
           
static org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport newApplicationResourceUsageReport(int numUsedContainers, int numReservedContainers, org.apache.hadoop.yarn.api.records.Resource usedResources, org.apache.hadoop.yarn.api.records.Resource reservedResources, org.apache.hadoop.yarn.api.records.Resource neededResources)
           
static org.apache.hadoop.yarn.api.records.Container newContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId, String nodeHttpAddress, org.apache.hadoop.yarn.api.records.Resource resource, org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.ContainerToken containerToken)
           
static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, int containerId)
           
static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(int appId, int appAttemptId, long timestamp, int id)
           
static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(RecordFactory recordFactory, org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, int containerId)
           
static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(RecordFactory recordFactory, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, int containerId)
           
static org.apache.hadoop.yarn.api.records.ContainerLaunchContext newContainerLaunchContext(org.apache.hadoop.yarn.api.records.ContainerId containerID, String user, org.apache.hadoop.yarn.api.records.Resource assignedCapability, Map<String,org.apache.hadoop.yarn.api.records.LocalResource> localResources, Map<String,String> environment, List<String> commands, Map<String,ByteBuffer> serviceData, ByteBuffer containerTokens, Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> acls)
           
static org.apache.hadoop.yarn.api.records.ContainerStatus newContainerStatus(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.ContainerState containerState, String diagnostics, int exitStatus)
           
static org.apache.hadoop.yarn.api.records.ContainerToken newContainerToken(org.apache.hadoop.yarn.api.records.NodeId nodeId, ByteBuffer password, ContainerTokenIdentifier tokenIdentifier)
           
static org.apache.hadoop.yarn.api.records.DelegationToken newDelegationToken(byte[] identifier, String kind, byte[] password, String service)
           
static org.apache.hadoop.yarn.api.records.LocalResource newLocalResource(URI uri, org.apache.hadoop.yarn.api.records.LocalResourceType type, org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility, long size, long timestamp)
           
static org.apache.hadoop.yarn.api.records.LocalResource newLocalResource(org.apache.hadoop.yarn.api.records.URL url, org.apache.hadoop.yarn.api.records.LocalResourceType type, org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility, long size, long timestamp)
           
static org.apache.hadoop.yarn.api.records.NodeId newNodeId(String host, int port)
           
static org.apache.hadoop.yarn.api.records.NodeReport newNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId, org.apache.hadoop.yarn.api.records.NodeState nodeState, String httpAddress, String rackName, org.apache.hadoop.yarn.api.records.Resource used, org.apache.hadoop.yarn.api.records.Resource capability, int numContainers, org.apache.hadoop.yarn.api.records.NodeHealthStatus nodeHealthStatus)
           
static org.apache.hadoop.yarn.api.records.Priority newPriority(int p)
           
static org.apache.hadoop.yarn.api.records.Resource newResource(int memory)
           
static org.apache.hadoop.yarn.api.records.ResourceRequest newResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority, String hostName, org.apache.hadoop.yarn.api.records.Resource capability, int numContainers)
           
static org.apache.hadoop.yarn.api.records.ResourceRequest newResourceRequest(org.apache.hadoop.yarn.api.records.ResourceRequest r)
           
static org.apache.hadoop.yarn.api.records.URL newURL(String scheme, String host, int port, String file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuilderUtils

public BuilderUtils()
Method Detail

newLocalResource

public static org.apache.hadoop.yarn.api.records.LocalResource newLocalResource(org.apache.hadoop.yarn.api.records.URL url,
                                                                                org.apache.hadoop.yarn.api.records.LocalResourceType type,
                                                                                org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility,
                                                                                long size,
                                                                                long timestamp)

newLocalResource

public static org.apache.hadoop.yarn.api.records.LocalResource newLocalResource(URI uri,
                                                                                org.apache.hadoop.yarn.api.records.LocalResourceType type,
                                                                                org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility,
                                                                                long size,
                                                                                long timestamp)

newApplicationId

public static org.apache.hadoop.yarn.api.records.ApplicationId newApplicationId(RecordFactory recordFactory,
                                                                                long clustertimestamp,
                                                                                CharSequence id)

newApplicationId

public static org.apache.hadoop.yarn.api.records.ApplicationId newApplicationId(RecordFactory recordFactory,
                                                                                long clusterTimeStamp,
                                                                                int id)

newApplicationId

public static org.apache.hadoop.yarn.api.records.ApplicationId newApplicationId(long clusterTimeStamp,
                                                                                int id)

newApplicationAttemptId

public static org.apache.hadoop.yarn.api.records.ApplicationAttemptId newApplicationAttemptId(org.apache.hadoop.yarn.api.records.ApplicationId appId,
                                                                                              int attemptId)

convert

public static org.apache.hadoop.yarn.api.records.ApplicationId convert(long clustertimestamp,
                                                                       CharSequence id)

newContainerId

public static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                                                            int containerId)

newContainerId

public static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(int appId,
                                                                            int appAttemptId,
                                                                            long timestamp,
                                                                            int id)

newContainerId

public static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(RecordFactory recordFactory,
                                                                            org.apache.hadoop.yarn.api.records.ApplicationId appId,
                                                                            org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                                                            int containerId)

newContainerId

public static org.apache.hadoop.yarn.api.records.ContainerId newContainerId(RecordFactory recordFactory,
                                                                            org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                                                            int containerId)

newNodeId

public static org.apache.hadoop.yarn.api.records.NodeId newNodeId(String host,
                                                                  int port)

newNodeReport

public static org.apache.hadoop.yarn.api.records.NodeReport newNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId,
                                                                          org.apache.hadoop.yarn.api.records.NodeState nodeState,
                                                                          String httpAddress,
                                                                          String rackName,
                                                                          org.apache.hadoop.yarn.api.records.Resource used,
                                                                          org.apache.hadoop.yarn.api.records.Resource capability,
                                                                          int numContainers,
                                                                          org.apache.hadoop.yarn.api.records.NodeHealthStatus nodeHealthStatus)

newContainerStatus

public static org.apache.hadoop.yarn.api.records.ContainerStatus newContainerStatus(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                                                                    org.apache.hadoop.yarn.api.records.ContainerState containerState,
                                                                                    String diagnostics,
                                                                                    int exitStatus)

newContainer

public static org.apache.hadoop.yarn.api.records.Container newContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                                                        org.apache.hadoop.yarn.api.records.NodeId nodeId,
                                                                        String nodeHttpAddress,
                                                                        org.apache.hadoop.yarn.api.records.Resource resource,
                                                                        org.apache.hadoop.yarn.api.records.Priority priority,
                                                                        org.apache.hadoop.yarn.api.records.ContainerToken containerToken)

newDelegationToken

public static org.apache.hadoop.yarn.api.records.DelegationToken newDelegationToken(byte[] identifier,
                                                                                    String kind,
                                                                                    byte[] password,
                                                                                    String service)

newContainerToken

public static org.apache.hadoop.yarn.api.records.ContainerToken newContainerToken(org.apache.hadoop.yarn.api.records.NodeId nodeId,
                                                                                  ByteBuffer password,
                                                                                  ContainerTokenIdentifier tokenIdentifier)

newContainerLaunchContext

public static org.apache.hadoop.yarn.api.records.ContainerLaunchContext newContainerLaunchContext(org.apache.hadoop.yarn.api.records.ContainerId containerID,
                                                                                                  String user,
                                                                                                  org.apache.hadoop.yarn.api.records.Resource assignedCapability,
                                                                                                  Map<String,org.apache.hadoop.yarn.api.records.LocalResource> localResources,
                                                                                                  Map<String,String> environment,
                                                                                                  List<String> commands,
                                                                                                  Map<String,ByteBuffer> serviceData,
                                                                                                  ByteBuffer containerTokens,
                                                                                                  Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> acls)

newPriority

public static org.apache.hadoop.yarn.api.records.Priority newPriority(int p)

newResourceRequest

public static org.apache.hadoop.yarn.api.records.ResourceRequest newResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority,
                                                                                    String hostName,
                                                                                    org.apache.hadoop.yarn.api.records.Resource capability,
                                                                                    int numContainers)

newResourceRequest

public static org.apache.hadoop.yarn.api.records.ResourceRequest newResourceRequest(org.apache.hadoop.yarn.api.records.ResourceRequest r)

newApplicationReport

public static org.apache.hadoop.yarn.api.records.ApplicationReport newApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                                                                                        String user,
                                                                                        String queue,
                                                                                        String name,
                                                                                        String host,
                                                                                        int rpcPort,
                                                                                        String clientToken,
                                                                                        org.apache.hadoop.yarn.api.records.YarnApplicationState state,
                                                                                        String diagnostics,
                                                                                        String url,
                                                                                        long startTime,
                                                                                        long finishTime,
                                                                                        org.apache.hadoop.yarn.api.records.FinalApplicationStatus finalStatus,
                                                                                        org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport appResources,
                                                                                        String origTrackingUrl)

newApplicationResourceUsageReport

public static org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport newApplicationResourceUsageReport(int numUsedContainers,
                                                                                                                  int numReservedContainers,
                                                                                                                  org.apache.hadoop.yarn.api.records.Resource usedResources,
                                                                                                                  org.apache.hadoop.yarn.api.records.Resource reservedResources,
                                                                                                                  org.apache.hadoop.yarn.api.records.Resource neededResources)

newResource

public static org.apache.hadoop.yarn.api.records.Resource newResource(int memory)

newURL

public static org.apache.hadoop.yarn.api.records.URL newURL(String scheme,
                                                            String host,
                                                            int port,
                                                            String file)

newAllocateRequest

public static org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest newAllocateRequest(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
                                                                                            int responseID,
                                                                                            float appProgress,
                                                                                            List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceAsk,
                                                                                            List<org.apache.hadoop.yarn.api.records.ContainerId> containersToBeReleased)


Copyright © 2012 Apache Software Foundation. All Rights Reserved.