@Override public KeyValueSchema build() { List<Field> condensedFields = buildFields(); return new KeyValueSchema(this.minNullable, condensedFields); }
public static KeyValueSchema deserializeLocalIndexJoinSchemaFromScan(final Scan scan) { byte[] schemaBytes = scan.getAttribute(BaseScannerRegionObserver.LOCAL_INDEX_JOIN_SCHEMA); if (schemaBytes == null) return null; ByteArrayInputStream stream = new ByteArrayInputStream(schemaBytes); // TODO: size? try { DataInputStream input = new DataInputStream(stream); KeyValueSchema schema = new KeyValueSchema(); schema.readFields(input); return schema; } catch (IOException e) { throw new RuntimeException(e); } finally { try { stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public void readFields(DataInput input) throws IOException { super.readFields(input); schema = new KeyValueSchema(); schema.readFields(input); bitSet = ValueBitSet.newInstance(schema); position = input.readInt(); displayName = input.readUTF(); }
public static TupleProjector deserializeProjectorFromScan(Scan scan) { byte[] proj = scan.getAttribute(SCAN_PROJECTOR); if (proj == null) { return null; } ByteArrayInputStream stream = new ByteArrayInputStream(proj); try { DataInputStream input = new DataInputStream(stream); KeyValueSchema schema = new KeyValueSchema(); schema.readFields(input); int count = WritableUtils.readVInt(input); Expression[] expressions = new Expression[count]; for (int i = 0; i < count; i++) { int ordinal = WritableUtils.readVInt(input); expressions[i] = ExpressionType.values()[ordinal].newInstance(); expressions[i].readFields(input); } return new TupleProjector(schema, expressions); } catch (IOException e) { throw new RuntimeException(e); } finally { try { stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } }
try { DataInputStream input = new DataInputStream(stream); KeyValueSchema joinedSchema = new KeyValueSchema(); joinedSchema.readFields(input); int count = WritableUtils.readVInt(input); joinTypes[i] = JoinType.values()[type]; earlyEvaluation[i] = input.readBoolean(); schemas[i] = new KeyValueSchema(); schemas[i].readFields(input); fieldPositions[i] = WritableUtils.readVInt(input);
@Override public KeyValueSchema build() { List<Field> condensedFields = buildFields(); return new KeyValueSchema(this.minNullable, condensedFields); }
@Override public KeyValueSchema build() { List<Field> condensedFields = buildFields(); return new KeyValueSchema(this.minNullable, condensedFields); }
public static KeyValueSchema deserializeLocalIndexJoinSchemaFromScan(final Scan scan) { byte[] schemaBytes = scan.getAttribute(BaseScannerRegionObserver.LOCAL_INDEX_JOIN_SCHEMA); if (schemaBytes == null) return null; ByteArrayInputStream stream = new ByteArrayInputStream(schemaBytes); // TODO: size? try { DataInputStream input = new DataInputStream(stream); KeyValueSchema schema = new KeyValueSchema(); schema.readFields(input); return schema; } catch (IOException e) { throw new RuntimeException(e); } finally { try { stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } }
public static KeyValueSchema deserializeLocalIndexJoinSchemaFromScan(final Scan scan) { byte[] schemaBytes = scan.getAttribute(BaseScannerRegionObserver.LOCAL_INDEX_JOIN_SCHEMA); if (schemaBytes == null) return null; ByteArrayInputStream stream = new ByteArrayInputStream(schemaBytes); // TODO: size? try { DataInputStream input = new DataInputStream(stream); KeyValueSchema schema = new KeyValueSchema(); schema.readFields(input); return schema; } catch (IOException e) { throw new RuntimeException(e); } finally { try { stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } }
@Override public void readFields(DataInput input) throws IOException { super.readFields(input); schema = new KeyValueSchema(); schema.readFields(input); bitSet = ValueBitSet.newInstance(schema); position = input.readInt(); displayName = input.readUTF(); }
@Override public void readFields(DataInput input) throws IOException { super.readFields(input); schema = new KeyValueSchema(); schema.readFields(input); bitSet = ValueBitSet.newInstance(schema); position = input.readInt(); displayName = input.readUTF(); }
public static TupleProjector deserializeProjectorFromBytes(byte[] bytes) { ByteArrayInputStream stream = new ByteArrayInputStream(bytes); try { DataInputStream input = new DataInputStream(stream); KeyValueSchema schema = new KeyValueSchema(); schema.readFields(input); int count = WritableUtils.readVInt(input); Expression[] expressions = new Expression[count]; for (int i = 0; i < count; i++) { int ordinal = WritableUtils.readVInt(input); expressions[i] = ExpressionType.values()[ordinal].newInstance(); expressions[i].readFields(input); } return new TupleProjector(schema, expressions); } catch (IOException e) { throw new RuntimeException(e); } finally { try { stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } }
public static TupleProjector deserializeProjectorFromScan(Scan scan) { byte[] proj = scan.getAttribute(SCAN_PROJECTOR); if (proj == null) { return null; } ByteArrayInputStream stream = new ByteArrayInputStream(proj); try { DataInputStream input = new DataInputStream(stream); KeyValueSchema schema = new KeyValueSchema(); schema.readFields(input); int count = WritableUtils.readVInt(input); Expression[] expressions = new Expression[count]; for (int i = 0; i < count; i++) { int ordinal = WritableUtils.readVInt(input); expressions[i] = ExpressionType.values()[ordinal].newInstance(); expressions[i].readFields(input); } return new TupleProjector(schema, expressions); } catch (IOException e) { throw new RuntimeException(e); } finally { try { stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } }
try { DataInputStream input = new DataInputStream(stream); KeyValueSchema joinedSchema = new KeyValueSchema(); joinedSchema.readFields(input); int count = WritableUtils.readVInt(input); joinTypes[i] = JoinType.values()[type]; earlyEvaluation[i] = input.readBoolean(); schemas[i] = new KeyValueSchema(); schemas[i].readFields(input); fieldPositions[i] = WritableUtils.readVInt(input);
try { DataInputStream input = new DataInputStream(stream); KeyValueSchema joinedSchema = new KeyValueSchema(); joinedSchema.readFields(input); int count = WritableUtils.readVInt(input); joinTypes[i] = JoinType.values()[type]; earlyEvaluation[i] = input.readBoolean(); schemas[i] = new KeyValueSchema(); schemas[i].readFields(input); fieldPositions[i] = WritableUtils.readVInt(input);