@Override public void readFully(long position, byte[] buffer) throws IOException { readFully(position, buffer, 0, buffer.length); }
@Override public <K> Map<K, OrcDataSourceInput> readFully(Map<K, DiskRange> diskRanges) throws IOException { ImmutableMap.Builder<K, OrcDataSourceInput> builder = ImmutableMap.builder(); // Assumption here: all disk ranges are in the same region. Therefore, serving them in arbitrary order // will not result in eviction of cache that otherwise could have served any of the DiskRanges provided. for (Map.Entry<K, DiskRange> entry : diskRanges.entrySet()) { DiskRange diskRange = entry.getValue(); byte[] buffer = new byte[diskRange.getLength()]; readFully(diskRange.getOffset(), buffer); builder.put(entry.getKey(), new OrcDataSourceInput(Slices.wrappedBuffer(buffer).getInput(), buffer.length)); } return builder.build(); }
@Override public void readFully(long position, byte[] buffer) throws IOException { readFully(position, buffer, 0, buffer.length); }
@Override public void readFully(long position, byte[] buffer) throws IOException { readFully(position, buffer, 0, buffer.length); }
@Override public <K> Map<K, FixedLengthSliceInput> readFully(Map<K, DiskRange> diskRanges) throws IOException { ImmutableMap.Builder<K, FixedLengthSliceInput> builder = ImmutableMap.builder(); // Assumption here: all disk ranges are in the same region. Therefore, serving them in arbitrary order // will not result in eviction of cache that otherwise could have served any of the DiskRanges provided. for (Map.Entry<K, DiskRange> entry : diskRanges.entrySet()) { DiskRange diskRange = entry.getValue(); byte[] buffer = new byte[diskRange.getLength()]; readFully(diskRange.getOffset(), buffer); builder.put(entry.getKey(), Slices.wrappedBuffer(buffer).getInput()); } return builder.build(); }
@Override public <K> Map<K, OrcDataSourceInput> readFully(Map<K, DiskRange> diskRanges) throws IOException { ImmutableMap.Builder<K, OrcDataSourceInput> builder = ImmutableMap.builder(); // Assumption here: all disk ranges are in the same region. Therefore, serving them in arbitrary order // will not result in eviction of cache that otherwise could have served any of the DiskRanges provided. for (Map.Entry<K, DiskRange> entry : diskRanges.entrySet()) { DiskRange diskRange = entry.getValue(); byte[] buffer = new byte[diskRange.getLength()]; readFully(diskRange.getOffset(), buffer); builder.put(entry.getKey(), new OrcDataSourceInput(Slices.wrappedBuffer(buffer).getInput(), buffer.length)); } return builder.build(); }