/** * constructor * * @param level * : IndexCreater.ONE_LEVEL_INDEX or IndexCreater.TWO_LEVEL_INDEX * @throws IOException */ public BSTIndexWriter(final Path fileName, int level, Schema keySchema, TupleComparator comparator) throws IOException { this.fileName = fileName; this.level = level; this.keySchema = keySchema; this.compartor = comparator; this.collector = new KeyOffsetCollector(comparator); this.rowStoreEncoder = RowStoreUtil.createEncoder(keySchema); }
public NonForwardQueryResultFileScanner(AsyncTaskService asyncTaskService, TajoConf tajoConf, String sessionId, QueryId queryId, ScanNode scanNode, int maxRow, Optional<CodecType> codecType) throws IOException { this.asyncTaskService = asyncTaskService; this.tajoConf = tajoConf; this.sessionId = sessionId; this.queryId = queryId; this.scanNode = scanNode; this.tableDesc = scanNode.getTableDesc(); this.maxRow = maxRow; this.rowEncoder = RowStoreUtil.createEncoder(scanNode.getOutSchema()); this.codecType = codecType; }
public NonForwardQueryResultFileScanner(TajoConf tajoConf, String sessionId, QueryId queryId, ScanNode scanNode, int maxRow, CodecType codecType) throws IOException { this.tajoConf = tajoConf; this.sessionId = sessionId; this.queryId = queryId; this.scanNode = scanNode; this.tableDesc = scanNode.getTableDesc(); this.maxRow = maxRow; this.rowEncoder = RowStoreUtil.createEncoder(scanNode.getOutSchema()); this.codecType = codecType; }
/** * constructor * * @param level * : IndexCreater.ONE_LEVEL_INDEX or IndexCreater.TWO_LEVEL_INDEX * @throws java.io.IOException */ public BSTIndexWriter(final Path fileName, int level, Schema keySchema, TupleComparator comparator, boolean sorted) throws IOException { this.fileName = fileName; this.level = level; this.writeRootIndex = level == TWO_LEVEL_INDEX; this.keySchema = keySchema; this.compartor = comparator; this.collector = new KeyOffsetCollector(comparator); this.rootCollector = new KeyOffsetCollector(this.compartor); this.rowStoreEncoder = RowStoreUtil.createEncoder(keySchema); this.sorted = sorted; this.indexBuffer = BufferPool.directBuffer(BUFFER_SIZE, ByteOrder.nativeOrder()); this.rootIndexBuffer = BufferPool.directBuffer(BUFFER_SIZE, ByteOrder.nativeOrder()); this.loadCount = loadNum = conf.getInt(WRITER_INDEX_LOAD, DEFAULT_INDEX_LOAD); }
/** * constructor * * @param level * : IndexCreater.ONE_LEVEL_INDEX or IndexCreater.TWO_LEVEL_INDEX * @throws java.io.IOException */ public BSTIndexWriter(final Path fileName, int level, Schema keySchema, TupleComparator comparator, boolean sorted) throws IOException { this.fileName = fileName; this.level = level; this.writeRootIndex = level == TWO_LEVEL_INDEX; this.keySchema = keySchema; this.compartor = comparator; this.collector = new KeyOffsetCollector(comparator); this.rootCollector = new KeyOffsetCollector(this.compartor); this.rowStoreEncoder = RowStoreUtil.createEncoder(keySchema); this.sorted = sorted; this.indexBuffer = BufferPool.directBuffer(BUFFER_SIZE, ByteOrder.nativeOrder()); this.rootIndexBuffer = BufferPool.directBuffer(BUFFER_SIZE, ByteOrder.nativeOrder()); this.loadCount = loadNum = conf.getInt(WRITER_INDEX_LOAD, DEFAULT_INDEX_LOAD); }
RowStoreUtil.RowStoreEncoder encoder = RowStoreUtil.createEncoder(sortSchema); for (int i = 0; i < ranges.length; i++) { fetchSet = new HashSet<>();
RowStoreUtil.RowStoreEncoder encoder = RowStoreUtil.createEncoder(sortSchema); for (int i = 0; i < ranges.length; i++) { fetchSet = new HashSet<>();
new VTuple(new Datum[] {DatumFactory.createText(strings.get(strings.size() - 1))})), true, RowStoreUtil.createEncoder(schema)); PullServerRequestURIBuilder builder = new PullServerRequestURIBuilder("127.0.0.1", pullserverPort, maxUrlLength);
@Test public final void testFixedSizeChar() { Schema schema = SchemaBuilder.builder().add("col1", CatalogUtil.newDataTypeWithLen(Type.CHAR, 5)).build(); Tuple tuple = new VTuple(1); tuple.put(new Datum[] { DatumFactory.createChar("abc\0\0") }); RowStoreEncoder encoder = RowStoreUtil.createEncoder(schema); RowStoreDecoder decoder = RowStoreUtil.createDecoder(schema); byte [] bytes = encoder.toBytes(tuple); Tuple tuple2 = decoder.toTuple(bytes); assertEquals(tuple, tuple2); }
new TableMeta("SYSTEM", new KeyValueSet()), null); outSchema = physicalExec.getSchema(); encoder = RowStoreUtil.createEncoder(getLogicalSchema());
new TableMeta("SYSTEM", new KeyValueSet()), null); outSchema = physicalExec.getSchema(); encoder = RowStoreUtil.createEncoder(getLogicalSchema());
}); RowStoreEncoder encoder = RowStoreUtil.createEncoder(schema); RowStoreDecoder decoder = RowStoreUtil.createDecoder(schema); byte [] bytes = encoder.toBytes(tuple);