Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions java/core/src/java/org/apache/orc/DataReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import org.apache.hadoop.hive.common.io.DiskRangeList;
import org.apache.orc.impl.BufferChunkList;
import org.apache.orc.impl.InStream;
import org.apache.orc.impl.OrcIndex;

/** An abstract data reader that IO formats can use to read bytes from underlying storage. */
Expand All @@ -42,10 +43,10 @@ public interface DataReader extends AutoCloseable, Cloneable {
*
* @param range List of disk ranges to read. Ranges with data will be ignored.
* @param doForceDirect Whether the data should be read into direct buffers.
* @return New or modified list of DiskRange-s, where all the ranges are filled with data.
* @return The list range with buffers filled in
*/
BufferChunkList readFileData(BufferChunkList range,
boolean doForceDirect) throws IOException;
boolean doForceDirect) throws IOException;

/**
* Whether the user should release buffers created by readFileData. See readFileData javadoc.
Expand All @@ -70,9 +71,10 @@ BufferChunkList readFileData(BufferChunkList range,
void close() throws IOException;

/**
* Returns the compression codec used by this datareader.
* We should consider removing this from the interface.
* @return the compression codec
* Returns the compression options used by this DataReader.
* The codec if present is owned by the DataReader and should not be returned
* to the OrcCodecPool.
* @return the compression options
*/
CompressionCodec getCompressionCodec();
InStream.StreamOptions getCompressionOptions();
}
6 changes: 6 additions & 0 deletions java/core/src/java/org/apache/orc/EncryptionKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ public interface EncryptionKey extends Comparable<EncryptionKey> {
* @return the list of columns
*/
EncryptionVariant[] getEncryptionRoots();

/**
* Is the key available to this user?
* @return true if the key is available
*/
boolean isAvailable();
}
11 changes: 9 additions & 2 deletions java/core/src/java/org/apache/orc/EncryptionVariant.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
import java.security.Key;

/**
* Information about a key used for column encryption in an ORC file.
* Information about a column encryption variant.
*
* Column encryption is done by encoding multiple variants of the same column.
* Each encrypted column ends up in two variants:
* <ul>
* <li>Encrypted original</li>
* <li>Unencrypted masked</li>
* </ul>
*/
public interface EncryptionVariant extends Comparable<EncryptionVariant> {

Expand All @@ -35,7 +42,7 @@ public interface EncryptionVariant extends Comparable<EncryptionVariant> {
EncryptionKey getKeyDescription();

/**
* Get the root column for this encryption.
* Get the root column for this variant.
* @return the root column type
*/
TypeDescription getRoot();
Expand Down
1 change: 1 addition & 0 deletions java/core/src/java/org/apache/orc/FileMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Cached file metadata. Right now, it caches everything; we don't have to store all the
* protobuf structs actually, we could just store what we need, but that would require that
* ORC stop depending on them too. Luckily, they shouldn't be very big.
* @deprecated Use {@link org.apache.orc.impl.OrcTail} instead
*/
public interface FileMetadata {
boolean isOriginalFormat();
Expand Down
Loading