public EncodedReaderImpl(Object fileKey, List<OrcProto.Type> types, TypeDescription fileSchema, org.apache.orc.CompressionKind kind, WriterVersion version, int bufferSize, long strideRate, DataCache cacheWrapper, DataReader dataReader, PoolFactory pf, IoTrace trace, boolean useCodecPool, String tag) throws IOException { this.fileKey = fileKey; this.compressionKind = kind; this.isCompressed = kind != org.apache.orc.CompressionKind.NONE; this.isCodecFromPool = useCodecPool; this.codec = useCodecPool ? OrcCodecPool.getCodec(kind) : WriterImpl.createCodec(kind); this.types = types; this.fileSchema = fileSchema; // Note: this is redundant with types this.version = version; this.bufferSize = bufferSize; this.rowIndexStride = strideRate; this.cacheWrapper = cacheWrapper; Allocator alloc = cacheWrapper.getAllocator(); this.allocator = alloc instanceof StoppableAllocator ? (StoppableAllocator) alloc : null; this.dataReader = dataReader; this.trace = trace; this.tag = tag; if (POOLS != null) return; if (pf == null) { pf = new NoopPoolFactory(); } Pools pools = createPools(pf); synchronized (POOLS_CREATION_LOCK) { if (POOLS != null) return; POOLS = pools; } }
@Override public Pool<ColumnStreamData> createColumnStreamDataPool() { return createPool(0, new PoolObjectHelper<ColumnStreamData>() { @Override public ColumnStreamData create() { return new ColumnStreamData(); } @Override public void resetBeforeOffer(ColumnStreamData t) { } }); } }
public EncodedReaderImpl(Object fileKey, List<OrcProto.Type> types, CompressionCodec codec, int bufferSize, long strideRate, DataCache cacheWrapper, DataReader dataReader, PoolFactory pf) throws IOException { this.fileKey = fileKey; this.codec = codec; this.types = types; this.bufferSize = bufferSize; this.rowIndexStride = strideRate; this.cacheWrapper = cacheWrapper; this.dataReader = dataReader; if (POOLS != null) return; if (pf == null) { pf = new NoopPoolFactory(); } Pools pools = createPools(pf); synchronized (POOLS_CREATION_LOCK) { if (POOLS != null) return; POOLS = pools; } }
@Override public Pool<OrcEncodedColumnBatch> createEncodedColumnBatchPool() { return createPool(0, new PoolObjectHelper<OrcEncodedColumnBatch>() { @Override public OrcEncodedColumnBatch create() { return new OrcEncodedColumnBatch(); } @Override public void resetBeforeOffer(OrcEncodedColumnBatch t) { } }); }
@Override public Pool<ColumnStreamData> createColumnStreamDataPool() { return createPool(0, new PoolObjectHelper<ColumnStreamData>() { @Override public ColumnStreamData create() { return new ColumnStreamData(); } @Override public void resetBeforeOffer(ColumnStreamData t) { } }); } }
@Override public Pool<OrcEncodedColumnBatch> createEncodedColumnBatchPool() { return createPool(0, new PoolObjectHelper<OrcEncodedColumnBatch>() { @Override public OrcEncodedColumnBatch create() { return new OrcEncodedColumnBatch(); } @Override public void resetBeforeOffer(OrcEncodedColumnBatch t) { } }); }