Skip to content

Commit a0b33ae

Browse files
author
zengqiang.xu
committed
HDFS-16724. Modify patch based on comments
1 parent 92090b1 commit a0b33ae

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/NoLocationException.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ public class NoLocationException extends IOException {
2727

2828
private static final long serialVersionUID = 1L;
2929

30-
public NoLocationException(String path, String className) {
31-
super("Cannot find locations for " + path + " in " + className);
32-
}
33-
34-
public NoLocationException(String message) {
35-
super(message);
30+
public NoLocationException(String path, Class<?> t) {
31+
super("Cannot find locations for " + path + " in " + t.getSimpleName());
3632
}
3733
}

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ protected List<RemoteLocation> getLocationsForPath(String path,
17311731
final PathLocation location =
17321732
this.subclusterResolver.getDestinationForPath(path);
17331733
if (location == null) {
1734-
throw new NoLocationException(path, this.subclusterResolver.getClass().getSimpleName());
1734+
throw new NoLocationException(path, this.subclusterResolver.getClass());
17351735
}
17361736

17371737
// We may block some write operations

0 commit comments

Comments
 (0)