HDFS-9400. TestRollingUpgradeRollback fails on branch-2. Contributed by Brahma 
Reddy Battula.

(cherry picked from commit bad2afe39a3a589ca9d25de297a080b974645fea)


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

Branch: refs/heads/branch-2
Commit: 7b94ae17abd842edc5faf77eb367dbb6f93a27ac
Parents: 44011a1
Author: cnauroth <[email protected]>
Authored: Wed Nov 18 11:00:18 2015 -0800
Committer: cnauroth <[email protected]>
Committed: Wed Nov 18 11:00:18 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hdfs/DFSClient.java  | 15 ---------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt          |  3 +++
 2 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7b94ae17/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
index 71af485..8402be1 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
@@ -621,7 +621,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#getPreferredBlockSize(String)
    */
   public long getBlockSize(String f) throws IOException {
-    checkOpen();
     try (TraceScope ignored = newPathTraceScope("getBlockSize", f)) {
       return namenode.getPreferredBlockSize(f);
     } catch (IOException ie) {
@@ -864,7 +863,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    */
   public BlockLocation[] getBlockLocations(String src, long start,
       long length) throws IOException {
-    checkOpen();
     try (TraceScope ignored = newPathTraceScope("getBlockLocations", src)) {
       LocatedBlocks blocks = getLocatedBlocks(src, start, length);
       BlockLocation[] locations = 
DFSUtilClient.locatedBlocks2Locations(blocks);
@@ -1325,7 +1323,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    */
   public void createSymlink(String target, String link, boolean createParent)
       throws IOException {
-    checkOpen();
     try (TraceScope ignored = newPathTraceScope("createSymlink", target)) {
       final FsPermission dirPerm = applyUMask(null);
       namenode.createSymlink(target, link, dirPerm, createParent);
@@ -1446,7 +1443,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    */
   public boolean setReplication(String src, short replication)
       throws IOException {
-    checkOpen();
     try (TraceScope ignored = newPathTraceScope("setReplication", src)) {
       return namenode.setReplication(src, replication);
     } catch (RemoteException re) {
@@ -1467,7 +1463,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    */
   public void setStoragePolicy(String src, String policyName)
       throws IOException {
-    checkOpen();
     try (TraceScope ignored = newPathTraceScope("setStoragePolicy", src)) {
       namenode.setStoragePolicy(src, policyName);
     } catch (RemoteException e) {
@@ -1500,7 +1495,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @return All the existing storage policies
    */
   public BlockStoragePolicy[] getStoragePolicies() throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("getStoragePolicies")) {
       return namenode.getStoragePolicies();
     }
@@ -2325,7 +2319,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    *
    */
   void saveNamespace() throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("saveNamespace")) {
       namenode.saveNamespace();
     } catch (RemoteException re) {
@@ -2340,7 +2333,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#rollEdits()
    */
   long rollEdits() throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("rollEdits")) {
       return namenode.rollEdits();
     } catch (RemoteException re) {
@@ -2359,7 +2351,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#restoreFailedStorage(String arg)
    */
   boolean restoreFailedStorage(String arg) throws IOException{
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("restoreFailedStorage")) {
       return namenode.restoreFailedStorage(arg);
     }
@@ -2373,7 +2364,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#refreshNodes()
    */
   public void refreshNodes() throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("refreshNodes")) {
       namenode.refreshNodes();
     }
@@ -2385,7 +2375,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#metaSave(String)
    */
   public void metaSave(String pathname) throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("metaSave")) {
       namenode.metaSave(pathname);
     }
@@ -2400,7 +2389,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#setBalancerBandwidth(long)
    */
   public void setBalancerBandwidth(long bandwidth) throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("setBalancerBandwidth")) {
       namenode.setBalancerBandwidth(bandwidth);
     }
@@ -2410,7 +2398,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#finalizeUpgrade()
    */
   public void finalizeUpgrade() throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("finalizeUpgrade")) {
       namenode.finalizeUpgrade();
     }
@@ -2418,7 +2405,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
 
   RollingUpgradeInfo rollingUpgrade(RollingUpgradeAction action)
       throws IOException {
-    checkOpen();
     try (TraceScope ignored = tracer.newScope("rollingUpgrade")) {
       return namenode.rollingUpgrade(action);
     }
@@ -2495,7 +2481,6 @@ public class DFSClient implements java.io.Closeable, 
RemotePeerFactory,
    * @see ClientProtocol#getContentSummary(String)
    */
   ContentSummary getContentSummary(String src) throws IOException {
-    checkOpen();
     try (TraceScope ignored = newPathTraceScope("getContentSummary", src)) {
       return namenode.getContentSummary(src);
     } catch (RemoteException re) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7b94ae17/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 06816f8..1d889ab 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1465,6 +1465,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9397. Fix typo for readChecksum() LOG.warn in BlockSender.java.
     (Enrique Flores via Arpit Agarwal)
 
+    HDFS-9400. TestRollingUpgradeRollback fails on branch-2.
+    (Brahma Reddy Battula via cnauroth)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Reply via email to