Examples of AvroSchema


Examples of com.fasterxml.jackson.dataformat.avro.AvroSchema

    public AvroSchemaGenerator() {
        super(new DefinedSchemas());
    }

    public AvroSchema getGeneratedSchema() {
        return new AvroSchema(getAvroSchema());
    }
View Full Code Here

Examples of com.fasterxml.jackson.dataformat.avro.AvroSchema

        // NOTE: null is fine here, as provider links itself after construction
        super(new DefinedSchemas(), null);
    }

    public AvroSchema getGeneratedSchema() {
        return new AvroSchema(getAvroSchema());
    }
View Full Code Here

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

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();

    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

Examples of org.kiji.schema.avro.AvroSchema

    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
Copyright © 2018 www.massapi.com. 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.