Github user ilooner commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/100#discussion_r45027363
--- 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 --
I see, Instead of a setTags method could you create a new constructor that
takes the tags, and then do this work in initialize?
---
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.
---