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 71af4850ada..8402be196e0 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 void closeOutputStreams(boolean abort) { * @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 @@ boolean recoverLease(String src) throws IOException { */ 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 DFSOutputStream primitiveCreate(String src, FsPermission absPermission, */ 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 @@ private DFSOutputStream append(String src, int buffersize, */ 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 boolean setReplication(String src, short replication) */ 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 BlockStoragePolicy getStoragePolicy(String path) throws IOException { * @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 RemoteIterator listCachePools() throws IOException { * */ void saveNamespace() throws IOException { - checkOpen(); try (TraceScope ignored = tracer.newScope("saveNamespace")) { namenode.saveNamespace(); } catch (RemoteException re) { @@ -2340,7 +2333,6 @@ void saveNamespace() throws IOException { * @see ClientProtocol#rollEdits() */ long rollEdits() throws IOException { - checkOpen(); try (TraceScope ignored = tracer.newScope("rollEdits")) { return namenode.rollEdits(); } catch (RemoteException re) { @@ -2359,7 +2351,6 @@ ExtendedBlock getPreviousBlock(long fileId) { * @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 @@ boolean restoreFailedStorage(String arg) throws IOException{ * @see ClientProtocol#refreshNodes() */ public void refreshNodes() throws IOException { - checkOpen(); try (TraceScope ignored = tracer.newScope("refreshNodes")) { namenode.refreshNodes(); } @@ -2385,7 +2375,6 @@ public void refreshNodes() throws IOException { * @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 void metaSave(String pathname) throws IOException { * @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 void setBalancerBandwidth(long bandwidth) throws IOException { * @see ClientProtocol#finalizeUpgrade() */ public void finalizeUpgrade() throws IOException { - checkOpen(); try (TraceScope ignored = tracer.newScope("finalizeUpgrade")) { namenode.finalizeUpgrade(); } @@ -2418,7 +2405,6 @@ public void finalizeUpgrade() throws IOException { RollingUpgradeInfo rollingUpgrade(RollingUpgradeAction action) throws IOException { - checkOpen(); try (TraceScope ignored = tracer.newScope("rollingUpgrade")) { return namenode.rollingUpgrade(action); } @@ -2495,7 +2481,6 @@ public boolean primitiveMkdir(String src, FsPermission absPermission, * @see ClientProtocol#getContentSummary(String) */ ContentSummary getContentSummary(String src) throws IOException { - checkOpen(); try (TraceScope ignored = newPathTraceScope("getContentSummary", src)) { return namenode.getContentSummary(src); } catch (RemoteException re) { diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 06816f83ff5..1d889ab2452 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