...
If you wanted, you could add to the transform
method a user metric indicating the number of fields changed. The user metrics can be queried by using the CDAP Metrics HTTP RESTful APIMicroservices:
Code Block |
---|
public void transform(StructuredRecord input, Emitter<StructuredRecord> emitter) throws Exception { int fieldsChanged = 0; . . . builder.set(fieldName, record.get(fieldName). . . fieldsChanged += 1; . . . getContext().getMetrics().count("fieldsChanged", fieldsChanged); } |
...