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;
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;
}
}