mpryahin commented on a change in pull request #1999:
URL: https://github.com/apache/hadoop/pull/1999#discussion_r427468540
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java
##########
@@ -516,16 +515,14 @@ public FSDataInputStream open(Path f, int bufferSize)
throws IOException {
disconnect(channel);
throw new IOException(String.format(E_PATH_DIR, f));
}
- InputStream is;
try {
// the path could be a symbolic link, so get the real path
absolute = new Path("/", channel.realpath(absolute.toUri().getPath()));
-
- is = channel.get(absolute.toUri().getPath());
} catch (SftpException e) {
throw new IOException(e);
}
- return new FSDataInputStream(new SFTPInputStream(is, statistics)){
+ return new FSDataInputStream(
+ new SFTPInputStream(channel, absolute, statistics)){
@Override
public void close() throws IOException {
super.close();
Review comment:
thanks a lot will do
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]