org.apache.tez.client
Class PreWarmContext

java.lang.Object
  extended by org.apache.tez.client.PreWarmContext

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class PreWarmContext
extends Object

Context to define how the pre-warm containers should be launched within a session.


Constructor Summary
PreWarmContext(ProcessorDescriptor processorDescriptor, org.apache.hadoop.yarn.api.records.Resource resource, int numTasks, VertexLocationHint locationHints)
          Context to define how to pre-warm a TezSession.
 
Method Summary
 Map<String,String> getEnvironment()
           
 String getJavaOpts()
           
 Map<String,org.apache.hadoop.yarn.api.records.LocalResource> getLocalResources()
           
 VertexLocationHint getLocationHints()
           
 int getNumTasks()
           
 ProcessorDescriptor getProcessorDescriptor()
           
 org.apache.hadoop.yarn.api.records.Resource getResource()
           
 PreWarmContext setEnvironment(Map<String,String> environment)
          Set the Environment for the pre-warm containers.
 PreWarmContext setJavaOpts(String javaOpts)
          Set the Java opts for the pre-warm containers.
 PreWarmContext setLocalResources(Map<String,org.apache.hadoop.yarn.api.records.LocalResource> localResources)
          Set the LocalResources for the pre-warm containers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreWarmContext

public PreWarmContext(ProcessorDescriptor processorDescriptor,
                      org.apache.hadoop.yarn.api.records.Resource resource,
                      int numTasks,
                      VertexLocationHint locationHints)
Context to define how to pre-warm a TezSession.

Parameters:
processorDescriptor - The processor to run within a Tez Task after launching a container
resource - The resource requirements for each container
numTasks - The number of tasks to run. The num of tasks can drive how many containers are launched. However, as containers are re-used, the total number of launched containers will likely be less than the specified number of tasks.
locationHints - The location hints for the containers to be launched.
Method Detail

setLocalResources

public PreWarmContext setLocalResources(Map<String,org.apache.hadoop.yarn.api.records.LocalResource> localResources)
Set the LocalResources for the pre-warm containers.

Parameters:
localResources - LocalResources for the container
Returns:
this

setEnvironment

public PreWarmContext setEnvironment(Map<String,String> environment)
Set the Environment for the pre-warm containers.

Parameters:
environment - Container environment
Returns:
this

setJavaOpts

public PreWarmContext setJavaOpts(String javaOpts)
Set the Java opts for the pre-warm containers.

Parameters:
javaOpts - Container java opts
Returns:
this

getProcessorDescriptor

public ProcessorDescriptor getProcessorDescriptor()

getResource

public org.apache.hadoop.yarn.api.records.Resource getResource()

getNumTasks

public int getNumTasks()

getLocationHints

public VertexLocationHint getLocationHints()

getLocalResources

public Map<String,org.apache.hadoop.yarn.api.records.LocalResource> getLocalResources()

getEnvironment

public Map<String,String> getEnvironment()

getJavaOpts

public String getJavaOpts()


Copyright © 2014 Apache Software Foundation. All rights reserved.