use of org.apache.gobblin.source.extractor.extract.sftp.SftpFsHelper.SftpGetMonitor in project incubator-gobblin by apache.
the class SftpLightWeightFileSystem method open.
@Override
public FSDataInputStream open(Path path, int bufferSize) throws IOException {
SftpGetMonitor monitor = new SftpGetMonitor();
try {
ChannelSftp channelSftp = this.fsHelper.getSftpChannel();
InputStream is = channelSftp.get(HadoopUtils.toUriPath(path), monitor);
return new FSDataInputStream(new BufferedFSInputStream(new SftpFsHelper.SftpFsFileInputStream(is, channelSftp), bufferSize));
} catch (SftpException e) {
throw new IOException(e);
}
}
Aggregations