Package org.kiji.schema.avro

Examples of org.kiji.schema.avro.AvroSchema


    final long stringUID = schemaTable.getOrCreateSchemaId(STRING_SCHEMA);
    final long intUID = schemaTable.getOrCreateSchemaId(INT_SCHEMA);
    final String stringJSON = STRING_SCHEMA.toString();
    final String intJSON = INT_SCHEMA.toString();

    final AvroSchema stringUIDAS = AvroSchema.newBuilder().setUid(stringUID).build();
    final AvroSchema stringJSONAS = AvroSchema.newBuilder().setJson(stringJSON).build();
    final AvroSchema intUIDAS = AvroSchema.newBuilder().setUid(intUID).build();
    final AvroSchema intJSONAS = AvroSchema.newBuilder().setJson(intJSON).build();

    assertTrue(AvroUtils.avroSchemaEquals(schemaTable, stringUIDAS, stringUIDAS));
    assertTrue(AvroUtils.avroSchemaEquals(schemaTable, stringUIDAS, stringJSONAS));
    assertTrue(AvroUtils.avroSchemaEquals(schemaTable, stringJSONAS, stringUIDAS));
    assertTrue(AvroUtils.avroSchemaEquals(schemaTable, intUIDAS, intUIDAS));
View Full Code Here


    final long stringUID = schemaTable.getOrCreateSchemaId(STRING_SCHEMA);
    final long intUID = schemaTable.getOrCreateSchemaId(INT_SCHEMA);
    final String stringJSON = STRING_SCHEMA.toString();
    final String intJSON = INT_SCHEMA.toString();

    final AvroSchema stringUIDAS = AvroSchema.newBuilder().setUid(stringUID).build();
    final AvroSchema stringJSONAS = AvroSchema.newBuilder().setJson(stringJSON).build();
    final AvroSchema intUIDAS = AvroSchema.newBuilder().setUid(intUID).build();
    final AvroSchema intJSONAS = AvroSchema.newBuilder().setJson(intJSON).build();

    final List<AvroSchema> stringList = Lists.newArrayList(stringJSONAS, stringUIDAS);
    final List<AvroSchema> intList = Lists.newArrayList(intJSONAS, intUIDAS);
    final List<AvroSchema> bothList = Lists.newArrayList(stringJSONAS, intUIDAS);
View Full Code Here

    final List<AvroSchema> schemas =
        getMutableRegisteredSchemaList(columnName, schemaRegistrationType);
    final Iterator<AvroSchema> it = schemas.iterator();
    while (it.hasNext()) {
      final AvroSchema avroSchema = it.next();
      final Schema other = mSchemaResolver.apply(avroSchema);
      if (Objects.equal(schema, other)) {
        it.remove();
      }
    }
View Full Code Here

TOP

Related Classes of org.kiji.schema.avro.AvroSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.