zxcware commented on a change in pull request #2622: Added random key generator 
for reporters. Added reporters fo…
URL: https://github.com/apache/incubator-gobblin/pull/2622#discussion_r280285885
 
 

 ##########
 File path: gobblin-utility/src/main/java/org/apache/gobblin/util/AvroUtils.java
 ##########
 @@ -875,11 +876,26 @@ public static Schema decorateRecordSchema(Schema 
inputSchema, @Nonnull List<Fiel
   public static GenericRecord decorateRecord(GenericRecord inputRecord, 
@Nonnull Map<String, Object> fieldMap,
           Schema outputSchema) {
     GenericRecord outputRecord = new GenericData.Record(outputSchema);
-    inputRecord.getSchema().getFields().forEach(
-            f -> outputRecord.put(f.name(), inputRecord.get(f.name()))
-    );
+    inputRecord.getSchema().getFields().forEach(f -> 
outputRecord.put(f.name(), inputRecord.get(f.name())));
     fieldMap.forEach((key, value) -> outputRecord.put(key, value));
     return outputRecord;
   }
 
+  public static GenericRecord overrideNameAndNamespace(GenericRecord event, 
String nameOverride, Optional<Map<String, String>> namespaceOverride) {
 
 Review comment:
   Need unit test

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to