hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yjzhan...@apache.org
Subject hadoop git commit: HDFS-9377. Fix findbugs warnings in FSDirSnapshotOp. (Mingliang Liu via Yongjun Zhang)
Date Thu, 05 Nov 2015 22:59:09 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 f7e6a5dfb -> 1bb89cbac


HDFS-9377. Fix findbugs warnings in FSDirSnapshotOp. (Mingliang Liu via Yongjun Zhang)

(cherry picked from commit 286cc6483fe458894cdd22ff1d8822c304e0d94f)


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

Branch: refs/heads/branch-2
Commit: 1bb89cbac72524b287d830ac7316edf92f1bc3e3
Parents: f7e6a5d
Author: Yongjun Zhang <yzhang@cloudera.com>
Authored: Thu Nov 5 14:36:12 2015 -0800
Committer: Yongjun Zhang <yzhang@cloudera.com>
Committed: Thu Nov 5 14:54:29 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                       | 3 +++
 .../org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java   | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1bb89cba/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 0a37f27..faaf69c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -779,6 +779,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9363. Add fetchReplica() to FsDatasetTestUtils to return FsDataset-agnostic
     replica. (Tony Wu via lei)
 
+    HDFS-9377. Fix findbugs warnings in FSDirSnapshotOp.
+    (Mingliang Liu via Yongjun Zhang)
+
   OPTIMIZATIONS
 
     HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1bb89cba/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java
index 41ccfd1..c565a6a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java
@@ -171,8 +171,7 @@ class FSDirSnapshotOp {
   static Collection<String> getSnapshotFiles(FSDirectory fsd,
       List<DirectorySnapshottableFeature> lsf,
       String file) throws IOException {
-    ArrayList<String> snaps = new ArrayList<String>();
-    ListIterator<DirectorySnapshottableFeature> sfi = lsf.listIterator();
+    ArrayList<String> snaps = new ArrayList<>();
     for (DirectorySnapshottableFeature sf : lsf) {
       // for each snapshottable dir e.g. /dir1, /dir2
       final ReadOnlyList<Snapshot> lsnap = sf.getSnapshotList();


Mime
View raw message