hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [1/5] hadoop git commit: HDFS-13318. RBF: Fix FindBugs in hadoop-hdfs-rbf. Contributed by Ekanth S.
Date Thu, 22 Mar 2018 16:24:04 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 52752840f -> 06bebcc7d
  refs/heads/branch-2.9 d1a89c4ad -> f0eab1035
  refs/heads/branch-3.0 987d90aa4 -> 471f75867
  refs/heads/branch-3.1 21db4e9ef -> 485348a33
  refs/heads/trunk 8d898ab25 -> 3d0ee8b80


HDFS-13318. RBF: Fix FindBugs in hadoop-hdfs-rbf. Contributed by Ekanth S.


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

Branch: refs/heads/trunk
Commit: 3d0ee8b80438bfbdf7e5af853b9044a63bd1352c
Parents: 8d898ab
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Thu Mar 22 09:21:52 2018 -0700
Committer: Inigo Goiri <inigoiri@apache.org>
Committed: Thu Mar 22 09:21:52 2018 -0700

----------------------------------------------------------------------
 .../server/federation/resolver/NamenodePriorityComparator.java  | 5 ++++-
 .../hadoop/hdfs/server/federation/router/RemoteMethod.java      | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3d0ee8b8/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/NamenodePriorityComparator.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/NamenodePriorityComparator.java
b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/NamenodePriorityComparator.java
index fe82f29..e9724a3 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/NamenodePriorityComparator.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/NamenodePriorityComparator.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.hdfs.server.federation.resolver;
 
+import java.io.Serializable;
 import java.util.Comparator;
 
 /**
@@ -31,7 +32,9 @@ import java.util.Comparator;
  * breaker, newest has priority. Expired NNs are excluded.
  */
 public class NamenodePriorityComparator
-    implements Comparator<FederationNamenodeContext> {
+    implements Comparator<FederationNamenodeContext>, Serializable {
+
+  private static final long serialVersionUID = 2304924292036293331L;
 
   @Override
   public int compare(FederationNamenodeContext o1,

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3d0ee8b8/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RemoteMethod.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RemoteMethod.java
b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RemoteMethod.java
index cd57d45..7978105 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RemoteMethod.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RemoteMethod.java
@@ -76,7 +76,7 @@ public class RemoteMethod {
     }
 
     this.params = pParams;
-    this.types = pTypes;
+    this.types = Arrays.copyOf(pTypes, pTypes.length);
     this.methodName = method;
   }
 
@@ -111,7 +111,7 @@ public class RemoteMethod {
    * @return An array of calling types.
    */
   public Class<?>[] getTypes() {
-    return this.types;
+    return Arrays.copyOf(this.types, this.types.length);
   }
 
   /**


---------------------------------------------------------------------
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