hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asur...@apache.org
Subject hadoop git commit: YARN-5075. Fix findbugs warnings in hadoop-yarn-common module. (asuresh)
Date Tue, 17 May 2016 06:24:48 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 2c91fd824 -> ccc93e781


YARN-5075. Fix findbugs warnings in hadoop-yarn-common module. (asuresh)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ccc93e78
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ccc93e78
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ccc93e78

Branch: refs/heads/trunk
Commit: ccc93e78127c14bfd84179395b055c4061ea436a
Parents: 2c91fd8
Author: Arun Suresh <asuresh@apache.org>
Authored: Mon May 16 23:22:01 2016 -0700
Committer: Arun Suresh <asuresh@apache.org>
Committed: Mon May 16 23:22:01 2016 -0700

----------------------------------------------------------------------
 .../hadoop-yarn/dev-support/findbugs-exclude.xml      |  2 +-
 .../apache/hadoop/yarn/conf/YarnConfiguration.java    |  2 +-
 .../server/api/records/impl/pb/NodeStatusPBImpl.java  | 14 ++++++++------
 .../records/impl/pb/QueuedContainersStatusPBImpl.java |  6 +++++-
 .../yarn/server/resourcemanager/rmnode/RMNode.java    |  2 +-
 5 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ccc93e78/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml b/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml
index c640d9f..81c7e6a 100644
--- a/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml
+++ b/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml
@@ -327,7 +327,7 @@
     <Bug pattern="DM_EXIT" />
   </Match>
   <Match>
-    <Class name="org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor"
/>
+    <Class name="org.apache.hadoop.yarn.event.EventDispatcher$EventProcessor" />
     <Method name="run" />
     <Bug pattern="DM_EXIT" />
   </Match>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ccc93e78/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java
index 0b150c2..cfe2897 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java
@@ -339,7 +339,7 @@ public class YarnConfiguration extends Configuration {
       600000;
 
   /** K least loaded nodes to be provided to the LocalScheduler of a
-   * NodeManager for Distributed Scheduling */
+   * NodeManager for Distributed Scheduling. */
   public static final String DIST_SCHEDULING_TOP_K =
       YARN_PREFIX + "distributed-scheduling.top-k";
   public static final int DIST_SCHEDULING_TOP_K_DEFAULT = 10;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ccc93e78/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
index 9a9a83a..d6a1737 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
@@ -38,10 +38,10 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto;
 import org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto;
 import org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto;
 import org.apache.hadoop.yarn.proto.YarnProtos.NodeIdProto;
-import org.apache.hadoop.yarn.proto.YarnServerCommonProtos;
 import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeHealthStatusProto;
 import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProto;
 import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder;
+import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.QueuedContainersStatusProto;
 
 import org.apache.hadoop.yarn.server.api.records.QueuedContainersStatus;
 import org.apache.hadoop.yarn.server.api.records.NodeHealthStatus;
@@ -404,7 +404,7 @@ public class NodeStatusPBImpl extends NodeStatus {
   }
 
   @Override
-  public QueuedContainersStatus getQueuedContainersStatus() {
+  public synchronized QueuedContainersStatus getQueuedContainersStatus() {
     NodeStatusProtoOrBuilder p =
         this.viaProto ? this.proto : this.builder;
     if (!p.hasQueuedContainerStatus()) {
@@ -414,7 +414,8 @@ public class NodeStatusPBImpl extends NodeStatus {
   }
 
   @Override
-  public void setQueuedContainersStatus(QueuedContainersStatus queuedContainersStatus) {
+  public synchronized void setQueuedContainersStatus(
+      QueuedContainersStatus queuedContainersStatus) {
     maybeInitBuilder();
     if (queuedContainersStatus == null) {
       this.builder.clearQueuedContainerStatus();
@@ -457,7 +458,8 @@ public class NodeStatusPBImpl extends NodeStatus {
     return ((ApplicationIdPBImpl)c).getProto();
   }
 
-  private YarnProtos.ResourceUtilizationProto convertToProtoFormat(ResourceUtilization r)
{
+  private YarnProtos.ResourceUtilizationProto convertToProtoFormat(
+      ResourceUtilization r) {
     return ((ResourceUtilizationPBImpl) r).getProto();
   }
 
@@ -466,13 +468,13 @@ public class NodeStatusPBImpl extends NodeStatus {
     return new ResourceUtilizationPBImpl(p);
   }
 
-  private YarnServerCommonProtos.QueuedContainersStatusProto convertToProtoFormat(
+  private QueuedContainersStatusProto convertToProtoFormat(
       QueuedContainersStatus r) {
     return ((QueuedContainersStatusPBImpl) r).getProto();
   }
 
   private QueuedContainersStatus convertFromProtoFormat(
-      YarnServerCommonProtos.QueuedContainersStatusProto p) {
+      QueuedContainersStatusProto p) {
     return new QueuedContainersStatusPBImpl(p);
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ccc93e78/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/QueuedContainersStatusPBImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/QueuedContainersStatusPBImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/QueuedContainersStatusPBImpl.java
index 54470f4..16b80dd 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/QueuedContainersStatusPBImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/QueuedContainersStatusPBImpl.java
@@ -21,11 +21,15 @@ package org.apache.hadoop.yarn.server.api.records.impl.pb;
 import org.apache.hadoop.yarn.proto.YarnServerCommonProtos;
 import org.apache.hadoop.yarn.server.api.records.QueuedContainersStatus;
 
+/**
+ * Protocol Buffer implementation of QueuedContainersStatus.
+ */
 public class QueuedContainersStatusPBImpl extends QueuedContainersStatus {
 
   private YarnServerCommonProtos.QueuedContainersStatusProto proto =
       YarnServerCommonProtos.QueuedContainersStatusProto.getDefaultInstance();
-  private YarnServerCommonProtos.QueuedContainersStatusProto.Builder builder = null;
+  private YarnServerCommonProtos.QueuedContainersStatusProto.Builder builder =
+      null;
   private boolean viaProto = false;
 
   public QueuedContainersStatusPBImpl() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ccc93e78/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
index 0e281d8..3a9cf54 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
@@ -170,7 +170,7 @@ public interface RMNode {
   
   public List<Container> pullNewlyIncreasedContainers();
 
-  public QueuedContainersStatus getQueuedContainersStatus();
+  QueuedContainersStatus getQueuedContainersStatus();
 
   long getUntrackedTimeStamp();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message