hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1155161 - in /hadoop/common/branches/MR-279/mapreduce: ./ yarn/dev-support/ yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/event/ yarn/yarn-common/src/main/java...
Date Tue, 09 Aug 2011 00:02:31 GMT
Author: mahadev
Date: Tue Aug  9 00:02:30 2011
New Revision: 1155161

URL: http://svn.apache.org/viewvc?rev=1155161&view=rev
Log:
Patch for findbugs warnings in Resource Manager (siddharth seth via mahadev)

Modified:
    hadoop/common/branches/MR-279/mapreduce/CHANGES.txt
    hadoop/common/branches/MR-279/mapreduce/yarn/dev-support/findbugs-exclude.xml
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/ProtoOverHadoopRpcEngine.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/util/AbstractLivelinessMonitor.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AggregatedLogFormat.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java

Modified: hadoop/common/branches/MR-279/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/CHANGES.txt?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/MR-279/mapreduce/CHANGES.txt Tue Aug  9 00:02:30 2011
@@ -3,7 +3,12 @@ Hadoop MapReduce Change Log
 Trunk (unreleased changes)
 
   MAPREDUCE-279
-
+    
+    Patch for findbugs warnings in Resource Manager (siddharth seth via mahadev)
+    
+    Fix ivy conf to work with the hadoop common trunk maven build changes.
+    (Giridharan Kesavan)
+    
     Fix the poms to enable 0.23 snapshots for hdfs/common from apache 
     nightly builds (gkesavan)
  
@@ -2456,6 +2461,4 @@ Release 0.21.0 - 2010-08-13
 
     MAPREDUCE-1856. Extract a subset of tests for smoke (DOA) validation (cos)
     
-    Fix ivy conf to work with the hadoop common trunk maven build changes.
-    (Giridharan Kesavan)
 

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/dev-support/findbugs-exclude.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/dev-support/findbugs-exclude.xml?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/dev-support/findbugs-exclude.xml (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/dev-support/findbugs-exclude.xml Tue Aug
 9 00:02:30 2011
@@ -112,6 +112,35 @@
     <Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService"
/>
     <Bug pattern="IS2_INCONSISTENT_SYNC" />
   </Match>
+  <!-- Inconsistent sync warning - reinitialize read from other queue does not need sync-->
+  <Match>
+    <Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue"
/>
+    <Or>
+      <Field name="absoluteCapacity" />
+      <Field name="absoluteMaxCapacity" />
+      <Field name="acls" />
+      <Field name="capacity" />
+      <Field name="maxApplications" />
+      <Field name="maxApplicationsPerUser" />
+      <Field name="maximumCapacity" />
+      <Field name="state" />
+      <Field name="userLimit" />
+      <Field name="userLimitFactor" />
+    </Or>
+    <Bug pattern="IS2_INCONSISTENT_SYNC" />
+  </Match>
+  <Match>
+    <Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue"
/>
+    <Or>
+      <Field name="absoluteCapacity" />
+      <Field name="absoluteMaxCapacity" />
+      <Field name="acls" />
+      <Field name="capacity" />
+      <Field name="maximumCapacity" />
+      <Field name="state" />
+    </Or>
+    <Bug pattern="IS2_INCONSISTENT_SYNC" />
+  </Match>
 
   <!-- Don't care if putIfAbsent value is ignored -->
   <Match>
@@ -128,5 +157,27 @@
     <Class name="org.apache.hadoop.yarn.webapp.WebApps$Builder" />
     <Bug pattern="DM_EXIT" />
   </Match>
+  <!-- AsyncDispatcher will kill the process if there is an error dispatching -->
+  <Match>
+    <Class name="org.apache.hadoop.yarn.event.AsyncDispatcher" />
+    <Method name="dispatch" />
+    <Bug pattern="DM_EXIT" />
+  </Match>
+
+  <!-- Ignore heartbeat exception when killing localizer -->
+  <Match>
+    <Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer"
/>
+    <Method name="localizeFiles" />
+    <Bug pattern="DE_MIGHT_IGNORE" />
+  </Match>
 
- </FindBugsFilter>
+  <!-- Ignore EI_EXPOSE_REP2 in Log services -->
+  <Match>
+    <Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.AggregatedLogFormat$LogValue"
/>
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.AppLogAggregatorImpl"
/>
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+</FindBugsFilter>

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java
Tue Aug  9 00:02:30 2011
@@ -114,6 +114,7 @@ public class ApplicationAttemptIdPBImpl 
 
   @Override
   public synchronized boolean equals(Object other) {
+    if (other == null) return false;
     if (other.getClass().isAssignableFrom(this.getClass())) {
       return this.getProto().equals(this.getClass().cast(other).getProto());
     }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java
Tue Aug  9 00:02:30 2011
@@ -3,13 +3,11 @@ package org.apache.hadoop.yarn.api.recor
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationState;
-import org.apache.hadoop.yarn.api.records.Container;
 import org.apache.hadoop.yarn.api.records.ProtoBase;
 import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto;
 import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto;
 import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProtoOrBuilder;
 import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationStateProto;
-import org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto;
 import org.apache.hadoop.yarn.util.ProtoUtils;
 
 public class ApplicationReportPBImpl extends ProtoBase<ApplicationReportProto> 
@@ -263,9 +261,4 @@ implements ApplicationReport {
       ApplicationIdProto applicationId) {
     return new ApplicationIdPBImpl(applicationId);
   }
-
-  private Container convertFromProtoFormat(ContainerProto c) {
-    return new ContainerPBImpl(c);
-  }
-
 }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java
Tue Aug  9 00:02:30 2011
@@ -113,6 +113,7 @@ public class AsyncDispatcher extends Abs
       eventDispatchers.get(type).handle(event);
     }
     catch (Throwable t) {
+      //TODO Maybe log the state of the queue
       LOG.fatal("Error in dispatcher thread. Exiting..", t);
       System.exit(-1);
     }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/ProtoOverHadoopRpcEngine.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/ProtoOverHadoopRpcEngine.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/ProtoOverHadoopRpcEngine.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/ProtoOverHadoopRpcEngine.java
