code: public static Schema keySchema(Schema schema, PartitionStrategy strategy) {
      List<Schema.Field> partitionFields = new ArrayList<Schema.Field>();
      for (FieldPartitioner<?, ?> fp : Accessor.getDefault().getFieldPartitioners(strategy)) {
        partitionFields.add(partitionField(fp, schema));
      }
      Schema keySchema = Schema.createRecord(
          schema.getName() + "KeySchema", null, null, false);
      keySchema.setFields(partitionFields);
      return keySchema;
    }
docs: Creates a {@link Schema} for the keys of a {@link PartitionStrategy} based
  on an entity {@code Schema}.
  <p>
  The partition strategy and schema are assumed to be compatible and this
  will result in NullPointerExceptions if they are not.
  
  @param schema an entity schema {@code Schema}
  @param strategy a {@code PartitionStrategy}
  @return a {@code Schema} for the storage keys of the partition strategy