MAPREDUCE-3391. Making a trivial change to correct a log message in DistributedShell app's AM. Contributed by Subroto Sanyal.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1221516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
96247ead03
commit
4e1d5a0d71
|
@ -161,6 +161,9 @@ Release 0.23.1 - Unreleased
|
|||
MAPREDUCE-3518. mapred queue -info <queue> -showJobs throws NPE.
|
||||
(Jonathan Eagles via mahadev)
|
||||
|
||||
MAPREDUCE-3391. Making a trivial change to correct a log message in
|
||||
DistributedShell app's AM. (Subroto Sanyal via vinodkv)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -464,7 +464,7 @@ public class ApplicationMaster {
|
|||
// Send the request to RM
|
||||
LOG.info("Asking RM for containers"
|
||||
+ ", askCount=" + askCount);
|
||||
AMResponse amResp = sendContainerAskToRM(resourceReq);
|
||||
AMResponse amResp =sendContainerAskToRM(resourceReq);
|
||||
|
||||
// Retrieve list of allocated containers from the response
|
||||
List<Container> allocatedContainers = amResp.getAllocatedContainers();
|
||||
|
@ -478,7 +478,7 @@ public class ApplicationMaster {
|
|||
+ ", containerNodeURI=" + allocatedContainer.getNodeHttpAddress()
|
||||
+ ", containerState" + allocatedContainer.getState()
|
||||
+ ", containerResourceMemory" + allocatedContainer.getResource().getMemory());
|
||||
// + ", containerToken" + allocatedContainer.getContainerToken().getIdentifier().toString());
|
||||
//+ ", containerToken" + allocatedContainer.getContainerToken().getIdentifier().toString());
|
||||
|
||||
LaunchContainerRunnable runnableLaunchContainer = new LaunchContainerRunnable(allocatedContainer);
|
||||
Thread launchThread = new Thread(runnableLaunchContainer);
|
||||
|
@ -610,10 +610,11 @@ public class ApplicationMaster {
|
|||
* Helper function to connect to CM
|
||||
*/
|
||||
private void connectToCM() {
|
||||
LOG.debug("Connecting to ContainerManager for containerid=" + container.getId());
|
||||
String cmIpPortStr = container.getNodeId().getHost() + ":"
|
||||
+ container.getNodeId().getPort();
|
||||
InetSocketAddress cmAddress = NetUtils.createSocketAddr(cmIpPortStr);
|
||||
LOG.info("Connecting to ResourceManager at " + cmIpPortStr);
|
||||
LOG.info("Connecting to ContainerManager at " + cmIpPortStr);
|
||||
this.cm = ((ContainerManager) rpc.getProxy(ContainerManager.class, cmAddress, conf));
|
||||
}
|
||||
|
||||
|
@ -626,7 +627,6 @@ public class ApplicationMaster {
|
|||
*/
|
||||
public void run() {
|
||||
// Connect to ContainerManager
|
||||
LOG.info("Connecting to container manager for containerid=" + container.getId());
|
||||
connectToCM();
|
||||
|
||||
LOG.info("Setting up container launch container for containerid=" + container.getId());
|
||||
|
@ -722,17 +722,17 @@ public class ApplicationMaster {
|
|||
// Left commented out as the shell scripts are short lived
|
||||
// and we are relying on the status for completed containers from RM to detect status
|
||||
|
||||
// GetContainerStatusRequest statusReq = Records.newRecord(GetContainerStatusRequest.class);
|
||||
// statusReq.setContainerId(container.getId());
|
||||
// GetContainerStatusResponse statusResp;
|
||||
// try {
|
||||
// statusResp = cm.getContainerStatus(statusReq);
|
||||
// LOG.info("Container Status"
|
||||
// + ", id=" + container.getId()
|
||||
// + ", status=" +statusResp.getStatus());
|
||||
// } catch (YarnRemoteException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// GetContainerStatusRequest statusReq = Records.newRecord(GetContainerStatusRequest.class);
|
||||
// statusReq.setContainerId(container.getId());
|
||||
// GetContainerStatusResponse statusResp;
|
||||
//try {
|
||||
//statusResp = cm.getContainerStatus(statusReq);
|
||||
// LOG.info("Container Status"
|
||||
// + ", id=" + container.getId()
|
||||
// + ", status=" +statusResp.getStatus());
|
||||
//} catch (YarnRemoteException e) {
|
||||
//e.printStackTrace();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue