Github user bhupeshchawda commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/227#discussion_r58703820
--- Diff:
contrib/src/main/java/com/datatorrent/contrib/cassandra/CassandraPOJOOutputOperator.java
---
@@ -162,6 +163,30 @@ public void activate(Context.OperatorContext context)
}
getters.add(getter);
}
+ super.activate(context);
+ }
+
+ private void populateFieldInfosFromPojo(ColumnDefinitions rsMetaData)
+ {
+ fieldInfos = Lists.newArrayList();
+ Field[] fields = pojoClass.getDeclaredFields();
+ for (int i = 0; i < rsMetaData.size(); i++) {
+ String columnName = rsMetaData.getName(i);
+ String pojoField = getMatchingField(fields, columnName);
+ if (pojoField != null && pojoField.length() != 0) {
--- End diff --
what happens if pojoField is null? Please check if this will cause problems
when no matching field is found.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---