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:52:34 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 21c0e3eda -> 286cc6483


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


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

Branch: refs/heads/trunk
Commit: 286cc6483fe458894cdd22ff1d8822c304e0d94f
Parents: 21c0e3e
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:36:12 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/286cc648/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 3be67c3..93a7043 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1626,6 +1626,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/286cc648/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