org.apache.hadoop.yarn.api.protocolrecords.impl.pb
Class StartContainerResponsePBImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ProtoBase<YarnServiceProtos.StartContainerResponseProto>
      extended by org.apache.hadoop.yarn.api.protocolrecords.impl.pb.StartContainerResponsePBImpl
All Implemented Interfaces:
StartContainerResponse

public class StartContainerResponsePBImpl
extends ProtoBase<YarnServiceProtos.StartContainerResponseProto>
implements StartContainerResponse


Constructor Summary
StartContainerResponsePBImpl()
           
StartContainerResponsePBImpl(YarnServiceProtos.StartContainerResponseProto proto)
           
 
Method Summary
 void addAllServiceResponse(Map<String,ByteBuffer> serviceResponse)
          Add to the list of auxiliary services which have been started on the NodeManager.
 void clearServiceResponse()
          Remove all the auxiliary services from the StartContainerResponse object
 Map<String,ByteBuffer> getAllServiceResponse()
          Get the responses from all auxiliary services running on the NodeManager.
 YarnServiceProtos.StartContainerResponseProto getProto()
           
 ByteBuffer getServiceResponse(String key)
          Get the response from a single auxiliary service running on the NodeManager
 void removeServiceResponse(String key)
          Remove a single auxiliary service from the StartContainerResponse object
 void setServiceResponse(String key, ByteBuffer val)
          Add to the list of auxiliary services which have been started on the NodeManager.
 
Methods inherited from class org.apache.hadoop.yarn.api.records.ProtoBase
convertFromProtoFormat, convertToProtoFormat, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StartContainerResponsePBImpl

public StartContainerResponsePBImpl()

StartContainerResponsePBImpl

public StartContainerResponsePBImpl(YarnServiceProtos.StartContainerResponseProto proto)
Method Detail

getProto

public YarnServiceProtos.StartContainerResponseProto getProto()
Specified by:
getProto in class ProtoBase<YarnServiceProtos.StartContainerResponseProto>

getAllServiceResponse

public Map<String,ByteBuffer> getAllServiceResponse()
Description copied from interface: StartContainerResponse

Get the responses from all auxiliary services running on the NodeManager.

The responses are returned as a Map between the auxiliary service names and their corresponding opaque blob ByteBuffers

Specified by:
getAllServiceResponse in interface StartContainerResponse
Returns:
a Map between the auxiliary service names and their outputs

getServiceResponse

public ByteBuffer getServiceResponse(String key)
Description copied from interface: StartContainerResponse
Get the response from a single auxiliary service running on the NodeManager

Specified by:
getServiceResponse in interface StartContainerResponse
Parameters:
key - The auxiliary service name whose response is desired.
Returns:
The opaque blob ByteBuffer returned by the auxiliary service.

addAllServiceResponse

public void addAllServiceResponse(Map<String,ByteBuffer> serviceResponse)
Description copied from interface: StartContainerResponse
Add to the list of auxiliary services which have been started on the NodeManager. This is done only once when the NodeManager starts up

Specified by:
addAllServiceResponse in interface StartContainerResponse
Parameters:
serviceResponse - A map from auxiliary service names to the opaque blob ByteBuffers for that auxiliary service

setServiceResponse

public void setServiceResponse(String key,
                               ByteBuffer val)
Description copied from interface: StartContainerResponse
Add to the list of auxiliary services which have been started on the NodeManager. This is done only once when the NodeManager starts up

Specified by:
setServiceResponse in interface StartContainerResponse
Parameters:
key - The auxiliary service name
val - The opaque blob ByteBuffer managed by the auxiliary service

removeServiceResponse

public void removeServiceResponse(String key)
Description copied from interface: StartContainerResponse
Remove a single auxiliary service from the StartContainerResponse object

Specified by:
removeServiceResponse in interface StartContainerResponse
Parameters:
key - The auxiliary service to remove

clearServiceResponse

public void clearServiceResponse()
Description copied from interface: StartContainerResponse
Remove all the auxiliary services from the StartContainerResponse object

Specified by:
clearServiceResponse in interface StartContainerResponse


Copyright © 2012 Apache Software Foundation. All Rights Reserved.