@Override public SeekableInputStream getInput() throws IOException { FSDataInputStream input = fs.open(path); try { return new DFSSeekableInputStream(input, createDFSStreamSizeProvider(fs, false, path, input)); } catch (Throwable t) { Closeables.closeQuietly(input); Throwables.propagateIfInstanceOf(t, IOException.class); throw new IOException(t); } } };
@Override public SeekableInputStream getInput() throws IOException { FSDataInputStream input = fs.open(path); try { return new DFSSeekableInputStream(input, createDFSStreamSizeProvider(fs, false, path, input)); } catch (Throwable t) { Closeables.closeQuietly(input); Throwables.propagateIfInstanceOf(t, IOException.class); throw new IOException(t); } } };
hConf.set(String.format("fs.%s.impl.disable.cache", scheme), "true"); FileSystem fs = FileSystem.get(hConf); return new DFSSeekableInputStream(dataInput, createDFSStreamSizeProvider(fs, true, new Path(location.toURI()), dataInput)); return new DFSSeekableInputStream(dataInput, new StreamSizeProvider() { @Override public long size() throws IOException {
hConf.set(String.format("fs.%s.impl.disable.cache", scheme), "true"); FileSystem fs = FileSystem.get(hConf); return new DFSSeekableInputStream(dataInput, createDFSStreamSizeProvider(fs, true, new Path(location.toURI()), dataInput)); return new DFSSeekableInputStream(dataInput, new StreamSizeProvider() { @Override public long size() throws IOException {