MCPcopy Create free account
hub / github.com/apache/orc / create

Method create

java/core/src/java/org/apache/orc/impl/InStream.java:874–894  ·  view source on GitHub ↗

Create an input stream from a list of disk ranges with data. @param name the name of the stream @param input the list of ranges of bytes for the stream; from disk or cache @param offset the first byte offset of the stream @param length the length in bytes of the stream @param options the options to

(Object name,
                                DiskRangeList input,
                                long offset,
                                long length,
                                StreamOptions options)

Source from the content-addressed store, hash-verified

872 * @return an input stream
873 */
874 public static InStream create(Object name,
875 DiskRangeList input,
876 long offset,
877 long length,
878 StreamOptions options) {
879 LOG.debug("Reading {} with {} from {} for {}", name, options, offset,
880 length);
881 if (options == null || options.codec == null) {
882 if (options == null || options.key == null) {
883 return new UncompressedStream(name, input, offset, length);
884 } else {
885 OutStream.logKeyAndIv(name, options.getKey(), options.getIv());
886 return new EncryptedStream(name, input, offset, length, options);
887 }
888 } else if (options.key == null) {
889 return new CompressedStream(name, input, offset, length, options);
890 } else {
891 OutStream.logKeyAndIv(name, options.getKey(), options.getIv());
892 return new EncryptedCompressedStream(name, input, offset, length, options);
893 }
894 }
895
896 /**
897 * Create an input stream from a list of disk ranges with data.

Callers 15

runSeekTestMethod · 0.95
testSkipsMethod · 0.95
runSeekTestMethod · 0.95
testSkipsMethod · 0.95
testSeekSkipMethod · 0.95
runTestMethod · 0.95
testUncompressedMethod · 0.95
testEncryptedMethod · 0.95
testEncryptedPartialMethod · 0.95

Calls 3

logKeyAndIvMethod · 0.95
getKeyMethod · 0.45
getIvMethod · 0.45

Tested by 15

runSeekTestMethod · 0.76
testSkipsMethod · 0.76
runSeekTestMethod · 0.76
testSkipsMethod · 0.76
testSeekSkipMethod · 0.76
runTestMethod · 0.76
testUncompressedMethod · 0.76
testEncryptedMethod · 0.76
testEncryptedPartialMethod · 0.76