Tue Aug  9 00:02:30 2011
@@ -82,7 +82,7 @@ public class ProtoOverHadoopRpcEngine im
     }
   }
 
-  private class Invoker implements InvocationHandler, Closeable {
+  private static class Invoker implements InvocationHandler, Closeable {
     private Map<String, Message> returnTypes = new ConcurrentHashMap<String, Message>();
     private boolean isClosed = false;
     private Client.ConnectionId remoteId;

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/util/AbstractLivelinessMonitor.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/util/AbstractLivelinessMonitor.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/util/AbstractLivelinessMonitor.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/util/AbstractLivelinessMonitor.java
Tue Aug  9 00:02:30 2011
@@ -35,7 +35,7 @@ public abstract class AbstractLiveliness
   //received.
   private Thread checkerThread;
   private volatile boolean stopped;
-  public static int DEFAULT_EXPIRE = 5*60*1000;//5 mins
+  public static final int DEFAULT_EXPIRE = 5*60*1000;//5 mins
   private int expireInterval = DEFAULT_EXPIRE;
   private int monitorInterval = expireInterval/3;
 

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
Tue Aug  9 00:02:30 2011
@@ -26,7 +26,6 @@ import org.apache.hadoop.yarn.proto.Yarn
 import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProto;
 import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder;
 import org.apache.hadoop.yarn.server.api.records.NodeStatus;
-import org.mortbay.util.ajax.JSON.Convertor;
     
 public class NodeStatusPBImpl extends ProtoBase<NodeStatusProto> implements NodeStatus
{
   NodeStatusProto proto = NodeStatusProto.getDefaultInstance();
@@ -267,7 +266,7 @@ public class NodeStatusPBImpl extends Pr
   @Override
   public void removeContainers(ApplicationId applicationId) {
     initContainers();
-    this.containers.remove(applicationId);
+    this.containers.remove(convertToProtoFormat(applicationId));
   }
   
   @Override

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
Tue Aug  9 00:02:30 2011
@@ -196,35 +196,33 @@ public class NodeStatusUpdaterImpl exten
     nodeStatus.setNodeId(this.nodeId);
 
     int numActiveContainers = 0;
-    synchronized (this.context.getContainers()) {
-      for (Iterator<Entry<ContainerId, Container>> i =
-          this.context.getContainers().entrySet().iterator(); i.hasNext();) {
-        Entry<ContainerId, Container> e = i.next();
-        ContainerId containerId = e.getKey();
-        Container container = e.getValue();
-
-        List<org.apache.hadoop.yarn.api.records.Container> applicationContainers =
nodeStatus
-            .getContainers(container.getContainerID().getAppId());
-        if (applicationContainers == null) {
-          applicationContainers = new ArrayList<org.apache.hadoop.yarn.api.records.Container>();
-          nodeStatus.setContainers(container.getContainerID().getAppId(),
-              applicationContainers);
-        }
+    for (Iterator<Entry<ContainerId, Container>> i =
+        this.context.getContainers().entrySet().iterator(); i.hasNext();) {
+      Entry<ContainerId, Container> e = i.next();
+      ContainerId containerId = e.getKey();
+      Container container = e.getValue();
+
+      List<org.apache.hadoop.yarn.api.records.Container> applicationContainers = nodeStatus
+          .getContainers(container.getContainerID().getAppId());
+      if (applicationContainers == null) {
+        applicationContainers = new ArrayList<org.apache.hadoop.yarn.api.records.Container>();
+        nodeStatus.setContainers(container.getContainerID().getAppId(),
+            applicationContainers);
+      }
 
-        // Clone the container to send it to the RM
-        org.apache.hadoop.yarn.api.records.Container c = container.cloneAndGetContainer();
-        c.setNodeId(this.nodeId);
-        c.setNodeHttpAddress(this.nodeHttpAddress); // TODO: don't set everytime.
-        applicationContainers.add(c);
-        ++numActiveContainers;
-        LOG.info("Sending out status for container: " + c);
-
-        if (c.getState() == ContainerState.COMPLETE) {
-          // Remove
-          i.remove();
+      // Clone the container to send it to the RM
+      org.apache.hadoop.yarn.api.records.Container c = container.cloneAndGetContainer();
+      c.setNodeId(this.nodeId);
+      c.setNodeHttpAddress(this.nodeHttpAddress); // TODO: don't set everytime.
+      applicationContainers.add(c);
+      ++numActiveContainers;
+      LOG.info("Sending out status for container: " + c);
+
+      if (c.getState() == ContainerState.COMPLETE) {
+        // Remove
+        i.remove();
 
-          LOG.info("Removed completed container " + containerId);
-        }
+        LOG.info("Removed completed container " + containerId);
       }
     }
 

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AggregatedLogFormat.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AggregatedLogFormat.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AggregatedLogFormat.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AggregatedLogFormat.java
Tue Aug  9 00:02:30 2011
@@ -107,11 +107,16 @@ public class AggregatedLogFormat {
           out.writeUTF(String.valueOf(logFile.length()));
 
           // Write the log itself
-          FileInputStream in = new FileInputStream(logFile);
-          byte[] buf = new byte[65535];
-          int len = 0;
-          while ((len = in.read(buf)) != -1) {
-            out.write(buf, 0, len);
+          FileInputStream in = null;
+          try {
+            in = new FileInputStream(logFile);
+            byte[] buf = new byte[65535];
+            int len = 0;
+            while ((len = in.read(buf)) != -1) {
+              out.write(buf, 0, len);
+            }
+          } finally {
+            in.close();
           }
         }
       }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
Tue Aug  9 00:02:30 2011
@@ -141,6 +141,7 @@ public class ContainerLogsPage extends N
               totalRead += len;
               toRead = toRead - totalRead;
             }
+            reader.close();
             writer().write("</pre>");
           } catch (IOException e) {
               writer().write(

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java
Tue Aug  9 00:02:30 2011
@@ -325,7 +325,7 @@ public class AppSchedulingInfo {
     clearRequests();
   }
 
-  public void setQueue(Queue queue) {
+  public synchronized void setQueue(Queue queue) {
     this.queue = queue;
   }
 }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
Tue Aug  9 00:02:30 2011
@@ -203,24 +203,24 @@ public class LeafQueue implements Queue 
         ", state=" + state +
         ", acls=" + aclsString);
   }
-
+  
   @Override
-  public float getCapacity() {
+  public synchronized float getCapacity() {
     return capacity;
   }
 
   @Override
-  public float getAbsoluteCapacity() {
+  public synchronized float getAbsoluteCapacity() {
     return absoluteCapacity;
   }
 
   @Override
-  public float getMaximumCapacity() {
+  public synchronized float getMaximumCapacity() {
     return maximumCapacity;
   }
 
   @Override
-  public float getAbsoluteMaximumCapacity() {
+  public synchronized float getAbsoluteMaximumCapacity() {
     return absoluteMaxCapacity;
   }
 
@@ -240,7 +240,7 @@ public class LeafQueue implements Queue 
   }
 
   @Override
-  public float getUsedCapacity() {
+  public synchronized float getUsedCapacity() {
     return usedCapacity;
   }
 
@@ -271,12 +271,12 @@ public class LeafQueue implements Queue 
     return applications.size();
   }
 
-  public int getNumContainers() {
+  public synchronized int getNumContainers() {
     return numContainers;
   }
 
   @Override
-  public QueueState getState() {
+  public synchronized QueueState getState() {
     return state;
   }
 

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java?rev=1155161&r1=1155160&r2=1155161&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
(original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
Tue Aug  9 00:02:30 2011
@@ -216,12 +216,12 @@ public class ParentQueue implements Queu
   }
 
   @Override
-  public float getCapacity() {
+  public synchronized float getCapacity() {
     return capacity;
   }
 
   @Override
-  public float getAbsoluteCapacity() {
+  public synchronized float getAbsoluteCapacity() {
     return absoluteCapacity;
   }
 
@@ -236,7 +236,7 @@ public class ParentQueue implements Queu
   }
 
   @Override
-  public float getUsedCapacity() {
+  public synchronized float getUsedCapacity() {
     return usedCapacity;
   }
 
@@ -255,21 +255,21 @@ public class ParentQueue implements Queu
     return new ArrayList<Queue>(childQueues);
   }
 
-  public int getNumContainers() {
+  public synchronized int getNumContainers() {
     return numContainers;
   }
   
-  public int getNumApplications() {
+  public synchronized int getNumApplications() {
     return numApplications;
   }
 
   @Override
-  public QueueState getState() {
+  public synchronized QueueState getState() {
     return state;
   }
 
   @Override
-  public Map<QueueACL, AccessControlList> getQueueAcls() {
+  public synchronized Map<QueueACL, AccessControlList> getQueueAcls() {
     return new HashMap<QueueACL, AccessControlList>(acls);
   }
 



Mime
View raw message