Github user brightchen commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/100#discussion_r45023863
--- Diff:
library/src/main/java/com/datatorrent/lib/appdata/schemas/SnapshotSchema.java
---
@@ -246,6 +247,26 @@ private void initialize() throws JSONException
schemaJSON = this.schema.toString();
}
+ public void setTags(Set<String> tags)
+ {
+ if (tags == null || tags.isEmpty())
+ return;
+
+ JSONArray tagArray = new JSONArray();
+
+ try {
+ int index = 0;
+ for (String tag : tags)
+ tagArray.put(index++, tag);
+
+ schema.put(FIELD_SCHEMA_TAGS, tagArray);
+ } catch (JSONException e) {
+ Preconditions.checkState(false, e.getMessage());
--- End diff --
The method initialize() was called by the constructor. and the tags haven't
set at that time.
---
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.
---