Skip to content

Commit

Permalink
HDFS-16753. WebHDFSHandler should reject non-compliant requests
Browse files Browse the repository at this point in the history
Make a non-null nnId a precondition for creating a DFSClient.
  • Loading branch information
Steve Vaughan Jr committed Feb 21, 2023
1 parent 4e6e2f3 commit 38af11a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ private static void writeContinueHeader(ChannelHandlerContext ctx) {

private static DFSClient newDfsClient
(String nnId, Configuration conf) throws IOException {
Preconditions.checkArgument(nnId != null);
URI uri = URI.create(HDFS_URI_SCHEME + "://" + nnId);
return new DFSClient(uri, conf);
}
Expand Down

0 comments on commit 38af11a

Please sign in to comment.