use of com.apple.foundationdb.record.RecordMetaDataBuilder in project fdb-record-layer by FoundationDB.
the class QueryHashTest method setupTextStore.
protected void setupTextStore(FDBRecordContext context, RecordMetaDataHook hook) {
RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecordsTextProto.getDescriptor());
metaDataBuilder.getRecordType(TextIndexTestUtils.COMPLEX_DOC).setPrimaryKey(concatenateFields("group", "doc_id"));
hook.apply(metaDataBuilder);
recordStore = getStoreBuilder(context, metaDataBuilder.getRecordMetaData()).setSerializer(TextIndexTestUtils.COMPRESSING_SERIALIZER).uncheckedOpen();
setupPlanner(null);
}
use of com.apple.foundationdb.record.RecordMetaDataBuilder in project fdb-record-layer by FoundationDB.
the class QueryPlanHashTest method setupTextStore.
protected void setupTextStore(FDBRecordContext context, RecordMetaDataHook hook) {
RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecordsTextProto.getDescriptor());
metaDataBuilder.getRecordType(TextIndexTestUtils.COMPLEX_DOC).setPrimaryKey(concatenateFields("group", "doc_id"));
hook.apply(metaDataBuilder);
recordStore = getStoreBuilder(context, metaDataBuilder.getRecordMetaData()).setSerializer(TextIndexTestUtils.COMPRESSING_SERIALIZER).uncheckedOpen();
setupPlanner(null);
}
use of com.apple.foundationdb.record.RecordMetaDataBuilder in project fdb-record-layer by FoundationDB.
the class MetaDataEvolutionValidatorTestV3 method proto2ToProto3.
/**
* Validate that if the syntax is changed, then the meta-data evolution is invalidated.
*/
@Test
public void proto2ToProto3() {
assertInvalid("message descriptor proto syntax changed", TestRecords3Proto.UnionDescriptor.getDescriptor(), TestRecords3ProtoV3.UnionDescriptor.getDescriptor());
assertInvalid("message descriptor proto syntax changed", TestRecords3ProtoV3.UnionDescriptor.getDescriptor(), TestRecords3Proto.UnionDescriptor.getDescriptor());
RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecords3Proto.getDescriptor());
metaDataBuilder.getRecordType("MyHierarchicalRecord").setPrimaryKey(Key.Expressions.concatenateFields("parent_path", "child_name"));
RecordMetaData metaData1 = metaDataBuilder.getRecordMetaData();
RecordMetaData metaData2 = replaceRecordsDescriptor(metaData1, TestRecords3ProtoV3.getDescriptor());
assertInvalid("message descriptor proto syntax changed", metaData1, metaData2);
}
use of com.apple.foundationdb.record.RecordMetaDataBuilder in project fdb-record-layer by FoundationDB.
the class FDBRecordStoreByteLimitTest method openTextRecordStore.
private void openTextRecordStore(FDBRecordContext context, RecordMetaDataHook hook) {
RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecordsTextProto.getDescriptor());
metaDataBuilder.getRecordType(COMPLEX_DOC).setPrimaryKey(concatenateFields("group", "doc_id"));
hook.apply(metaDataBuilder);
recordStore = getStoreBuilder(context, metaDataBuilder.getRecordMetaData()).setSerializer(COMPRESSING_SERIALIZER).setPipelineSizer(pipelineOperation -> 1).uncheckedOpen();
setupPlanner(null);
}
use of com.apple.foundationdb.record.RecordMetaDataBuilder in project fdb-record-layer by FoundationDB.
the class LuceneIndexTest method openRecordStore.
protected void openRecordStore(FDBRecordContext context, FDBRecordStoreTestBase.RecordMetaDataHook hook) {
RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecordsTextProto.getDescriptor());
metaDataBuilder.getRecordType(COMPLEX_DOC).setPrimaryKey(concatenateFields("group", "doc_id"));
hook.apply(metaDataBuilder);
recordStore = getStoreBuilder(context, metaDataBuilder.getRecordMetaData()).setSerializer(TextIndexTestUtils.COMPRESSING_SERIALIZER).uncheckedOpen();
setupPlanner(null);
}
Aggregations