use of com.hortonworks.streamline.streams.layout.component.impl.normalization.BulkNormalizationConfig in project streamline by hortonworks.
the class NormalizationBoltTest method createBulkNormalizationProcessor.
public static NormalizationProcessor createBulkNormalizationProcessor(String outputStreamId) throws NormalizationException, IOException {
Map<String, NormalizationConfig> inputStreamsWithConfig = new HashMap<>();
Schema inputSchema = Schema.of(Schema.Field.of("temp", Schema.Type.INTEGER), Schema.Field.of("foo", Schema.Type.STRING));
String bulkScriptText = getBulkScriptText();
BulkNormalizationConfig bulkNormalizationConfig = new BulkNormalizationConfig(inputSchema, bulkScriptText);
inputStreamsWithConfig.put(INPUT_STREAM_ID, bulkNormalizationConfig);
Stream declaredOutputStream = new Stream(outputStreamId, OUTPUT_SCHEMA_FIELDS);
NormalizationProcessor normalizationProcessor = new NormalizationProcessor(inputStreamsWithConfig, declaredOutputStream, NormalizationProcessor.Type.bulk);
normalizationProcessor.addOutputStream(declaredOutputStream);
return normalizationProcessor;
}
Aggregations