MCPcopy Index your code
hub / github.com/apache/orc / HadoopShims

Interface HadoopShims

java/shims/src/java/org/apache/orc/impl/HadoopShims.java:31–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29import java.util.Random;
30
31public interface HadoopShims {
32
33 enum DirectCompressionType {
34 NONE,
35 ZLIB_NOHEADER,
36 ZLIB,
37 SNAPPY,
38 }
39
40 interface DirectDecompressor {
41 /**
42 * Decompress the in buffer to the out buffer.
43 * @param var1 the bytes to decompress
44 * @param var2 the decompressed bytes
45 * @throws IOException if there is an error
46 */
47 void decompress(ByteBuffer var1, ByteBuffer var2) throws IOException;
48 /**
49 * Reset the decompressor.
50 */
51 void reset();
52 /**
53 * End the decompressor.
54 */
55 void end();
56 }
57
58 /**
59 * Get a direct decompressor codec, if it is available
60 * @param codec the kind of decompressor that we need
61 * @return a direct decompressor or null, if it isn't available
62 */
63 DirectDecompressor getDirectDecompressor(DirectCompressionType codec);
64
65 /**
66 * a hadoop.io ByteBufferPool shim.
67 */
68 interface ByteBufferPoolShim {
69 /**
70 * Get a new ByteBuffer from the pool. The pool can provide this from
71 * removing a buffer from its internal cache, or by allocating a
72 * new buffer.
73 *
74 * @param direct Whether the buffer should be direct.
75 * @param length The minimum length the buffer will have.
76 * @return A new ByteBuffer. Its capacity can be less
77 * than what was requested, but must be at
78 * least 1 byte.
79 */
80 ByteBuffer getBuffer(boolean direct, int length);
81
82 /**
83 * Release a buffer back to the pool.
84 * The pool may choose to put this buffer into its cache/free it.
85 *
86 * @param buffer a direct bytebuffer
87 */
88 void putBuffer(ByteBuffer buffer);

Callers 10

ensureShimMethod · 0.65
ensureShimMethod · 0.65
createZeroCopyShimMethod · 0.65
padStripeMethod · 0.65
RecordReaderUtilsClass · 0.80
ChunkReadUtilTestClass · 0.80
createMethod · 0.65

Implementers 2

HadoopShimsCurrentjava/shims/src/java/org/apache/orc/imp
MockHadoopShimjava/core/src/test/org/apache/orc/impl

Calls

no outgoing calls

Tested by

no test coverage detected