@Test public void testOverridePartitionStrategy() { PartitionStrategy strat = new PartitionStrategy.Builder() .hash("keyPart1", "keyPart1", 10).build(); AvroKeySchema avroKeySchema = parser.parseKeySchema(entitySchema, strat); assertEquals(Type.INT, avroKeySchema.getAvroSchema().getField("keyPart1") .schema().getType()); assertEquals(1, Accessor.getDefault().getFieldPartitioners(avroKeySchema .getPartitionStrategy()) .size()); }
@Override public AvroKeySchema parseKeySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroKeySchema( descriptor.getSchema(), descriptor.getPartitionStrategy()); }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroKeySchema parseKeySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroKeySchema( descriptor.getSchema(), descriptor.getPartitionStrategy()); } }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroKeySchema parseKeySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroKeySchema( descriptor.getSchema(), descriptor.getPartitionStrategy()); }  }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroKeySchema parseKeySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroKeySchema( descriptor.getSchema(), descriptor.getPartitionStrategy()); }  @Override AvroKeySchema parseKeySchema(String rawSchema); @Override AvroKeySchema parseKeySchema(String rawSchema,
      PartitionStrategy partitionStrategy); @Override AvroEntitySchema parseEntitySchema(String rawSchema); @Override AvroEntitySchema parseEntitySchema(String rawSchema,
      ColumnMapping columnMapping); }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroKeySchema parseKeySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroKeySchema( descriptor.getSchema(), descriptor.getPartitionStrategy()); }  @Override AvroKeySchema parseKeySchema(String rawSchema); @Override AvroKeySchema parseKeySchema(String rawSchema,
      PartitionStrategy partitionStrategy); @Override AvroEntitySchema parseEntitySchema(String rawSchema); @Override AvroEntitySchema parseEntitySchema(String rawSchema,
      ColumnMapping columnMapping);  }