Java 类org.apache.hadoop.fs.BufferedFSInputStream 实例源码
项目:hadoop
文件:NativeAzureFileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug("Opening file: " + f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
FileMetadata meta = store.retrieveMetadata(key);
if (meta == null) {
throw new FileNotFoundException(f.toString());
}
if (meta.isDir()) {
throw new FileNotFoundException(f.toString()
+ " is a directory not a file.");
}
return new FSDataInputStream(new BufferedFSInputStream(
new NativeAzureFsInputStream(store.retrieve(key), key, meta.getLength()), bufferSize));
}
项目:aliyun-oss-hadoop-fs
文件:NativeAzureFileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
LOG.debug("Opening file: {}", f.toString());
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
FileMetadata meta = store.retrieveMetadata(key);
if (meta == null) {
throw new FileNotFoundException(f.toString());
}
if (meta.isDir()) {
throw new FileNotFoundException(f.toString()
+ " is a directory not a file.");
}
return new FSDataInputStream(new BufferedFSInputStream(
new NativeAzureFsInputStream(store.retrieve(key), key, meta.getLength()), bufferSize));
}
项目:big-c
文件:NativeAzureFileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug("Opening file: " + f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
FileMetadata meta = store.retrieveMetadata(key);
if (meta == null) {
throw new FileNotFoundException(f.toString());
}
if (meta.isDir()) {
throw new FileNotFoundException(f.toString()
+ " is a directory not a file.");
}
return new FSDataInputStream(new BufferedFSInputStream(
new NativeAzureFsInputStream(store.retrieve(key), key, meta.getLength()), bufferSize));
}
项目:hadoop-2.6.0-cdh5.4.3
文件:NativeAzureFileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug("Opening file: " + f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
FileMetadata meta = store.retrieveMetadata(key);
if (meta == null) {
throw new FileNotFoundException(f.toString());
}
if (meta.isDir()) {
throw new FileNotFoundException(f.toString()
+ " is a directory not a file.");
}
return new FSDataInputStream(new BufferedFSInputStream(
new NativeAzureFsInputStream(store.retrieve(key), key, meta.getLength()), bufferSize));
}
项目:hadoop
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new FileNotFoundException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:aliyun-oss-hadoop-fs
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new FileNotFoundException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:big-c
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new FileNotFoundException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:hadoop-2.6.0-cdh5.4.3
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new FileNotFoundException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:hadoop-EAR
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (!exists(f)) {
throw new FileNotFoundException(f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store.retrieve(key), key), bufferSize));
}
项目:Gobblin
文件:SftpLightWeightFileSystem.java
@Override
public FSDataInputStream open(Path path, int bufferSize) throws IOException {
SftpGetMonitor monitor = new SftpGetMonitor();
try {
ChannelSftp channelSftp = fsHelper.getSftpChannel();
InputStream is = channelSftp.get(path.toString(), monitor);
return new FSDataInputStream(new BufferedFSInputStream(new SftpFsFileInputStream(is, channelSftp), bufferSize));
} catch (SftpException e) {
throw new IOException(e);
}
}
项目:hadoop-plus
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new IOException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:presto
文件:PrestoS3FileSystem.java
@Override
public FSDataInputStream open(Path path, int bufferSize)
throws IOException
{
return new FSDataInputStream(
new BufferedFSInputStream(
new PrestoS3InputStream(s3, uri.getHost(), path, maxAttempts, maxBackoffTime, maxRetryTime),
bufferSize));
}
项目:incubator-gobblin
文件:SftpLightWeightFileSystem.java
@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);
}
}
项目:hadoop-TCP
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new IOException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:hadoop-on-lustre
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (!exists(f)) {
throw new FileNotFoundException(f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store.retrieve(key), key), bufferSize));
}
项目:hardfs
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new IOException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:hadoop-on-lustre2
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
FileStatus fs = getFileStatus(f); // will throw if the file doesn't exist
if (fs.isDirectory()) {
throw new IOException("'" + f + "' is a directory");
}
LOG.info("Opening '" + f + "' for reading");
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store, statistics, store.retrieve(key), key), bufferSize));
}
项目:dragon-oss
文件:OSSFileSystem.java
@Override
@Nonnull
public FSDataInputStream open(Path path, int bufferSize) throws IOException {
path = checkNotNull(path);
FileStatus fs = getFileStatus(path); // will throw if the file doesn't exist
if (fs.isDirectory()) throw new FileNotFoundException("'" + path + "' is a directory");
LOG.info("Opening '{}' for reading", path);
Path absolutePath = makeAbsolute(path);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(new OSSFileInputStream(store, key, of(statistics)), bufferSize));
}
项目:RDFS
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (!exists(f)) {
throw new FileNotFoundException(f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store.retrieve(key), key), bufferSize));
}
项目:hadoop-0.20
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (!exists(f)) {
throw new FileNotFoundException(f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store.retrieve(key), key), bufferSize));
}
项目:TarFileSystem
文件:TarFileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
Path baseTarPath = getBaseTarPath(f);
String inFile = getFileInArchive(f);
if (inFile == null)
throw new IOException("TAR FileSystem: Can not open the whole TAR");
// adjust for the header
long offset = index.getOffset(inFile);
long size = index.getSize(inFile);
FSDataInputStream in = underlyingFS.open(baseTarPath);
in.seek(offset - 512);
TarArchiveEntry entry = readHeaderEntry(in);
if (!entry.getName().equals(inFile)) {
LOG.fatal(
"Index file is corrupt." +
"Requested filename is present in index " +
"but absent in TAR.");
throw new IOException("Requested filename does not match ");
}
return new FSDataInputStream(
new BufferedFSInputStream(
new SeekableTarInputStream(in, size, offset),
bufferSize));
}
项目:hortonworks-extension
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (!exists(f)) {
throw new FileNotFoundException(f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store.retrieve(key), key), bufferSize));
}
项目:hortonworks-extension
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (!exists(f)) {
throw new FileNotFoundException(f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store.retrieve(key), key), bufferSize));
}
项目:hadoop-gpu
文件:NativeS3FileSystem.java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
if (!exists(f)) {
throw new FileNotFoundException(f.toString());
}
Path absolutePath = makeAbsolute(f);
String key = pathToKey(absolutePath);
return new FSDataInputStream(new BufferedFSInputStream(
new NativeS3FsInputStream(store.retrieve(key), key), bufferSize));
}
项目:hadoop-gpu
文件:LustreFileSystem.java
@Override
public FSDataInputStream open(Path path, int bufferSize) throws IOException {
if (!exists(path)) {
throw new FileNotFoundException(path.toString());
}
return new FSDataInputStream(new BufferedFSInputStream(
new LFSInputStream(path), bufferSize));
}