Source:
<code>public void configurePipeline(PipelineConfigurer pipelineConfigurer) throws IllegalArgumentException { super.configurePipeline(pipelineConfigurer); parseConfiguration(config.decompressor); try { Schema outputSchema = Schema.parseJson(config.schema); List<Field> outFields = outputSchema.getFields(); for (Field field : outFields) { outSchemaMap.put(field.getName(), field.getSchema().getType()); } pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema); } catch (IOException e) { throw new IllegalArgumentException("Format of schema specified is invalid. Please check the format. " + e.getMessage()); } Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema(); if (inputSchema != null) { for (Schema.Field field : inputSchema.getFields()) { if (outSchemaMap.containsKey(field.getName()) && deCompMap.containsKey(field.getName()) && deCompMap.get(field.getName()) != DecompressorType.NONE && !Schema.Type.BYTES.equals(field.getSchema().getType())) { throw new IllegalArgumentException( <START> String.format("Input field %s should be of type BYTES to decompress. It is currently of type %s", <END> field.getName(), field.getSchema().getType().toString())); } } } for (Map.Entry<String, DecompressorType> entry : deCompMap.entrySet()) { if (!outSchemaMap.containsKey(entry.getKey())) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' specified to be decompresed is not " + "present in the output schema. Please add field '" + entry.getKey() + "'" + "to output schema or remove it from decompress"); } if (outSchemaMap.get(entry.getKey()) != Schema.Type.BYTES && outSchemaMap.get(entry.getKey()) != Schema.Type.STRING) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' should be of type BYTES or STRING in " + "output schema."); } } }</code><technical_language>error message for consistency: "Field %s of type bytes. is currently of type %s"</technical_language>

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) throws IllegalArgumentException { super.configurePipeline(pipelineConfigurer); parseConfiguration(config.decompressor); try { Schema outputSchema = Schema.parseJson(config.schema); List<Field> outFields = outputSchema.getFields(); for (Field field : outFields) { outSchemaMap.put(field.getName(), field.getSchema().getType()); } pipelineConfigurer.getStageConfigurer().setOutputSchema(outputSchema); } catch (IOException e) { throw new IllegalArgumentException("Format of schema specified is invalid. Please check the format. " + e.getMessage()); } Schema inputSchema = pipelineConfigurer.getStageConfigurer().getInputSchema(); if (inputSchema != null) { for (Schema.Field field : inputSchema.getFields()) { if (outSchemaMap.containsKey(field.getName()) && deCompMap.containsKey(field.getName()) && deCompMap.get(field.getName()) != DecompressorType.NONE && !Schema.Type.BYTES.equals(field.getSchema().getType())) { throw new IllegalArgumentException( String.format("Input field %s should be of type bytes or string. It is currently of type %s", field.getName(), field.getSchema().getType().toString())); } } } for (Map.Entry<String, DecompressorType> entry : deCompMap.entrySet()) { if (!outSchemaMap.containsKey(entry.getKey())) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' specified to be decompresed is not " + "present in the output schema. Please add field '" + entry.getKey() + "'" + "to output schema or remove it from decompress"); } if (outSchemaMap.get(entry.getKey()) != Schema.Type.BYTES && outSchemaMap.get(entry.getKey()) != Schema.Type.STRING) { throw new IllegalArgumentException("Field '" + entry.getKey() + "' should be of type BYTES or STRING in " + "output schema."); } } }