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:
Vinod Kumar Vavilapalli 2011-12-20 23:13:15 +00:00
parent 96247ead03
commit 4e1d5a0d71
2 changed files with 70 additions and 67 deletions

View File

@ -161,6 +161,9 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3518. mapred queue -info <queue> -showJobs throws NPE. MAPREDUCE-3518. mapred queue -info <queue> -showJobs throws NPE.
(Jonathan Eagles via mahadev) (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 OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -464,7 +464,7 @@ else if (containerMemory > maxMem) {
// Send the request to RM // Send the request to RM
LOG.info("Asking RM for containers" LOG.info("Asking RM for containers"
+ ", askCount=" + askCount); + ", askCount=" + askCount);
AMResponse amResp = sendContainerAskToRM(resourceReq); AMResponse amResp =sendContainerAskToRM(resourceReq);
// Retrieve list of allocated containers from the response // Retrieve list of allocated containers from the response
List<Container> allocatedContainers = amResp.getAllocatedContainers(); List<Container> allocatedContainers = amResp.getAllocatedContainers();
@ -478,7 +478,7 @@ else if (containerMemory > maxMem) {
+ ", containerNodeURI=" + allocatedContainer.getNodeHttpAddress() + ", containerNodeURI=" + allocatedContainer.getNodeHttpAddress()
+ ", containerState" + allocatedContainer.getState() + ", containerState" + allocatedContainer.getState()
+ ", containerResourceMemory" + allocatedContainer.getResource().getMemory()); + ", containerResourceMemory" + allocatedContainer.getResource().getMemory());
// + ", containerToken" + allocatedContainer.getContainerToken().getIdentifier().toString()); //+ ", containerToken" + allocatedContainer.getContainerToken().getIdentifier().toString());
LaunchContainerRunnable runnableLaunchContainer = new LaunchContainerRunnable(allocatedContainer); LaunchContainerRunnable runnableLaunchContainer = new LaunchContainerRunnable(allocatedContainer);
Thread launchThread = new Thread(runnableLaunchContainer); Thread launchThread = new Thread(runnableLaunchContainer);
@ -610,10 +610,11 @@ public LaunchContainerRunnable(Container lcontainer) {
* Helper function to connect to CM * Helper function to connect to CM
*/ */
private void connectToCM() { private void connectToCM() {
LOG.debug("Connecting to ContainerManager for containerid=" + container.getId());
String cmIpPortStr = container.getNodeId().getHost() + ":" String cmIpPortStr = container.getNodeId().getHost() + ":"
+ container.getNodeId().getPort(); + container.getNodeId().getPort();
InetSocketAddress cmAddress = NetUtils.createSocketAddr(cmIpPortStr); 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)); this.cm = ((ContainerManager) rpc.getProxy(ContainerManager.class, cmAddress, conf));
} }
@ -626,7 +627,6 @@ private void connectToCM() {
*/ */
public void run() { public void run() {
// Connect to ContainerManager // Connect to ContainerManager
LOG.info("Connecting to container manager for containerid=" + container.getId());
connectToCM(); connectToCM();
LOG.info("Setting up container launch container for containerid=" + container.getId()); LOG.info("Setting up container launch container for containerid=" + container.getId());
@ -722,17 +722,17 @@ public void run() {
// Left commented out as the shell scripts are short lived // 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 // and we are relying on the status for completed containers from RM to detect status
// GetContainerStatusRequest statusReq = Records.newRecord(GetContainerStatusRequest.class); // GetContainerStatusRequest statusReq = Records.newRecord(GetContainerStatusRequest.class);
// statusReq.setContainerId(container.getId()); // statusReq.setContainerId(container.getId());
// GetContainerStatusResponse statusResp; // GetContainerStatusResponse statusResp;
// try { //try {
// statusResp = cm.getContainerStatus(statusReq); //statusResp = cm.getContainerStatus(statusReq);
// LOG.info("Container Status" // LOG.info("Container Status"
// + ", id=" + container.getId() // + ", id=" + container.getId()
// + ", status=" +statusResp.getStatus()); // + ", status=" +statusResp.getStatus());
// } catch (YarnRemoteException e) { //} catch (YarnRemoteException e) {
// e.printStackTrace(); //e.printStackTrace();
// } //}
} }
} }