public FileOrcDataSource(File path, DataSize maxMergeDistance, DataSize maxReadSize, DataSize streamBufferSize, boolean lazyReadSmallRanges) throws FileNotFoundException { super(new OrcDataSourceId(path.getPath()), path.length(), maxMergeDistance, maxReadSize, streamBufferSize, lazyReadSmallRanges); this.input = new RandomAccessFile(path, "r"); }
@Override public final String toString() { return id.toString(); }
public FileOrcDataSource(File path, DataSize maxMergeDistance, DataSize maxReadSize, DataSize streamBufferSize, boolean lazyReadSmallRanges) throws FileNotFoundException { super(new OrcDataSourceId(path.getPath()), path.length(), maxMergeDistance, maxReadSize, streamBufferSize, lazyReadSmallRanges); this.input = new RandomAccessFile(path, "r"); }
@Override public final String toString() { return id.toString(); }
@Override public OrcDataSourceId getId() { return new OrcDataSourceId("fake"); }
public InMemoryOrcDataSource(byte[] data) { super(new OrcDataSourceId("memory"), data.length, SIZE, SIZE, SIZE, false); this.data = data; }
@Override public OrcDataSourceId getId() { return new OrcDataSourceId("fake"); }
public InMemoryOrcDataSource(byte[] data) { super(new OrcDataSourceId("memory"), data.length, SIZE, SIZE, SIZE, false); this.data = data; }
Path file = tempFile.getPath(); OrcDataSource dataSource = new HdfsOrcDataSource( new OrcDataSourceId(file.toString()), fileSystem.getFileStatus(file).getLen(), new DataSize(1, MEGABYTE),
private static OrcInputStream orcInputStreamFor(String source, byte[] bytes) { return new OrcInputStream(new OrcDataSourceId(source), new BasicSliceInput(Slices.wrappedBuffer(bytes)), Optional.empty(), newSimpleAggregatedMemoryContext(), bytes.length); }
private static OrcInputStream orcInputStreamFor(String source, byte[] bytes) { return new OrcInputStream(new OrcDataSourceId(source), new BasicSliceInput(Slices.wrappedBuffer(bytes)), Optional.empty(), newSimpleAggregatedMemoryContext(), bytes.length); }
try { return new HdfsOrcDataSource( new OrcDataSourceId(path.toString()), fileSystem.getFileStatus(path).getLen(), getOrcMaxMergeDistance(session),
FSDataInputStream inputStream = fileSystem.open(path); orcDataSource = new HdfsOrcDataSource( new OrcDataSourceId(path.toString()), fileSize, maxMergeDistance,
long readValueNew = readVInt(signed, new OrcInputStream(new OrcDataSourceId("test"), hiveBytes.getInput(), Optional.empty(), newSimpleAggregatedMemoryContext(), hiveBytes.getRetainedSize())); assertEquals(readValueNew, value);
long readValueNew = readVInt(signed, new OrcInputStream(new OrcDataSourceId("test"), hiveBytes.getInput(), Optional.empty(), newSimpleAggregatedMemoryContext(), hiveBytes.getRetainedSize())); assertEquals(readValueNew, value);