[07/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/terminate.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/terminate.json b/streams-schemas/src/main/jsonschema/verbs/terminate.json new file mode 100644 index 000..280eb31 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/terminate.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Terminate", +"description": "Indicates that the actor has terminated the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "terminate" +}, +"title": { +"type": "string", +"default": "{actor.displayName} terminated {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/tie.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/tie.json b/streams-schemas/src/main/jsonschema/verbs/tie.json new file mode 100644 index 000..7530ed2 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/tie.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tie", +"description": "Indicates that the actor has neither won or lost the object. This verb is generally only applicable when the object represents some form of competition, such as a game.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tie" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tied at {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/unfavorite.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/unfavorite.json b/streams-schemas/src/main/jsonschema/verbs/unfavorite.json new file mode 100644 index 000..bfa9c20 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/unfavorite.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnFavorite", +"description": "Indicates that the actor has removed the object from the collection of favorited items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unfavorite" +}, +"title": { +"type": "string", +"default": "{actor.displayName} removed {object.displayName} as a favorite" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/unlike.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/unlike.json b/streams-schemas/src/main/jsonschema/verbs/unlike.json new file mode 100644 index 000..4dc75f6 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/unlike.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnLike", +"description": "Indicates that the actor has removed the object from the collection of liked items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unlike" +}, +"title": { +"type": "string", +"default": "{actor.displayName} no longer likes {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/unsatisfy.json ---
[13/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/install.json -- diff --git a/streams-schemas/src/test/resources/activities/install.json b/streams-schemas/src/test/resources/activities/install.json new file mode 100644 index 000..1ecdecd --- /dev/null +++ b/streams-schemas/src/test/resources/activities/install.json @@ -0,0 +1,18 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "install", + "object": { +"objectType": "application", +"displayName": "Approved Software Scanning Tool", +"location": { + "displayName": "All computers in Building A" +} + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/interact.json -- diff --git a/streams-schemas/src/test/resources/activities/interact.json b/streams-schemas/src/test/resources/activities/interact.json new file mode 100644 index 000..f427513 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/interact.json @@ -0,0 +1,16 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Bob" + }, + "verb": "interact", + "object": { +"objectType": "person", +"displayName": "Laura" + }, + "title": "Bob called Laura." +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/invite.json -- diff --git a/streams-schemas/src/test/resources/activities/invite.json b/streams-schemas/src/test/resources/activities/invite.json new file mode 100644 index 000..7c84b78 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/invite.json @@ -0,0 +1,19 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "invite", + "object": { +"objectType": "person", +"displayName": "Mark" + }, + "target": { +"objectType": "event", +"displayName": "Job Interview" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/join.json -- diff --git a/streams-schemas/src/test/resources/activities/join.json b/streams-schemas/src/test/resources/activities/join.json new file mode 100644 index 000..7996a9b --- /dev/null +++ b/streams-schemas/src/test/resources/activities/join.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "join", + "object": { +"objectType": "organization", +"displayName": "Acme, Co" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/leave.json -- diff --git a/streams-schemas/src/test/resources/activities/leave.json b/streams-schemas/src/test/resources/activities/leave.json new file mode 100644 index 000..08516c5 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/leave.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "leave", + "object": { +"objectType": "organization", +"displayName": "Other, Co" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/like.json -- diff --git a/streams-schemas/src/test/resources/activities/like.json b/streams-schemas/src/test/resources/activities/like.json new file mode 100644 index 000..853676f --- /dev/null +++ b/streams-schemas/src/test/resources/activities/like.json @@ -0,0 +1,22 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "like", + "ob
[24/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json new file mode 100644 index 000..9995099 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/leave.json#";, +"type": "object", +"title": "Leave", +"description": "Indicates that the actor has left the object. For instance, a Person leaving a Group or checking-out of a Place.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "leave" +}, +"title": { +"type": "string", +"default": "{actor.displayName} left {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json new file mode 100644 index 000..d583305 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/like.json#";, +"type": "object", +"title": "Like", +"description": "Indicates that the actor marked the object as an item of special interest.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "like" +}, +"title": { +"type": "string", +"default": "{actor.displayName} likes {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json new file mode 100644 index 000..9982ac6 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/listen.json#";, +"type": "object", +"title": "Listen", +"description": "Indicates that the actor has listened to the object. This is typically only applicable for objects representing audio content, such as music, an audio-book, or a radio broadcast.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "listen" +}, +"title": { +"type": "string", +"default": "{actor.displayName} listened to {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json new file mode 100644 index 000..1d959a4 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.open
[04/32] incubator-streams git commit: test pom for streams-plugin-pojo
test pom for streams-plugin-pojo Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/eea09756 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/eea09756 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/eea09756 Branch: refs/feature/STREAMS-389,398 Commit: eea09756b2388acca625e2e752be127874a52599 Parents: 6501b27 Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:27 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Mar 28 08:32:27 2016 -0500 -- .../src/test/resources/streams-plugin-pojo/pom.xml| 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/eea09756/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml index b1de7b8..fbb2864 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml @@ -4,10 +4,10 @@ 4.0.0 org.apache.streams.plugins -streams-plugin-hive-test +streams-plugin-pojo-test 0.3-incubating-SNAPSHOT jar -Test StreamsPojoHiveMojo +Test StreamsPojoMojo @@ -21,18 +21,18 @@ org.apache.streams.plugins -streams-plugin-hive +streams-plugin-pojo 0.3-incubating-SNAPSHOT org.apache.streams.pojo.json -target/test-classes/streams-hive-plugin/ +target/test-classes/streams-pojo-plugin/ -hive +pojo
[23/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java -- diff --git a/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java b/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java new file mode 100644 index 000..d4b2c3f --- /dev/null +++ b/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java @@ -0,0 +1,116 @@ +package org.apache.streams.util.schema; + +import java.io.File; +import java.io.FileFilter; +import java.net.URL; +import java.util.Iterator; + +/** + * GenerationConfig represents the common fields and field accessors for + * streams modules that transform schemas into generated-sources or generated-resources + */ +public interface GenerationConfig { + +/** + * Gets the 'source' configuration option. + * + * @return The source file(s) or directory(ies) from which JSON Schema will + * be read. + */ +Iterator getSource(); + +/** + * Gets the 'targetDirectory' configuration option. + * + * @return The target directory into which generated types will be written + * (may or may not exist before types are written) + */ +File getTargetDirectory(); + +/** + * Gets the 'outputEncoding' configuration option. + * + * @return The character encoding that should be used when writing output files. + */ +String getOutputEncoding(); + +/** + * Gets the file filter used to isolate the schema mapping files in the + * source directories. + * + * @return the file filter use when scanning for schema files. + */ +FileFilter getFileFilter(); + +/** + * Gets the 'includeAdditionalProperties' configuration option. + * + * @return Whether to allow 'additional properties' support in objects. + * Setting this to false will disable additional properties support, + * regardless of the input schema(s). + */ +//boolean isIncludeAdditionalProperties(); + +/** + * Gets the 'targetVersion' configuration option. + * + * @return The target version for generated source files. + */ +//String getTargetVersion(); + +///** +// * Gets the `includeDynamicAccessors` configuraiton option. +// * +// * @return Whether to include dynamic getters, setters, and builders +// * or to omit these methods. +// */ +//boolean isIncludeDynamicAccessors(); + +///** +// * Gets the `dateTimeType` configuration option. +// * +// * Example values: +// * +// * org.joda.time.LocalDateTime (Joda) +// * java.time.LocalDateTime (JSR310) +// * null (default behavior) +// * +// * +// * @return The java type to use instead of {@link java.util.Date} +// * when adding date type fields to generate Java types. +// */ +//String getDateTimeType(); +// +///** +// * Gets the `dateType` configuration option. +// * +// * Example values: +// * +// * org.joda.time.LocalDate (Joda) +// * java.time.LocalDate (JSR310) +// * null (default behavior) +// * +// * +// * @return The java type to use instead of string +// * when adding string type fields with a format of date (not +// * date-time) to generated Java types. +// */ +//String getDateType(); +// +///** +// * Gets the `timeType` configuration option. +// * +// * Example values: +// * +// * org.joda.time.LocalTime (Joda) +// * java.time.LocalTime (JSR310) +// * null (default behavior) +// * +// * +// * @return The java type to use instead of string +// * when adding string type fields with a format of time (not +// * date-time) to generated Java types. +// */ +//String getTimeType(); + +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java -- diff --git a/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java b/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java new file mode 100644 index 000..fc0a3f2 --- /dev/null +++ b/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java @@ -0,0 +1,57 @@ +package org.apache.streams.util.schema; + +import com.fasterxml.jackson.databind.JsonNode; + +import java.net.URI; + +/** + * A JSON Schema document. + */ +public class Schema { + +private final URI id; +private final URI uri; +private final JsonNode content; +
[02/32] incubator-streams git commit: create streams-plugin-pojo
create streams-plugin-pojo Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/1c78ecc7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/1c78ecc7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/1c78ecc7 Branch: refs/feature/STREAMS-389,398 Commit: 1c78ecc7fe7bf72dad6cd204cffc4fae1ac4b41b Parents: f0a3518 Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:00 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Mar 28 08:32:00 2016 -0500 -- pom.xml | 5 + streams-plugins/pom.xml | 2 +- streams-plugins/streams-plugin-hive/pom.xml | 5 +- .../plugins/StreamsHiveResourceGenerator.java | 219 +++ .../StreamsHiveResourceGeneratorMojo.java | 68 + .../apache/streams/plugins/StreamsPojoHive.java | 242 - .../streams/plugins/StreamsPojoHiveMojo.java| 71 - .../test/StreamsHiveResourceGeneratorTest.java | 55 .../plugins/test/StreamsPojoHiveTest.java | 55 streams-plugins/streams-plugin-pojo/pom.xml | 239 .../plugins/StreamsPojoGenerationConfig.java| 198 ++ .../plugins/StreamsPojoSourceGeneratorMojo.java | 272 +++ .../test/StreamsPojoSourceGeneratorTest.java| 54 .../test/resources/streams-plugin-pojo/pom.xml | 42 +++ 14 files changed, 1156 insertions(+), 371 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/pom.xml -- diff --git a/pom.xml b/pom.xml index 74e5cf4..b284ae2 100644 --- a/pom.xml +++ b/pom.xml @@ -175,6 +175,7 @@ streams-osgi-components streams-pojo streams-pojo-extensions +streams-plugins streams-runtimes streams-testing streams-util @@ -183,6 +184,10 @@ pom + +0.4.22 + + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml index 2306aab..390c8a0 100644 --- a/streams-plugins/pom.xml +++ b/streams-plugins/pom.xml @@ -36,7 +36,7 @@ -streams-plugin-scala +streams-plugin-pojo http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml index cbc055b..22d75ce 100644 --- a/streams-plugins/streams-plugin-hive/pom.xml +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -213,19 +213,20 @@ 2.4 -streams-pojo-resource-dependencies +resource-dependencies process-test-resources unpack-dependencies streams-pojo - org/apache/streams/pojo/json/** +**/*.json ${project.build.directory}/test-classes + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java new file mode 100644 index 000..4edacf0 --- /dev/null +++ b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java @@ -0,0 +1,219 @@ +package org.apache.streams.plugins; + +import com.google.common.base.Strings; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import org.reflections.ReflectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.Serializable; +import java.lang.reflect.Field; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set;
[20/32] incubator-streams git commit: WIP for apachecon
WIP for apachecon Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/95a02d71 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/95a02d71 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/95a02d71 Branch: refs/feature/STREAMS-389,398 Commit: 95a02d71c8b28ffda7ef37a151efd896d65b1223 Parents: 02dc8ef Author: Steve Blackmon @steveblackmon Authored: Fri May 6 19:45:12 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Fri May 6 19:45:12 2016 -0500 -- pom.xml | 10 - streams-config/pom.xml | 8 +- .../spring/streams-cassandra-context.xml| 25 ++ .../src/main/jsonschema/com/twitter/tweet.json | 6 +- streams-plugins/pom.xml | 4 + .../streams-plugin-cassandra/pom.xml| 244 .../StreamsCassandraGenerationConfig.java | 81 .../StreamsCassandraResourceGenerator.java | 376 +++ .../StreamsCassandraResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ ...treamsCassandraResourceGeneratorCLITest.java | 50 +++ ...reamsCassandraResourceGeneratorMojoTest.java | 75 .../StreamsCassandraResourceGeneratorTest.java | 124 ++ .../resources/streams-plugin-cassandra/pom.xml | 75 .../streams-plugin-elasticsearch/pom.xml| 245 .../StreamsElasticsearchGenerationConfig.java | 81 .../StreamsElasticsearchResourceGenerator.java | 373 ++ ...reamsElasticsearchResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ ...sElasticsearchResourceGeneratorMojoTest.java | 50 +++ ...reamsElasticsearchResourceGeneratorTest.java | 139 +++ .../streams-plugin-elasticsearch/pom.xml| 75 streams-plugins/streams-plugin-hbase/pom.xml| 244 .../hbase/StreamsHbaseGenerationConfig.java | 90 + .../hbase/StreamsHbaseResourceGenerator.java| 204 ++ .../StreamsHbaseResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ .../StreamsHbaseResourceGeneratorCLITest.java | 41 ++ .../StreamsHbaseResourceGeneratorMojoTest.java | 65 .../test/StreamsHbaseResourceGeneratorTest.java | 125 ++ .../test/resources/streams-plugin-hbase/pom.xml | 76 streams-plugins/streams-plugin-hive/pom.xml | 6 + .../hive/StreamsHiveResourceGenerator.java | 7 +- .../hive/StreamsHiveResourceGeneratorMojo.java | 33 +- .../src/site/markdown/index.md | 22 ++ .../StreamsHiveResourceGeneratorCLITest.java| 41 ++ .../StreamsHiveResourceGeneratorMojoTest.java | 64 .../test/StreamsHiveResourceGeneratorTest.java | 21 +- .../test/resources/streams-plugin-hive/pom.xml | 41 +- streams-plugins/streams-plugin-pig/pom.xml | 244 .../plugins/pig/StreamsPigGenerationConfig.java | 84 + .../pig/StreamsPigResourceGenerator.java| 317 .../pig/StreamsPigResourceGeneratorMojo.java| 93 + .../src/site/markdown/index.md | 22 ++ .../StreamsPigResourceGeneratorCLITest.java | 39 ++ .../StreamsPigResourceGeneratorMojoTest.java| 64 .../test/StreamsPigResourceGeneratorTest.java | 122 ++ .../src/test/resources/expected/media_link.pig | 1 + .../resources/expected/objectTypes/file.pig | 1 + .../expected/objectTypes/photo-album.pig| 1 + .../test/resources/streams-plugin-pig/pom.xml | 75 streams-plugins/streams-plugin-pojo/pom.xml | 7 - .../plugins/StreamsPojoSourceGenerator.java | 16 +- .../plugins/StreamsPojoSourceGeneratorMojo.java | 43 +-- .../src/site/markdown/index.md | 22 ++ .../test/StreamsPojoSourceGeneratorCLITest.java | 43 +++ .../StreamsPojoSourceGeneratorMojoTest.java | 68 +--- .../test/StreamsPojoSourceGeneratorTest.java| 28 +- .../test/resources/streams-plugin-pojo/pom.xml | 1 + .../org/apache/streams/schema/FieldUtil.java| 30 ++ .../org/apache/streams/schema/FileUtil.java | 13 +- .../apache/streams/schema/GenerationConfig.java | 4 +- .../org/apache/streams/schema/SchemaUtil.java | 4 +- .../src/main/jsonschema/activity.json | 10 +- .../src/main/jsonschema/collection.json | 2 +- .../src/main/jsonschema/media_link.json | 2 +- streams-schemas/src/main/jsonschema/object.json | 6 +- .../src/main/jsonschema/objectTypes/alert.json | 2 +- .../jsonschema/objectTypes/application.json | 2 +- .../main/jsonschema/objectTypes/article.json| 2 +- .../src/main/jsonschema/objectTypes/audio.json | 2 +- .../src/main/jsonschema/objectTypes/badge.json | 2 +- .../src/ma
[19/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-elasticsearch/pom.xml -- diff --git a/streams-plugins/streams-plugin-elasticsearch/pom.xml b/streams-plugins/streams-plugin-elasticsearch/pom.xml new file mode 100644 index 000..4f0ed4a --- /dev/null +++ b/streams-plugins/streams-plugin-elasticsearch/pom.xml @@ -0,0 +1,245 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-elasticsearch +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT +.. + + + +2.3.0 +5.4.0 + + + + +org.apache.streams +streams-config +${project.version} + + +commons-logging +commons-logging + + + + +org.apache.streams +streams-core +${project.version} + + +org.apache.streams +streams-schemas +${project.version} + + +com.google.guava +guava + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.apache.maven.shared +maven-verifier +1.6 +test + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +commons-logging +commons-logging + + + + +org.apache.maven.plugin-tools +maven-plugin-tools-api +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-annotations +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-tools-generators +3.3 + + +org.apache.maven.plugin-testing +maven-plugin-testing-harness +3.3.0 +test + + +junit +junit +test + + +commons-lang +commons-lang +2.6 + + +joda-time +joda-time +2.2 + + +org.joda +joda-convert +1.8.1 + + + + +src/main/java +src/test/java + + +src/main/resources + + + + +src/test/resources + + + + +maven-plugin-plugin +3.4 + + true + + + +mojo-descriptor +process-classes + +descriptor + + + + + +org.reflections +reflections-maven + + + +reflections + +process-classes + + + + +org.apache.maven.plugins +maven-dependency-plugin +2.4 + + +resource-dependencies +process-test-resources +
[15/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/note.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/note.json b/streams-schemas/src/site/resources/objectTypes/note.json deleted file mode 100644 index 09de97c..000 --- a/streams-schemas/src/site/resources/objectTypes/note.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "note", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "note" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/offer.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/offer.json b/streams-schemas/src/site/resources/objectTypes/offer.json deleted file mode 100644 index 38db718..000 --- a/streams-schemas/src/site/resources/objectTypes/offer.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "offer", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "offer" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/organization.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/organization.json b/streams-schemas/src/site/resources/objectTypes/organization.json deleted file mode 100644 index a3fd5a2..000 --- a/streams-schemas/src/site/resources/objectTypes/organization.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "organization", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "organization" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/page.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/page.json b/streams-schemas/src/site/resources/objectTypes/page.json deleted file mode 100644 index 4f76aa2..000 --- a/streams-schemas/src/site/resources/objectTypes/page.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "page", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "page" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/permission.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/permission.json b/streams-schemas/src/site/resources/objectTypes/permission.json deleted file mode 100644 index 32b395c..000 --- a/streams-schemas/src/site/resources/objectTypes/permission.json +++ /dev/null @@ -1,36 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "permission", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "permission" -}, -"scope": { -"type": "object", -"extends": { - "$ref": "../object.json" -} -}, -"actions":
[22/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/request.json -- diff --git a/streams-util/src/test/resources/activities/request.json b/streams-util/src/test/resources/activities/request.json new file mode 100644 index 000..3e7c285 --- /dev/null +++ b/streams-util/src/test/resources/activities/request.json @@ -0,0 +1,23 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "request", + "object": { +"objectType": "task", +"actor": { + "objectType": "person", + "displayName": "Mark" +}, +"verb": "join", +"object": { + "objectType": "event", + "displayName": "The Big Meeting" +} + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/resolve.json -- diff --git a/streams-util/src/test/resources/activities/resolve.json b/streams-util/src/test/resources/activities/resolve.json new file mode 100644 index 000..14998cf --- /dev/null +++ b/streams-util/src/test/resources/activities/resolve.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "resolve", + "object": { +"objectType": "issue", +"displayName": "Issue #126" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/retract.json -- diff --git a/streams-util/src/test/resources/activities/retract.json b/streams-util/src/test/resources/activities/retract.json new file mode 100644 index 000..9229868 --- /dev/null +++ b/streams-util/src/test/resources/activities/retract.json @@ -0,0 +1,26 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "retract", + "object": { +"actor": { + "objectType": "person", + "displayName": "Mark" +}, +"verb": "return", +"object": { + "objectType": "book", + "displayName": "Cloud Atlas" +}, +"target": { + "objectType": "person", + "displayName": "Laura" +} + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/return.json -- diff --git a/streams-util/src/test/resources/activities/return.json b/streams-util/src/test/resources/activities/return.json new file mode 100644 index 000..d6b8861 --- /dev/null +++ b/streams-util/src/test/resources/activities/return.json @@ -0,0 +1,19 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "return", + "object": { +"objectType": "book", +"displayName": "Cloud Atlas" + }, + "target": { +"objectType": "person", +"displayName": "Laura" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/rsvp-maybe.json -- diff --git a/streams-util/src/test/resources/activities/rsvp-maybe.json b/streams-util/src/test/resources/activities/rsvp-maybe.json new file mode 100644 index 000..b1ec1b5 --- /dev/null +++ b/streams-util/src/test/resources/activities/rsvp-maybe.json @@ -0,0 +1,16 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "rsvp-maybe", + "object": { +"objectType": "event", +"displayName": "The Big Meeting" + }, + "title": "Laura might attend The Big Meeting" +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/rsvp-no.json -- diff --git a/streams-util/src/test/resources/activities/rsvp-no.json b/streams-util/src/test/resources/activities/rsvp-no.json new file mode 100644 index 000..532b096 --- /dev/null +++ b/streams-util/src/test/resources/activities/rsvp-no.json @@ -0
[17/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java b/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java index 667661f..8d904af 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java +++ b/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java @@ -1,14 +1,19 @@ package org.apache.streams.plugins.test; +import com.google.common.base.Predicate; import com.google.common.collect.Lists; +import com.google.common.io.Files; import org.apache.streams.plugins.StreamsPojoGenerationConfig; import org.apache.streams.plugins.StreamsPojoSourceGenerator; +import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; import java.io.File; import java.io.FileFilter; +import java.util.Collection; import java.util.List; /** @@ -18,6 +23,15 @@ public class StreamsPojoSourceGeneratorTest { private final static Logger LOGGER = LoggerFactory.getLogger(StreamsPojoSourceGeneratorTest.class); +public static final Predicate javaFilter = new Predicate() { +@Override +public boolean apply(@Nullable File file) { +if( file.getName().endsWith(".java") ) +return true; +else return false; +} +}; + /** * Tests that all example activities can be loaded into Activity beans * @@ -54,18 +68,16 @@ public class StreamsPojoSourceGeneratorTest { } File testOutput = new File( "target/generated-sources/test"); -FileFilter javaFilter = new FileFilter() { -@Override -public boolean accept(File pathname) { -if( pathname.getName().endsWith(".java") ) -return true; -return false; -} -}; assert( testOutput != null ); assert( testOutput.exists() == true ); assert( testOutput.isDirectory() == true ); + +Iterable outputIterator = Files.fileTreeTraverser().breadthFirstTraversal(testOutput) +.filter(javaFilter); +Collection outputCollection = Lists.newArrayList(outputIterator); +assert( outputCollection.size() > 133 ); + //assert( testOutput.listFiles(javaFilter).length == 11 ); //assert( new File(testOutput + "/traits").exists() == true ); //assert( new File(testOutput + "/traits").isDirectory() == true ); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml index 359179e..21fd50e 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml @@ -104,6 +104,7 @@ org.codehaus.mojo build-helper-maven-plugin +1.8 add-source http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java -- diff --git a/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java b/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java index 5f83767..4173e50 100644 --- a/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java +++ b/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java @@ -1,11 +1,20 @@ package org.apache.streams.schema; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * Created by steve on 5/1/16. */ public class FieldUtil { + public static FieldType determineFieldType(ObjectNode fieldNode) { String typeSchemaField = "type"; if( !fieldNode.has(typeSchemaField)) @@ -26,4 +35,25 @@ public class FieldUtil { } else return null; }
[09/32] incubator-streams git commit: STREAMS-398 - streams-schemas
STREAMS-398 - streams-schemas moves jsonschemas to a seperate module this averts dependency graph cycle that would occur once streams-plugin-pojo is a dependency of streams-pojo and streams-scala Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/02b5adda Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/02b5adda Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/02b5adda Branch: refs/feature/STREAMS-389,398 Commit: 02b5adda7694698e732980c4b2702a2b67ff5548 Parents: eea0975 Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 11:41:59 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Thu Apr 21 11:41:59 2016 -0500 -- streams-schemas/pom.xml | 71 .../src/main/jsonschema/activity.json | 108 +++ .../src/main/jsonschema/collection.json | 47 .../src/main/jsonschema/media_link.json | 34 ++ streams-schemas/src/main/jsonschema/object.json | 98 + .../src/main/jsonschema/objectTypes/alert.json | 19 .../jsonschema/objectTypes/application.json | 19 .../main/jsonschema/objectTypes/article.json| 19 .../src/main/jsonschema/objectTypes/audio.json | 19 .../src/main/jsonschema/objectTypes/badge.json | 19 .../src/main/jsonschema/objectTypes/binary.json | 19 .../main/jsonschema/objectTypes/bookmark.json | 19 .../main/jsonschema/objectTypes/comment.json| 19 .../src/main/jsonschema/objectTypes/device.json | 19 .../src/main/jsonschema/objectTypes/event.json | 51 + .../src/main/jsonschema/objectTypes/file.json | 25 + .../src/main/jsonschema/objectTypes/folder.json | 19 .../src/main/jsonschema/objectTypes/game.json | 19 .../src/main/jsonschema/objectTypes/group.json | 19 .../src/main/jsonschema/objectTypes/image.json | 22 .../src/main/jsonschema/objectTypes/issue.json | 25 + .../src/main/jsonschema/objectTypes/job.json| 19 .../src/main/jsonschema/objectTypes/list.json | 28 + .../src/main/jsonschema/objectTypes/note.json | 19 .../src/main/jsonschema/objectTypes/offer.json | 19 .../jsonschema/objectTypes/organization.json| 19 .../src/main/jsonschema/objectTypes/page.json | 19 .../main/jsonschema/objectTypes/permission.json | 36 +++ .../src/main/jsonschema/objectTypes/person.json | 25 + .../jsonschema/objectTypes/photo-album.json | 19 .../src/main/jsonschema/objectTypes/photo.json | 23 .../src/main/jsonschema/objectTypes/place.json | 43 .../main/jsonschema/objectTypes/playlist.json | 19 .../main/jsonschema/objectTypes/process.json| 19 .../main/jsonschema/objectTypes/product.json| 25 + .../main/jsonschema/objectTypes/property.json | 48 + .../main/jsonschema/objectTypes/question.json | 28 + .../src/main/jsonschema/objectTypes/review.json | 22 .../src/main/jsonschema/objectTypes/role.json | 25 + .../main/jsonschema/objectTypes/service.json| 19 .../src/main/jsonschema/objectTypes/song.json | 19 .../src/main/jsonschema/objectTypes/status.json | 19 .../src/main/jsonschema/objectTypes/task.json | 40 +++ .../src/main/jsonschema/objectTypes/team.json | 19 .../src/main/jsonschema/objectTypes/video.json | 19 .../src/main/jsonschema/verbs/accept.json | 24 + .../src/main/jsonschema/verbs/access.json | 24 + .../src/main/jsonschema/verbs/acknowledge.json | 24 + .../src/main/jsonschema/verbs/add.json | 24 + .../src/main/jsonschema/verbs/agree.json| 24 + .../src/main/jsonschema/verbs/append.json | 24 + .../src/main/jsonschema/verbs/approve.json | 24 + .../src/main/jsonschema/verbs/archive.json | 24 + .../src/main/jsonschema/verbs/assign.json | 24 + .../src/main/jsonschema/verbs/at.json | 24 + .../src/main/jsonschema/verbs/attach.json | 24 + .../src/main/jsonschema/verbs/attend.json | 24 + .../src/main/jsonschema/verbs/author.json | 24 + .../src/main/jsonschema/verbs/authorize.json| 24 + .../src/main/jsonschema/verbs/borrow.json | 24 + .../src/main/jsonschema/verbs/build.json| 24 + .../src/main/jsonschema/verbs/cancel.json | 24 + .../src/main/jsonschema/verbs/checkin.json | 24 + .../src/main/jsonschema/verbs/close.json| 24 + .../src/main/jsonschema/verbs/complete.json | 24 + .../src/main/jsonschema/verbs/confirm.json | 24 + .../src/main/jsonschema/verbs/consume.json | 24 + .../src/main/jsonschema/verbs/create.js
[32/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
refactoring, testing, documentation, CLI modes break up streams-schemas into streams-util and streams-schema-activitystreams add index.md to each plugin specify basepath of jsonschema project-wide harmonize plugin behavior, code style, docs ensure all tests pass add CLI modes Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/6187265f Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/6187265f Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/6187265f Branch: refs/feature/STREAMS-389,398 Commit: 6187265fc0395a8051483ba3b905d976299217a3 Parents: 57f17d7 Author: Steve Blackmon @steveblackmon Authored: Wed Jun 1 12:32:14 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:32:32 2016 -0500 -- streams-components/streams-converters/pom.xml | 2 +- streams-components/streams-http/pom.xml | 2 +- .../streams-persist-kinesis/pom.xml | 2 +- .../streams-persist-s3/pom.xml | 6 +- .../spring/streams-cassandra-context.xml| 25 -- .../streams-persist-elasticsearch/pom.xml | 6 +- .../streams-persist-filebuffer/pom.xml | 2 +- streams-contrib/streams-persist-graph/pom.xml | 2 +- streams-contrib/streams-persist-hbase/pom.xml | 2 +- streams-contrib/streams-persist-hdfs/pom.xml| 2 +- streams-contrib/streams-persist-kafka/pom.xml | 2 +- streams-contrib/streams-persist-mongo/pom.xml | 2 +- .../streams-processor-lucene/pom.xml| 2 +- .../streams-processor-peoplepattern/pom.xml | 2 +- streams-contrib/streams-processor-tika/pom.xml | 2 +- streams-contrib/streams-processor-urls/pom.xml | 2 +- .../streams-provider-datasift/pom.xml | 2 +- .../streams-provider-facebook/pom.xml | 10 +- .../gnip-edc-instagram/pom.xml | 2 +- .../gnip-powertrack/pom.xml | 2 +- .../google-gmail/pom.xml| 2 +- .../google-gplus/pom.xml| 2 +- .../streams-provider-instagram/pom.xml | 4 +- .../streams-provider-moreover/pom.xml | 4 +- streams-contrib/streams-provider-rss/pom.xml| 2 +- .../streams-provider-sysomos/pom.xml| 4 +- .../streams-provider-twitter/pom.xml| 2 +- .../streams-provider-youtube/pom.xml| 2 +- streams-monitoring/pom.xml | 2 +- .../streams-plugin-cassandra/pom.xml| 13 +- .../StreamsCassandraGenerationConfig.java | 2 +- .../StreamsCassandraResourceGenerator.java | 42 +-- .../StreamsCassandraResourceGeneratorMojo.java | 37 +- .../src/site/markdown/index.md | 22 +- ...treamsCassandraResourceGeneratorCLITest.java | 10 +- ...reamsCassandraResourceGeneratorMojoTest.java | 9 +- .../StreamsCassandraResourceGeneratorTest.java | 58 +-- .../resources/streams-plugin-cassandra/pom.xml | 21 +- .../streams-plugin-elasticsearch/pom.xml| 13 +- .../StreamsElasticsearchGenerationConfig.java | 2 +- .../StreamsElasticsearchResourceGenerator.java | 75 ++-- ...reamsElasticsearchResourceGeneratorMojo.java | 29 +- .../src/site/markdown/index.md | 24 +- ...msElasticsearchResourceGeneratorCLITest.java | 39 ++ ...reamsElasticsearchResourceGeneratorTest.java | 59 +-- .../streams-plugin-elasticsearch/pom.xml| 23 +- streams-plugins/streams-plugin-hbase/pom.xml| 13 +- .../hbase/StreamsHbaseGenerationConfig.java | 2 +- .../hbase/StreamsHbaseResourceGenerator.java| 41 +- .../StreamsHbaseResourceGeneratorMojo.java | 28 +- .../src/site/markdown/index.md | 26 +- .../StreamsHbaseResourceGeneratorCLITest.java | 2 +- .../StreamsHbaseResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHbaseResourceGeneratorTest.java | 31 +- .../test/resources/streams-plugin-hbase/pom.xml | 23 +- streams-plugins/streams-plugin-hive/pom.xml | 13 +- .../hive/StreamsHiveGenerationConfig.java | 3 +- .../hive/StreamsHiveResourceGenerator.java | 35 +- .../hive/StreamsHiveResourceGeneratorMojo.java | 38 +- .../src/site/markdown/index.md | 28 +- .../StreamsHiveResourceGeneratorCLITest.java| 2 +- .../StreamsHiveResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHiveResourceGeneratorTest.java | 32 +- .../test/resources/streams-plugin-hive/pom.xml | 23 +- streams-plugins/streams-plugin-pig/pom.xml | 13 +- .../plugins/pig/StreamsPigGenerationConfig.java | 3 +- .../pig/StreamsPigResourceGenerator.java| 46 +-- .../pig/StreamsPigResourceGeneratorMojo.java| 38 +- .../src/site/markdown/index.md | 24 +- .../StreamsPigResourceGeneratorCLITest.java | 4 +- .../Stre
[08/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/approve.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/approve.json b/streams-schemas/src/main/jsonschema/verbs/approve.json new file mode 100644 index 000..ec66f9b --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/approve.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Approve", +"description": "Indicates that the actor has approved the object. For instance, a manager might approve a travel request.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "approve" +}, +"title": { +"type": "string", +"default": "{actor.displayName} approved {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/archive.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/archive.json b/streams-schemas/src/main/jsonschema/verbs/archive.json new file mode 100644 index 000..24aea16 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/archive.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Archive", +"description": "Indicates that the actor has archived the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "archive" +}, +"title": { +"type": "string", +"default": "{actor.displayName} archived {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/assign.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/assign.json b/streams-schemas/src/main/jsonschema/verbs/assign.json new file mode 100644 index 000..8fe5458 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/assign.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Assign", +"description": "Indicates that the actor has assigned the object to the target.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "assign" +}, +"title": { +"type": "string", +"default": "{actor.displayName} assigned {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/at.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/at.json b/streams-schemas/src/main/jsonschema/verbs/at.json new file mode 100644 index 000..42c1222 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/at.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "At", +"description": "Indicates that the actor is currently located at the object. For instance, a person being at a specific physical location.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "assign" +}, +"title": { +"type": "string", +"default": "{actor.displayName} assigned {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/attach.json -- diff --git a/streams-schema
[01/32] incubator-streams git commit: start of implementation for STREAMS-398
Repository: incubator-streams Updated Branches: refs/feature/STREAMS-389,398 [created] 6187265fc start of implementation for STREAMS-398 Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/f0a3518e Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/f0a3518e Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/f0a3518e Branch: refs/feature/STREAMS-389,398 Commit: f0a3518ef7e89f4b3ce2ebc3b0141ef240c00c72 Parents: c2229a4 Author: Steve Blackmon (@steveblackmon) Authored: Tue Dec 29 17:19:15 2015 -0600 Committer: Steve Blackmon (@steveblackmon) Committed: Tue Dec 29 17:19:15 2015 -0600 -- streams-plugins/pom.xml | 56 streams-plugins/streams-plugin-hive/pom.xml | 232 +++ .../apache/streams/plugins/StreamsPojoHive.java | 242 +++ .../streams/plugins/StreamsPojoHiveMojo.java| 71 + .../plugins/test/StreamsPojoHiveTest.java | 55 .../src/test/resources/Tweet.hql| 297 +++ .../test/resources/streams-plugin-hive/pom.xml | 42 +++ 7 files changed, 995 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/f0a3518e/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml new file mode 100644 index 000..2306aab --- /dev/null +++ b/streams-plugins/pom.xml @@ -0,0 +1,56 @@ + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +streams-project +org.apache.streams +0.3-incubating-SNAPSHOT +../pom.xml + + +streams-plugins + +pom +streams-plugins + + + + + + +streams-plugin-scala + + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-pojo +${project.version} + + + + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/f0a3518e/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml new file mode 100644 index 000..cbc055b --- /dev/null +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -0,0 +1,232 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-hive +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT +.. + + + +1.14 + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-core +${project.version} + + +org.jsonschema2pojo +jsonschema2pojo-core + + +org.apache.streams +streams-pojo +${project.version} +test +test-jar + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +
[03/32] incubator-streams git commit: rename Hive Generator
rename Hive Generator Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/6501b27c Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/6501b27c Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/6501b27c Branch: refs/feature/STREAMS-389,398 Commit: 6501b27cdc148e5044b893197b5dc38d34aa8aeb Parents: 1c78ecc Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:19 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Mar 28 08:32:19 2016 -0500 -- .../streams/plugins/StreamsHiveResourceGenerator.java | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6501b27c/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java index 4edacf0..1efb15e 100644 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java +++ b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java @@ -27,15 +27,14 @@ public class StreamsHiveResourceGenerator implements Runnable { private final static String LS = System.getProperty("line.separator"); -private StreamsPojoHiveMojo mojo; +private StreamsHiveResourceGeneratorMojo mojo; String inDir = "./target/test-classes/activities"; String outDir = "./target/generated-sources/hive"; -String packages[] = {"org.apache.streams.pojo.json"}; public void main(String[] args) { StreamsHiveResourceGenerator streamsHiveResourceGenerator = new StreamsHiveResourceGenerator(); -Thread thread = new Thread(streamsPojoScala); +Thread thread = new Thread(streamsHiveResourceGenerator); thread.start(); try { thread.join(); @@ -47,7 +46,7 @@ public class StreamsHiveResourceGenerator implements Runnable { return; } -public StreamsHiveResourceGenerator(StreamsPojoHiveMojo mojo) { +public StreamsHiveResourceGenerator(StreamsHiveResourceGeneratorMojo mojo) { this.mojo = mojo; if (mojo != null && mojo.getTarget() != null && @@ -67,6 +66,9 @@ public class StreamsHiveResourceGenerator implements Runnable { public void run() { +List schemaFiles; + + List> serializableClasses = detectSerializableClasses(); LOGGER.info("Detected {} serialiables:", serializableClasses.size());
[31/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java -- diff --git a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java index d46eaa6..daf85ae 100644 --- a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java +++ b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java @@ -1,15 +1,12 @@ package org.apache.streams.plugins.cassandra.test; -import com.google.common.base.Charsets; import com.google.common.base.Predicate; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.common.io.Files; -import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.apache.streams.plugins.cassandra.StreamsCassandraGenerationConfig; import org.apache.streams.plugins.cassandra.StreamsCassandraResourceGenerator; -import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,10 +16,6 @@ import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import static org.apache.streams.schema.FileUtil.dropSourcePathPrefix; /** * Test that cassandra resources are generated. @@ -50,28 +43,20 @@ public class StreamsCassandraResourceGeneratorTest { StreamsCassandraGenerationConfig config = new StreamsCassandraGenerationConfig(); -String sourceDirectory = "target/test-classes/streams-schemas"; +String sourceDirectory = "target/test-classes/streams-schema-activitystreams"; config.setSourceDirectory(sourceDirectory); -config.setTargetDirectory("target/generated-sources/test"); +config.setTargetDirectory("target/generated-resources/cassandra"); config.setExclusions(Sets.newHashSet("attachments")); config.setMaxDepth(2); StreamsCassandraResourceGenerator streamsCassandraResourceGenerator = new StreamsCassandraResourceGenerator(config); -Thread thread = new Thread(streamsCassandraResourceGenerator); -thread.start(); -try { -thread.join(); -} catch (InterruptedException e) { -LOGGER.error("InterruptedException", e); -} catch (Exception e) { -LOGGER.error("Exception", e); -} +streamsCassandraResourceGenerator.run(); -File testOutput = new File( "./target/generated-sources/test"); +File testOutput = config.getTargetDirectory(); assert( testOutput != null ); assert( testOutput.exists() == true ); @@ -82,43 +67,14 @@ public class StreamsCassandraResourceGeneratorTest { Collection outputCollection = Lists.newArrayList(outputIterator); assert( outputCollection.size() == 1 ); -Path path = Paths.get("./target/generated-sources/test/types.cql"); +Path path = Paths.get(testOutput.getAbsolutePath()).resolve("types.cql"); + +assert( path.toFile().exists() ); String typesCqlBytes = new String( java.nio.file.Files.readAllBytes(path)); assert( StringUtils.countMatches(typesCqlBytes, "CREATE TYPE") == 133 ); -assert( !typesCqlBytes.contains("IDK")); - - -//String expectedDirectory = "target/test-classes/expected"; -//File testExpected = new File( expectedDirectory ); -// -//Iterable expectedIterator = Files.fileTreeTraverser().breadthFirstTraversal(testExpected) -//.filter(cqlFilter); -//Collection expectedCollection = Lists.newArrayList(expectedIterator); -// -//int fails = 0; -// -//Iterator iterator = expectedCollection.iterator(); -//while( iterator.hasNext() ) { -//File objectExpected = iterator.next(); -//String expectedEnd = dropSourcePathPrefix(objectExpected.getAbsolutePath(), expectedDirectory); -//File objectActual = new File(config.getTargetDirectory() + "/" + expectedEnd); -//LOGGER.info("Comparing: {} and {}", objectExpected.getAbsolutePath(), objectActual.getAbsolutePath()); -//assert( objectActual.exists()); -//if( FileUtils.contentEquals(objectActual, objectExpected) == true ) { -//LOGGER.info("Exact Match!"); -//} else { -//LOGGER.info("No Match!"); -//fails++
[26/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/open.json -- diff --git a/streams-schemas/src/test/resources/activities/open.json b/streams-schemas/src/test/resources/activities/open.json deleted file mode 100644 index 4bf47cd..000 --- a/streams-schemas/src/test/resources/activities/open.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Laura" - }, - "verb": "open", - "object": { -"objectType": "issue", -"displayName": "Issue #126" - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/play.json -- diff --git a/streams-schemas/src/test/resources/activities/play.json b/streams-schemas/src/test/resources/activities/play.json deleted file mode 100644 index 0605662..000 --- a/streams-schemas/src/test/resources/activities/play.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Mark" - }, - "verb": "play", - "object": { -"objectType": "audio", -"displayName": "Call Me Maybe" - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/post.json -- diff --git a/streams-schemas/src/test/resources/activities/post.json b/streams-schemas/src/test/resources/activities/post.json deleted file mode 100644 index 73cfff7..000 --- a/streams-schemas/src/test/resources/activities/post.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "published": "2011-02-10T15:04:55Z", - "actor": { -"url": "http://example.org/martin";, -"objectType" : "person", -"id": "tag:example.org,2011:martin", -"image": { - "url": "http://example.org/martin/image";, - "width": 250, - "height": 250 -}, -"displayName": "Martin Smith" - }, - "verb": "post", - "object" : { -"url": "http://example.org/blog/2011/02/entry";, -"id": "tag:example.org,2011:abc123/xyz" - }, - "target" : { -"url": "http://example.org/blog/";, -"objectType": "blog", -"id": "tag:example.org,2011:abc123", -"displayName": "Martin's Blog" - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/present.json -- diff --git a/streams-schemas/src/test/resources/activities/present.json b/streams-schemas/src/test/resources/activities/present.json deleted file mode 100644 index 8f4df12..000 --- a/streams-schemas/src/test/resources/activities/present.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Laura" - }, - "verb": "present", - "object": { -"objectType": "file", -"displayName": "1Q2013 Sales Forecast.ppt" - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/purchase.json -- diff --git a/streams-schemas/src/test/resources/activities/purchase.json b/streams-schemas/src/test/resources/activities/purchase.json deleted file mode 100644 index 3354597..000 --- a/streams-schemas/src/test/resources/activities/purchase.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Mark" - }, - "verb": "purchase", - "object": { -"objectType": "video", -"displayName": "The Avengers" - }, - "title": "Mark purchased the movie, The Avengers" -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/qualify.json -- diff --git a/streams-schemas/src/test/resources/activities/qualify.json b/streams-schemas/src/test/resources/activities/qualify.json deleted file mode 100644 index 630bda0..000 --- a/streams-schemas/src/test/resources/activities/qualify.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/l
[16/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/join.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/join.json b/streams-schemas/src/main/jsonschema/verbs/join.json index 78daed8..5276072 100644 --- a/streams-schemas/src/main/jsonschema/verbs/join.json +++ b/streams-schemas/src/main/jsonschema/verbs/join.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/join.json#";, "type": "object", "title": "Join", "description": "Indicates that the actor has become a member of the object.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/leave.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/leave.json b/streams-schemas/src/main/jsonschema/verbs/leave.json index 1ce73bc..9995099 100644 --- a/streams-schemas/src/main/jsonschema/verbs/leave.json +++ b/streams-schemas/src/main/jsonschema/verbs/leave.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/leave.json#";, "type": "object", "title": "Leave", "description": "Indicates that the actor has left the object. For instance, a Person leaving a Group or checking-out of a Place.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/like.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/like.json b/streams-schemas/src/main/jsonschema/verbs/like.json index 4ac1bf7..d583305 100644 --- a/streams-schemas/src/main/jsonschema/verbs/like.json +++ b/streams-schemas/src/main/jsonschema/verbs/like.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/like.json#";, "type": "object", "title": "Like", "description": "Indicates that the actor marked the object as an item of special interest.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/listen.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/listen.json b/streams-schemas/src/main/jsonschema/verbs/listen.json index 3476144..9982ac6 100644 --- a/streams-schemas/src/main/jsonschema/verbs/listen.json +++ b/streams-schemas/src/main/jsonschema/verbs/listen.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/listen.json#";, "type": "object", "title": "Listen", "description": "Indicates that the actor has listened to the object. This is typically only applicable for objects representing audio content, such as music, an audio-book, or a radio broadcast.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/lose.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/lose.json b/streams-schemas/src/main/jsonschema/verbs/lose.json index 60899ba..1d959a4 100644 --- a/streams-schemas/src/main/jsonschema/verbs/lose.json +++ b/streams-schemas/src/main/jsonschema/verbs/lose.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/lose.json#";, "type": "object", "title": "Lose", "description": "Indicates that the actor has lost the object. For instance, if a person loses a game.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/make-friend.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/make-friend.json b/streams-schemas/src/main/jsonschema/verbs/make-friend.json index a64
[12/32] incubator-streams git commit: re-enable hive plugin
re-enable hive plugin Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/02dc8efc Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/02dc8efc Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/02dc8efc Branch: refs/feature/STREAMS-389,398 Commit: 02dc8efc6615142cce4d3ddd62d28c1972c82855 Parents: 9618ada Author: Steve Blackmon @steveblackmon Authored: Tue May 3 16:33:47 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Tue May 3 16:33:47 2016 -0500 -- streams-plugins/pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02dc8efc/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml index 390c8a0..b90e2d5 100644 --- a/streams-plugins/pom.xml +++ b/streams-plugins/pom.xml @@ -36,6 +36,7 @@ +streams-plugin-hive streams-plugin-pojo
[06/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/agree.json -- diff --git a/streams-schemas/src/site/resources/verbs/agree.json b/streams-schemas/src/site/resources/verbs/agree.json new file mode 100644 index 000..5095153 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/agree.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Agree", +"description": "Indicates that the actor agrees with the object. For example, a person agreeing with an argument, or expressing agreement with a particular issue.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "agree" +}, +"title": { +"type": "string", +"default": "{actor.displayName} agrees with {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/append.json -- diff --git a/streams-schemas/src/site/resources/verbs/append.json b/streams-schemas/src/site/resources/verbs/append.json new file mode 100644 index 000..648d192 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/append.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Append", +"description": "Indicates that the actor has appended the object to the target. For instance, a person appending a new record to a database.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "append" +}, +"title": { +"type": "string", +"default": "{actor.displayName} append {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/approve.json -- diff --git a/streams-schemas/src/site/resources/verbs/approve.json b/streams-schemas/src/site/resources/verbs/approve.json new file mode 100644 index 000..ec66f9b --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/approve.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Approve", +"description": "Indicates that the actor has approved the object. For instance, a manager might approve a travel request.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "approve" +}, +"title": { +"type": "string", +"default": "{actor.displayName} approved {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/archive.json -- diff --git a/streams-schemas/src/site/resources/verbs/archive.json b/streams-schemas/src/site/resources/verbs/archive.json new file mode 100644 index 000..24aea16 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/archive.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Archive", +"description": "Indicates that the actor has archived the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "archive" +}, +"title": { +"type": "string", +"default": "{actor.displayName} archived {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/assign.json ---
[10/32] incubator-streams git commit: STREAMS-398 - pojo generation
STREAMS-398 - pojo generation code and plugin for generating POJOs now resides in streams-project unit testing for generating POJOs without maven unit testing for generating POJOs with maven Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/bf31cbe0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/bf31cbe0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/bf31cbe0 Branch: refs/feature/STREAMS-389,398 Commit: bf31cbe000b950cb07298d7dbc735726d4b91e3d Parents: 02b5add Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 11:42:44 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Thu Apr 21 11:42:44 2016 -0500 -- pom.xml | 1 + streams-plugins/streams-plugin-pojo/pom.xml | 28 ++- .../plugins/StreamsPojoGenerationConfig.java| 230 --- .../plugins/StreamsPojoSourceGenerator.java | 98 .../plugins/StreamsPojoSourceGeneratorMojo.java | 80 +++ .../StreamsPojoSourceGeneratorMojoTest.java | 96 .../test/StreamsPojoSourceGeneratorTest.java| 43 +++- .../test/resources/streams-plugin-pojo/pom.xml | 90 +++- streams-pojo/pom.xml| 6 + 9 files changed, 421 insertions(+), 251 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/bf31cbe0/pom.xml -- diff --git a/pom.xml b/pom.xml index b284ae2..30ec5e7 100644 --- a/pom.xml +++ b/pom.xml @@ -177,6 +177,7 @@ streams-pojo-extensions streams-plugins streams-runtimes +streams-schemas streams-testing streams-util streams-verbs http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/bf31cbe0/streams-plugins/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/pom.xml index 399a371..d7210c8 100644 --- a/streams-plugins/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/pom.xml @@ -43,8 +43,14 @@ ${project.version} +org.apache.streams +streams-schemas +${project.version} + + org.jsonschema2pojo jsonschema2pojo-core +0.4.10 commons-logging @@ -55,6 +61,7 @@ org.jsonschema2pojo jsonschema2pojo-maven-plugin +0.4.10 org.apache.streams @@ -86,6 +93,12 @@ test +org.apache.maven.shared +maven-verifier +1.6 +test + + org.apache.maven maven-core 3.3.3 @@ -216,19 +229,20 @@ org.apache.maven.plugins maven-dependency-plugin -2.4 + +**/*.json + ${project.build.directory}/test-classes/streams-schemas +org.apache.streams +streams-schemas +jar,test-jar + -resource-dependencies +test-resource-dependencies process-test-resources unpack-dependencies - - streams-pojo -**/*.json - ${project.build.directory}/test-classes - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/bf31cbe0/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java -- diff --git a/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java b/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java index b42ccf9..4c1f850 100644 --- a/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java +++ b/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java @@ -2,197 +2,67 @@ package org.apache.streams.plugins; import org.jsonschema2pojo.AnnotationStyle; import org.jsonschema2pojo.Annotator; +import
[25/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json new file mode 100644 index 000..63445d5 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/note.json#";, +"type": "object", +"title": "note", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "note" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json new file mode 100644 index 000..6d4b5f2 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/offer.json#";, +"type": "object", +"title": "offer", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "offer" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json new file mode 100644 index 000..7ee7513 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/organization.json#";, +"type": "object", +"title": "organization", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "organization" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json new file mode 100644 index 000..4f18fcf --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/page.json#";, +"type": "object", +"title": "page", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "page" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/permission.json --
[11/32] incubator-streams git commit: hive generation is looking pretty good
hive generation is looking pretty good Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/9618adaf Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/9618adaf Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/9618adaf Branch: refs/feature/STREAMS-389,398 Commit: 9618adaf3f828f9f3682226f666e5732824e4212 Parents: bf31cbe Author: Steve Blackmon @steveblackmon Authored: Tue May 3 16:32:58 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Tue May 3 16:32:58 2016 -0500 -- streams-plugins/streams-plugin-hive/pom.xml | 23 +- .../plugins/StreamsHiveResourceGenerator.java | 221 - .../StreamsHiveResourceGeneratorMojo.java | 68 .../hive/StreamsHiveGenerationConfig.java | 84 + .../hive/StreamsHiveResourceGenerator.java | 322 +++ .../hive/StreamsHiveResourceGeneratorMojo.java | 76 + .../test/StreamsHiveResourceGeneratorTest.java | 88 - .../src/test/resources/expected/activity.hql| 203 .../src/test/resources/expected/collection.hql | 47 +++ .../src/test/resources/expected/media_link.hql | 11 + .../src/test/resources/expected/object.hql | 61 .../resources/expected/objectTypes/place.hql| 79 + .../test/resources/expected/verbs/purchase.hql | 203 streams-schemas/pom.xml | 37 ++- .../org/apache/streams/schema/FieldType.java| 13 + .../org/apache/streams/schema/FieldUtil.java| 29 ++ .../org/apache/streams/schema/FileUtil.java | 69 .../apache/streams/schema/GenerationConfig.java | 115 +++ .../java/org/apache/streams/schema/Schema.java | 57 .../org/apache/streams/schema/SchemaStore.java | 283 .../org/apache/streams/schema/SchemaUtil.java | 50 +++ .../java/org/apache/streams/schema/URIUtil.java | 31 ++ 22 files changed, 1860 insertions(+), 310 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/9618adaf/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml index 22d75ce..b173a8d 100644 --- a/streams-plugins/streams-plugin-hive/pom.xml +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -40,6 +40,12 @@ org.apache.streams streams-config ${project.version} + + +commons-logging +commons-logging + + org.apache.streams @@ -47,15 +53,13 @@ ${project.version} -org.jsonschema2pojo -jsonschema2pojo-core - - org.apache.streams -streams-pojo +streams-schemas ${project.version} -test -test-jar + + +com.google.guava +guava org.reflections @@ -219,9 +223,10 @@ unpack-dependencies - streams-pojo + org.apache.streams + streams-schemas **/*.json - ${project.build.directory}/test-classes + ${project.build.directory}/test-classes/streams-schemas http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/9618adaf/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java deleted file mode 100644 index 1efb15e..000 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java +++ /dev/null @@ -1,221 +0,0 @@ -package org.apache.streams.plugins; - -import com.google.common.base.Strings; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import org.reflections.ReflectionUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.Serializable; -import java.lang.reflect.Field; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -imp
[30/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/site/markdown/index.md -- diff --git a/streams-plugins/streams-plugin-pig/src/site/markdown/index.md b/streams-plugins/streams-plugin-pig/src/site/markdown/index.md index d0d4791..5ab4375 100644 --- a/streams-plugins/streams-plugin-pig/src/site/markdown/index.md +++ b/streams-plugins/streams-plugin-pig/src/site/markdown/index.md @@ -3,17 +3,33 @@ org.apache.streams.plugins:streams-plugin-pig streams-plugin-pig generates resources from json schemas to assist with analysis of json data using Apache Pig. - Usage +### Usage + +Output will be placed in target/generated-resources/pig by default + +# Maven Run within a module containing a src/main/jsonschema directory mvn org.apache.streams.plugins:streams-plugin-pig:0.3-incubating-SNAPSHOT:pig -Output will be placed in target/generated-resources/pig by default +[streams-plugin-pig/pom.xml](streams-plugin-pig/pom.xml "streams-plugin-pig/pom.xml") - Example +# SDK -[streams-plugin-pig/pom.xml](streams-plugin-pig/pom.xml "streams-plugin-pig/pom.xml") +Embed within your own java code + +StreamsPigGenerationConfig config = new StreamsPigGenerationConfig(); +config.setSourceDirectory("src/main/jsonschema"); +config.setTargetDirectory("target/generated-resources"); +StreamsPigGenerationConfig generator = new StreamsPigGenerationConfig(config); +generator.run(); + +# CLI + +Run from CLI without Maven + +java -jar streams-plugin-pig-jar-with-dependencies.jar StreamsPigResourceGenerator src/main/jsonschema target/generated-resources Documentation http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java -- diff --git a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java index c94bca9..8190d50 100644 --- a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java +++ b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java @@ -19,8 +19,8 @@ public class StreamsPigResourceGeneratorCLITest { @Test public void testStreamsPigResourceGeneratorCLI() throws Exception { -String sourceDirectory = "target/test-classes/streams-schemas"; -String targetDirectory = "target/generated-resources/hive-cli"; +String sourceDirectory = "target/test-classes/streams-schema-activitystreams"; +String targetDirectory = "target/generated-resources/pig-cli"; List argsList = Lists.newArrayList(sourceDirectory, targetDirectory); StreamsPigResourceGenerator.main(argsList.toArray(new String[0])); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java -- diff --git a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java index 401c506..76c4eb2 100644 --- a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java +++ b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java @@ -31,7 +31,7 @@ public class StreamsPigResourceGeneratorMojoTest extends TestCase { @Test -public void testStreamsHiveResourceGeneratorMojo() throws Exception { +public void testStreamsPigResourceGeneratorMojo() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/streams-plugin-pig" ); @@ -50,7 +50,7 @@ public class StreamsPigResourceGeneratorMojoTest extends TestCase { verifier.resetStreams(); -File testOutput = new File(testDir.getAbsolutePath() + "/target/generated-resources/test-mojo"); +File testOutput = new File(testDir.getAbsolutePath() + "/target/generated-resources/pig-mojo"); assert( testOutput != null ); assert( testOutput.exists() == true ); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/Stre
[21/32] incubator-streams git commit: first take at STREAMS-389: streams-project/streams-plugins/streams-plugin-scala
first take at STREAMS-389: streams-project/streams-plugins/streams-plugin-scala Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/57f17d76 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/57f17d76 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/57f17d76 Branch: refs/feature/STREAMS-389,398 Commit: 57f17d765a5e0f4767a998e47e8afb096a8ff792 Parents: 95a02d7 Author: Steve Blackmon (@steveblackmon) Authored: Mon Dec 7 13:48:38 2015 -0700 Committer: Steve Blackmon @steveblackmon Committed: Sat May 7 18:53:32 2016 -0500 -- streams-plugins/pom.xml | 1 + streams-plugins/streams-plugin-scala/pom.xml| 243 .../streams/plugins/StreamsPojoScala.java | 371 +++ .../streams/plugins/StreamsPojoScalaMojo.java | 71 .../plugins/test/StreamsPojoScalaTest.java | 55 +++ .../test/resources/streams-plugin-scala/pom.xml | 40 ++ 6 files changed, 781 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/57f17d76/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml index 5d403ac..f2c8999 100644 --- a/streams-plugins/pom.xml +++ b/streams-plugins/pom.xml @@ -42,6 +42,7 @@ streams-plugin-hive streams-plugin-pig streams-plugin-pojo +streams-plugin-scala http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/57f17d76/streams-plugins/streams-plugin-scala/pom.xml -- diff --git a/streams-plugins/streams-plugin-scala/pom.xml b/streams-plugins/streams-plugin-scala/pom.xml new file mode 100644 index 000..f718260 --- /dev/null +++ b/streams-plugins/streams-plugin-scala/pom.xml @@ -0,0 +1,243 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-scala +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-core +${project.version} + + +org.jsonschema2pojo +jsonschema2pojo-core + + +org.apache.streams +streams-pojo +${project.version} +test +test-jar + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +commons-logging +commons-logging + + + + +org.apache.maven.plugin-tools +maven-plugin-tools-api +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-annotations +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-tools-generators +3.3 + + +org.apache.maven.plugin-testing +maven-plugin-testing-harness +3.3.0 +test + + +junit +junit +test + + +commons-lang +commons-lang +2.6 + + +
[14/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/read.json -- diff --git a/streams-schemas/src/site/resources/verbs/read.json b/streams-schemas/src/site/resources/verbs/read.json deleted file mode 100644 index e797f41..000 --- a/streams-schemas/src/site/resources/verbs/read.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Read", -"description": "Indicates that the actor read the object. This is typically only applicable for objects representing printed or written content, such as a book, a message or a comment.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "read" -}, -"title": { -"type": "string", -"default": "{actor.displayName} read {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/receive.json -- diff --git a/streams-schemas/src/site/resources/verbs/receive.json b/streams-schemas/src/site/resources/verbs/receive.json deleted file mode 100644 index 0d44aef..000 --- a/streams-schemas/src/site/resources/verbs/receive.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Receive", -"description": "Indicates that the actor is receiving an object. Examples include a person receiving a badge object. The object identifies the object being received.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "receive" -}, -"title": { -"type": "string", -"default": "{actor.displayName} received {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/reject.json -- diff --git a/streams-schemas/src/site/resources/verbs/reject.json b/streams-schemas/src/site/resources/verbs/reject.json deleted file mode 100644 index b82fac7..000 --- a/streams-schemas/src/site/resources/verbs/reject.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Reject", -"description": "Indicates that the actor has rejected the object.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "reject" -}, -"title": { -"type": "string", -"default": "{actor.displayName} rejected {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/remove-friend.json -- diff --git a/streams-schemas/src/site/resources/verbs/remove-friend.json b/streams-schemas/src/site/resources/verbs/remove-friend.json deleted file mode 100644 index 073441d..000 --- a/streams-schemas/src/site/resources/verbs/remove-friend.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "UnFriend", -"description": "Indicates that the actor has removed the object from the collection of friends.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "remove-friend" -}, -"title": { -"type": "string", -"default": "{actor.displayName} removed friend {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/remove.json
[28/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/objectTypes/task.json -- diff --git a/streams-schemas/src/main/jsonschema/objectTypes/task.json b/streams-schemas/src/main/jsonschema/objectTypes/task.json deleted file mode 100644 index 2c8a3ea..000 --- a/streams-schemas/src/main/jsonschema/objectTypes/task.json +++ /dev/null @@ -1,40 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/task.json#";, -"type": "object", -"title": "task", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "task" -}, -"by": { - "type": "string", - "format": "date-time" -}, -"prerequisites": { - "type": "array", - "items": { -"type": "object", -"$ref": "../activity.json" - } -}, -"required": { - "type": "boolean" -}, -"supersedes": { - "type": "array", - "items": { -"type": "object", -"$ref": "../activity.json" - } -} -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/objectTypes/team.json -- diff --git a/streams-schemas/src/main/jsonschema/objectTypes/team.json b/streams-schemas/src/main/jsonschema/objectTypes/team.json deleted file mode 100644 index f4f7494..000 --- a/streams-schemas/src/main/jsonschema/objectTypes/team.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/team.json#";, -"type": "object", -"title": "team", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "team" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/objectTypes/video.json -- diff --git a/streams-schemas/src/main/jsonschema/objectTypes/video.json b/streams-schemas/src/main/jsonschema/objectTypes/video.json deleted file mode 100644 index 88a528d..000 --- a/streams-schemas/src/main/jsonschema/objectTypes/video.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/video.json#";, -"type": "object", -"title": "video", -"extends": { -"$ref": "../objectTypes/file.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "video" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/accept.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/accept.json b/streams-schemas/src/main/jsonschema/verbs/accept.json deleted file mode 100644 index 04efee5..000 --- a/streams-schemas/src/main/jsonschema/verbs/accept.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/accept.json#";, -"type": "object", -"title": "Accept", -"description": "Indicates that that the actor has accepted the object. For instance, a person accepting an award, or accepting an assignment.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "accept" -}, -"title": { -"type": "string", -"default": "{actor.displayName}
[29/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java -- diff --git a/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java b/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java deleted file mode 100644 index 53f0a98..000 --- a/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.apache.streams.schema; - -import com.google.common.base.Preconditions; -import com.google.common.base.Strings; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.Arrays; -import java.util.List; - -/** - * Created by steve on 5/1/16. - */ -public class FileUtil { - -private final static Logger LOGGER = LoggerFactory.getLogger(FileUtil.class); - -public static String dropSourcePathPrefix(String inputFile, String sourceDirectory) { -if(Strings.isNullOrEmpty(sourceDirectory)) -return inputFile; -else { -try { -if( inputFile.contains(sourceDirectory) && inputFile.indexOf(sourceDirectory) > 0) { -return inputFile.substring(inputFile.indexOf(sourceDirectory)+sourceDirectory.length()+1); -} -} catch( Throwable e ) { -return inputFile; -} -} -return inputFile; -} - -public static String swapExtension(String inputFile, String originalExtension, String newExtension) { -if(inputFile.endsWith("."+originalExtension)) -return inputFile.replace("."+originalExtension, "."+newExtension); -else return inputFile; -} - -public static String dropExtension(String inputFile) { -if(inputFile.contains(".")) -return inputFile.substring(0, inputFile.lastIndexOf(".")); -else return inputFile; -} - -public static void writeFile(String resourceFile, String resourceContent) { -try { -File path = new File(resourceFile); -File dir = path.getParentFile(); -if( !dir.exists() ) -dir.mkdirs(); -Files.write(Paths.get(resourceFile), resourceContent.getBytes(), StandardOpenOption.CREATE_NEW); -} catch (Exception e) { -LOGGER.error("Write Exception: {}", e); -} -} - -public static void resolveRecursive(GenerationConfig config, List schemaFiles) { - -Preconditions.checkArgument(schemaFiles.size() > 0); -int i = 0; -while( schemaFiles.size() > i) { -File child = schemaFiles.get(i); -if (child.isDirectory()) { - schemaFiles.addAll(Arrays.asList(child.listFiles(config.getFileFilter(; -schemaFiles.remove(child); -} else { -i += 1; -} -} - -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java -- diff --git a/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java b/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java deleted file mode 100644 index ec77367..000 --- a/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.apache.streams.schema; - -import java.io.File; -import java.io.FileFilter; -import java.net.URL; -import java.util.Iterator; - -/** - * Created by sblackmon on 5/3/16. - */ -public interface GenerationConfig { - -/** - * Gets the 'source' configuration option. - * - * @return The source file(s) or directory(ies) from which JSON Schema will - * be read. - */ -Iterator getSource(); - -/** - * Gets the 'targetDirectory' configuration option. - * - * @return The target directory into which generated types will be written - * (may or may not exist before types are written) - */ -File getTargetDirectory(); - -/** - * Gets the 'outputEncoding' configuration option. - * - * @return The character encoding that should be used when writing output files. - */ -String getOutputEncoding(); - -/** - * Gets the file filter used to isolate the schema mapping files in the - * source directories. - * - * @return the file filter use when scanning for schema files. - */ -FileFilter getFileFilter(); - -/** - * Gets the 'includeAdditionalProperties' configuration option. - * - * @return Whether to allow 'additional properties' support in objects. - * Setting this to false
[05/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/tag.json -- diff --git a/streams-schemas/src/site/resources/verbs/tag.json b/streams-schemas/src/site/resources/verbs/tag.json new file mode 100644 index 000..6208eae --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/tag.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tag", +"description": "Indicates that the actor has associated the object with the target. For example, if the actor specifies that a particular user appears in a photo. the object is the user and the target is the photo.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tag" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tagged {object.displayName} as {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/terminate.json -- diff --git a/streams-schemas/src/site/resources/verbs/terminate.json b/streams-schemas/src/site/resources/verbs/terminate.json new file mode 100644 index 000..280eb31 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/terminate.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Terminate", +"description": "Indicates that the actor has terminated the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "terminate" +}, +"title": { +"type": "string", +"default": "{actor.displayName} terminated {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/tie.json -- diff --git a/streams-schemas/src/site/resources/verbs/tie.json b/streams-schemas/src/site/resources/verbs/tie.json new file mode 100644 index 000..7530ed2 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/tie.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tie", +"description": "Indicates that the actor has neither won or lost the object. This verb is generally only applicable when the object represents some form of competition, such as a game.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tie" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tied at {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/unfavorite.json -- diff --git a/streams-schemas/src/site/resources/verbs/unfavorite.json b/streams-schemas/src/site/resources/verbs/unfavorite.json new file mode 100644 index 000..bfa9c20 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/unfavorite.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnFavorite", +"description": "Indicates that the actor has removed the object from the collection of favorited items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unfavorite" +}, +"title": { +"type": "string", +"default": "{actor.displayName} removed {object.displayName} as a favorite" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda
[27/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json b/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json deleted file mode 100644 index 6339f1e..000 --- a/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/rsvp-no.json#";, -"type": "object", -"title": "Rsvp No", -"description": "To indicate that the actor will not attend an event", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "rsvp-no" -}, -"title": { -"type": "string", -"default": "{actor.displayName} will not attend {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json b/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json deleted file mode 100644 index 7fecc78..000 --- a/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/rsvp-yes.json#";, -"type": "object", -"title": "Rsvp Yes", -"description": "To indicate that the actor will attend an event", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "rsvp-yes" -}, -"title": { -"type": "string", -"default": "{actor.displayName} is attending {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/satisfy.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/satisfy.json b/streams-schemas/src/main/jsonschema/verbs/satisfy.json deleted file mode 100644 index 9c36006..000 --- a/streams-schemas/src/main/jsonschema/verbs/satisfy.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/satisfy.json#";, -"type": "object", -"title": "Satisfy", -"description": "Indicates that the actor has satisfied the object. If a target is specified, it indicate the context within which the object was satisfied. For instance, if a person satisfies the requirements for a particular challenge, the person is the actor; the requirement is the object; and the challenge is the target.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "satisfy" -}, -"title": { -"type": "string", -"default": "{actor.displayName} has satisfied {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/save.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/save.json b/streams-schemas/src/main/jsonschema/verbs/save.json deleted file mode 100644 index 06ec16f..000 --- a/streams-schemas/src/main/jsonschema/verbs/save.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/save.json#";, -"type": "object", -"title": "Save", -"description": "Indicates that the actor has called out the object as being of interest prim
[18/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml -- diff --git a/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml b/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml new file mode 100644 index 000..9aa7d8d --- /dev/null +++ b/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml @@ -0,0 +1,76 @@ +http://maven.apache.org/POM/4.0.0"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.streams.plugins +streams-plugin-hbase-test +0.3-incubating-SNAPSHOT +jar +Test StreamsHbaseResourceGeneratorMojo + + + +junit +junit +4.11 +test + + +org.apache.streams +streams-schemas +${project.version} +test + + + + + + +org.apache.streams.plugins +streams-plugin-hbase +0.3-incubating-SNAPSHOT + + + target/test-classes/streams-schemas/activity.json + target/test-classes/streams-schemas/collection.json + target/test-classes/streams-schemas/media_link.json + target/test-classes/streams-schemas/object.json + target/test-classes/streams-schemas/objectTypes + target/test-classes/streams-schemas/verbs + + target/generated-resources/test-mojo +cf + + + + +hbase + + + + + +org.apache.maven.plugins +maven-dependency-plugin +2.10 + +**/*.json + ${project.build.directory}/test-classes/streams-schemas +org.apache.streams +streams-schemas +jar,test-jar + + + +unpack-schemas +process-resources + +unpack-dependencies + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml index b173a8d..515314a 100644 --- a/streams-plugins/streams-plugin-hive/pom.xml +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -148,6 +148,12 @@ test +org.apache.maven.shared +maven-verifier +1.6 +test + + junit junit test http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java index 06c1499..c09f7dd 100644 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java +++ b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java @@ -46,12 +46,11 @@ public class StreamsHiveResourceGenerator implements Runnable { private int currentDepth = 0; -public void main(String[] args) { +public static void main(String[] args) { StreamsHiveGenerationConfig config = new StreamsHiveGenerationConfig(); -String sourceDirectory = "./target/test-classes/activities"; -String targetDirectory = "./target/generated-sources/streams-plugin-hive"; -String targetPackage = ""; +String sourceDirectory = "src/main/jsonschema"; +String targetDirectory = "target/generated-resources/hive"; if( args.length > 0 ) sourceDirectory = args[0]; http://git-wip-us.apache.org/repos/a
[21/32] incubator-streams git commit: first take at STREAMS-389: streams-project/streams-plugins/streams-plugin-scala
first take at STREAMS-389: streams-project/streams-plugins/streams-plugin-scala Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/57f17d76 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/57f17d76 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/57f17d76 Branch: refs/heads/STREAMS-389 Commit: 57f17d765a5e0f4767a998e47e8afb096a8ff792 Parents: 95a02d7 Author: Steve Blackmon (@steveblackmon) Authored: Mon Dec 7 13:48:38 2015 -0700 Committer: Steve Blackmon @steveblackmon Committed: Sat May 7 18:53:32 2016 -0500 -- streams-plugins/pom.xml | 1 + streams-plugins/streams-plugin-scala/pom.xml| 243 .../streams/plugins/StreamsPojoScala.java | 371 +++ .../streams/plugins/StreamsPojoScalaMojo.java | 71 .../plugins/test/StreamsPojoScalaTest.java | 55 +++ .../test/resources/streams-plugin-scala/pom.xml | 40 ++ 6 files changed, 781 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/57f17d76/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml index 5d403ac..f2c8999 100644 --- a/streams-plugins/pom.xml +++ b/streams-plugins/pom.xml @@ -42,6 +42,7 @@ streams-plugin-hive streams-plugin-pig streams-plugin-pojo +streams-plugin-scala http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/57f17d76/streams-plugins/streams-plugin-scala/pom.xml -- diff --git a/streams-plugins/streams-plugin-scala/pom.xml b/streams-plugins/streams-plugin-scala/pom.xml new file mode 100644 index 000..f718260 --- /dev/null +++ b/streams-plugins/streams-plugin-scala/pom.xml @@ -0,0 +1,243 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-scala +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-core +${project.version} + + +org.jsonschema2pojo +jsonschema2pojo-core + + +org.apache.streams +streams-pojo +${project.version} +test +test-jar + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +commons-logging +commons-logging + + + + +org.apache.maven.plugin-tools +maven-plugin-tools-api +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-annotations +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-tools-generators +3.3 + + +org.apache.maven.plugin-testing +maven-plugin-testing-harness +3.3.0 +test + + +junit +junit +test + + +commons-lang +commons-lang +2.6 + + +
[03/32] incubator-streams git commit: rename Hive Generator
rename Hive Generator Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/6501b27c Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/6501b27c Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/6501b27c Branch: refs/heads/STREAMS-389 Commit: 6501b27cdc148e5044b893197b5dc38d34aa8aeb Parents: 1c78ecc Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:19 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Mar 28 08:32:19 2016 -0500 -- .../streams/plugins/StreamsHiveResourceGenerator.java | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6501b27c/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java index 4edacf0..1efb15e 100644 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java +++ b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java @@ -27,15 +27,14 @@ public class StreamsHiveResourceGenerator implements Runnable { private final static String LS = System.getProperty("line.separator"); -private StreamsPojoHiveMojo mojo; +private StreamsHiveResourceGeneratorMojo mojo; String inDir = "./target/test-classes/activities"; String outDir = "./target/generated-sources/hive"; -String packages[] = {"org.apache.streams.pojo.json"}; public void main(String[] args) { StreamsHiveResourceGenerator streamsHiveResourceGenerator = new StreamsHiveResourceGenerator(); -Thread thread = new Thread(streamsPojoScala); +Thread thread = new Thread(streamsHiveResourceGenerator); thread.start(); try { thread.join(); @@ -47,7 +46,7 @@ public class StreamsHiveResourceGenerator implements Runnable { return; } -public StreamsHiveResourceGenerator(StreamsPojoHiveMojo mojo) { +public StreamsHiveResourceGenerator(StreamsHiveResourceGeneratorMojo mojo) { this.mojo = mojo; if (mojo != null && mojo.getTarget() != null && @@ -67,6 +66,9 @@ public class StreamsHiveResourceGenerator implements Runnable { public void run() { +List schemaFiles; + + List> serializableClasses = detectSerializableClasses(); LOGGER.info("Detected {} serialiables:", serializableClasses.size());
[10/32] incubator-streams git commit: STREAMS-398 - pojo generation
STREAMS-398 - pojo generation code and plugin for generating POJOs now resides in streams-project unit testing for generating POJOs without maven unit testing for generating POJOs with maven Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/bf31cbe0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/bf31cbe0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/bf31cbe0 Branch: refs/heads/STREAMS-389 Commit: bf31cbe000b950cb07298d7dbc735726d4b91e3d Parents: 02b5add Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 11:42:44 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Thu Apr 21 11:42:44 2016 -0500 -- pom.xml | 1 + streams-plugins/streams-plugin-pojo/pom.xml | 28 ++- .../plugins/StreamsPojoGenerationConfig.java| 230 --- .../plugins/StreamsPojoSourceGenerator.java | 98 .../plugins/StreamsPojoSourceGeneratorMojo.java | 80 +++ .../StreamsPojoSourceGeneratorMojoTest.java | 96 .../test/StreamsPojoSourceGeneratorTest.java| 43 +++- .../test/resources/streams-plugin-pojo/pom.xml | 90 +++- streams-pojo/pom.xml| 6 + 9 files changed, 421 insertions(+), 251 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/bf31cbe0/pom.xml -- diff --git a/pom.xml b/pom.xml index b284ae2..30ec5e7 100644 --- a/pom.xml +++ b/pom.xml @@ -177,6 +177,7 @@ streams-pojo-extensions streams-plugins streams-runtimes +streams-schemas streams-testing streams-util streams-verbs http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/bf31cbe0/streams-plugins/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/pom.xml index 399a371..d7210c8 100644 --- a/streams-plugins/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/pom.xml @@ -43,8 +43,14 @@ ${project.version} +org.apache.streams +streams-schemas +${project.version} + + org.jsonschema2pojo jsonschema2pojo-core +0.4.10 commons-logging @@ -55,6 +61,7 @@ org.jsonschema2pojo jsonschema2pojo-maven-plugin +0.4.10 org.apache.streams @@ -86,6 +93,12 @@ test +org.apache.maven.shared +maven-verifier +1.6 +test + + org.apache.maven maven-core 3.3.3 @@ -216,19 +229,20 @@ org.apache.maven.plugins maven-dependency-plugin -2.4 + +**/*.json + ${project.build.directory}/test-classes/streams-schemas +org.apache.streams +streams-schemas +jar,test-jar + -resource-dependencies +test-resource-dependencies process-test-resources unpack-dependencies - - streams-pojo -**/*.json - ${project.build.directory}/test-classes - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/bf31cbe0/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java -- diff --git a/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java b/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java index b42ccf9..4c1f850 100644 --- a/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java +++ b/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java @@ -2,197 +2,67 @@ package org.apache.streams.plugins; import org.jsonschema2pojo.AnnotationStyle; import org.jsonschema2pojo.Annotator; +import org.j
[09/32] incubator-streams git commit: STREAMS-398 - streams-schemas
STREAMS-398 - streams-schemas moves jsonschemas to a seperate module this averts dependency graph cycle that would occur once streams-plugin-pojo is a dependency of streams-pojo and streams-scala Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/02b5adda Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/02b5adda Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/02b5adda Branch: refs/heads/STREAMS-389 Commit: 02b5adda7694698e732980c4b2702a2b67ff5548 Parents: eea0975 Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 11:41:59 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Thu Apr 21 11:41:59 2016 -0500 -- streams-schemas/pom.xml | 71 .../src/main/jsonschema/activity.json | 108 +++ .../src/main/jsonschema/collection.json | 47 .../src/main/jsonschema/media_link.json | 34 ++ streams-schemas/src/main/jsonschema/object.json | 98 + .../src/main/jsonschema/objectTypes/alert.json | 19 .../jsonschema/objectTypes/application.json | 19 .../main/jsonschema/objectTypes/article.json| 19 .../src/main/jsonschema/objectTypes/audio.json | 19 .../src/main/jsonschema/objectTypes/badge.json | 19 .../src/main/jsonschema/objectTypes/binary.json | 19 .../main/jsonschema/objectTypes/bookmark.json | 19 .../main/jsonschema/objectTypes/comment.json| 19 .../src/main/jsonschema/objectTypes/device.json | 19 .../src/main/jsonschema/objectTypes/event.json | 51 + .../src/main/jsonschema/objectTypes/file.json | 25 + .../src/main/jsonschema/objectTypes/folder.json | 19 .../src/main/jsonschema/objectTypes/game.json | 19 .../src/main/jsonschema/objectTypes/group.json | 19 .../src/main/jsonschema/objectTypes/image.json | 22 .../src/main/jsonschema/objectTypes/issue.json | 25 + .../src/main/jsonschema/objectTypes/job.json| 19 .../src/main/jsonschema/objectTypes/list.json | 28 + .../src/main/jsonschema/objectTypes/note.json | 19 .../src/main/jsonschema/objectTypes/offer.json | 19 .../jsonschema/objectTypes/organization.json| 19 .../src/main/jsonschema/objectTypes/page.json | 19 .../main/jsonschema/objectTypes/permission.json | 36 +++ .../src/main/jsonschema/objectTypes/person.json | 25 + .../jsonschema/objectTypes/photo-album.json | 19 .../src/main/jsonschema/objectTypes/photo.json | 23 .../src/main/jsonschema/objectTypes/place.json | 43 .../main/jsonschema/objectTypes/playlist.json | 19 .../main/jsonschema/objectTypes/process.json| 19 .../main/jsonschema/objectTypes/product.json| 25 + .../main/jsonschema/objectTypes/property.json | 48 + .../main/jsonschema/objectTypes/question.json | 28 + .../src/main/jsonschema/objectTypes/review.json | 22 .../src/main/jsonschema/objectTypes/role.json | 25 + .../main/jsonschema/objectTypes/service.json| 19 .../src/main/jsonschema/objectTypes/song.json | 19 .../src/main/jsonschema/objectTypes/status.json | 19 .../src/main/jsonschema/objectTypes/task.json | 40 +++ .../src/main/jsonschema/objectTypes/team.json | 19 .../src/main/jsonschema/objectTypes/video.json | 19 .../src/main/jsonschema/verbs/accept.json | 24 + .../src/main/jsonschema/verbs/access.json | 24 + .../src/main/jsonschema/verbs/acknowledge.json | 24 + .../src/main/jsonschema/verbs/add.json | 24 + .../src/main/jsonschema/verbs/agree.json| 24 + .../src/main/jsonschema/verbs/append.json | 24 + .../src/main/jsonschema/verbs/approve.json | 24 + .../src/main/jsonschema/verbs/archive.json | 24 + .../src/main/jsonschema/verbs/assign.json | 24 + .../src/main/jsonschema/verbs/at.json | 24 + .../src/main/jsonschema/verbs/attach.json | 24 + .../src/main/jsonschema/verbs/attend.json | 24 + .../src/main/jsonschema/verbs/author.json | 24 + .../src/main/jsonschema/verbs/authorize.json| 24 + .../src/main/jsonschema/verbs/borrow.json | 24 + .../src/main/jsonschema/verbs/build.json| 24 + .../src/main/jsonschema/verbs/cancel.json | 24 + .../src/main/jsonschema/verbs/checkin.json | 24 + .../src/main/jsonschema/verbs/close.json| 24 + .../src/main/jsonschema/verbs/complete.json | 24 + .../src/main/jsonschema/verbs/confirm.json | 24 + .../src/main/jsonschema/verbs/consume.json | 24 + .../src/main/jsonschema/verbs/create.json
[12/32] incubator-streams git commit: re-enable hive plugin
re-enable hive plugin Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/02dc8efc Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/02dc8efc Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/02dc8efc Branch: refs/heads/STREAMS-389 Commit: 02dc8efc6615142cce4d3ddd62d28c1972c82855 Parents: 9618ada Author: Steve Blackmon @steveblackmon Authored: Tue May 3 16:33:47 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Tue May 3 16:33:47 2016 -0500 -- streams-plugins/pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02dc8efc/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml index 390c8a0..b90e2d5 100644 --- a/streams-plugins/pom.xml +++ b/streams-plugins/pom.xml @@ -36,6 +36,7 @@ +streams-plugin-hive streams-plugin-pojo
[26/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/open.json -- diff --git a/streams-schemas/src/test/resources/activities/open.json b/streams-schemas/src/test/resources/activities/open.json deleted file mode 100644 index 4bf47cd..000 --- a/streams-schemas/src/test/resources/activities/open.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Laura" - }, - "verb": "open", - "object": { -"objectType": "issue", -"displayName": "Issue #126" - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/play.json -- diff --git a/streams-schemas/src/test/resources/activities/play.json b/streams-schemas/src/test/resources/activities/play.json deleted file mode 100644 index 0605662..000 --- a/streams-schemas/src/test/resources/activities/play.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Mark" - }, - "verb": "play", - "object": { -"objectType": "audio", -"displayName": "Call Me Maybe" - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/post.json -- diff --git a/streams-schemas/src/test/resources/activities/post.json b/streams-schemas/src/test/resources/activities/post.json deleted file mode 100644 index 73cfff7..000 --- a/streams-schemas/src/test/resources/activities/post.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "published": "2011-02-10T15:04:55Z", - "actor": { -"url": "http://example.org/martin";, -"objectType" : "person", -"id": "tag:example.org,2011:martin", -"image": { - "url": "http://example.org/martin/image";, - "width": 250, - "height": 250 -}, -"displayName": "Martin Smith" - }, - "verb": "post", - "object" : { -"url": "http://example.org/blog/2011/02/entry";, -"id": "tag:example.org,2011:abc123/xyz" - }, - "target" : { -"url": "http://example.org/blog/";, -"objectType": "blog", -"id": "tag:example.org,2011:abc123", -"displayName": "Martin's Blog" - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/present.json -- diff --git a/streams-schemas/src/test/resources/activities/present.json b/streams-schemas/src/test/resources/activities/present.json deleted file mode 100644 index 8f4df12..000 --- a/streams-schemas/src/test/resources/activities/present.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Laura" - }, - "verb": "present", - "object": { -"objectType": "file", -"displayName": "1Q2013 Sales Forecast.ppt" - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/purchase.json -- diff --git a/streams-schemas/src/test/resources/activities/purchase.json b/streams-schemas/src/test/resources/activities/purchase.json deleted file mode 100644 index 3354597..000 --- a/streams-schemas/src/test/resources/activities/purchase.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; - ], - "actor": { -"objectType": "person", -"displayName": "Mark" - }, - "verb": "purchase", - "object": { -"objectType": "video", -"displayName": "The Avengers" - }, - "title": "Mark purchased the movie, The Avengers" -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/test/resources/activities/qualify.json -- diff --git a/streams-schemas/src/test/resources/activities/qualify.json b/streams-schemas/src/test/resources/activities/qualify.json deleted file mode 100644 index 630bda0..000 --- a/streams-schemas/src/test/resources/activities/qualify.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$license": [ -"http://www.openwebfoundation.org/l
[08/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/approve.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/approve.json b/streams-schemas/src/main/jsonschema/verbs/approve.json new file mode 100644 index 000..ec66f9b --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/approve.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Approve", +"description": "Indicates that the actor has approved the object. For instance, a manager might approve a travel request.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "approve" +}, +"title": { +"type": "string", +"default": "{actor.displayName} approved {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/archive.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/archive.json b/streams-schemas/src/main/jsonschema/verbs/archive.json new file mode 100644 index 000..24aea16 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/archive.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Archive", +"description": "Indicates that the actor has archived the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "archive" +}, +"title": { +"type": "string", +"default": "{actor.displayName} archived {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/assign.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/assign.json b/streams-schemas/src/main/jsonschema/verbs/assign.json new file mode 100644 index 000..8fe5458 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/assign.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Assign", +"description": "Indicates that the actor has assigned the object to the target.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "assign" +}, +"title": { +"type": "string", +"default": "{actor.displayName} assigned {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/at.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/at.json b/streams-schemas/src/main/jsonschema/verbs/at.json new file mode 100644 index 000..42c1222 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/at.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "At", +"description": "Indicates that the actor is currently located at the object. For instance, a person being at a specific physical location.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "assign" +}, +"title": { +"type": "string", +"default": "{actor.displayName} assigned {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/attach.json -- diff --git a/streams-schema
[04/32] incubator-streams git commit: test pom for streams-plugin-pojo
test pom for streams-plugin-pojo Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/eea09756 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/eea09756 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/eea09756 Branch: refs/heads/STREAMS-389 Commit: eea09756b2388acca625e2e752be127874a52599 Parents: 6501b27 Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:27 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Mar 28 08:32:27 2016 -0500 -- .../src/test/resources/streams-plugin-pojo/pom.xml| 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/eea09756/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml index b1de7b8..fbb2864 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml @@ -4,10 +4,10 @@ 4.0.0 org.apache.streams.plugins -streams-plugin-hive-test +streams-plugin-pojo-test 0.3-incubating-SNAPSHOT jar -Test StreamsPojoHiveMojo +Test StreamsPojoMojo @@ -21,18 +21,18 @@ org.apache.streams.plugins -streams-plugin-hive +streams-plugin-pojo 0.3-incubating-SNAPSHOT org.apache.streams.pojo.json -target/test-classes/streams-hive-plugin/ +target/test-classes/streams-pojo-plugin/ -hive +pojo
[05/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/tag.json -- diff --git a/streams-schemas/src/site/resources/verbs/tag.json b/streams-schemas/src/site/resources/verbs/tag.json new file mode 100644 index 000..6208eae --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/tag.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tag", +"description": "Indicates that the actor has associated the object with the target. For example, if the actor specifies that a particular user appears in a photo. the object is the user and the target is the photo.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tag" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tagged {object.displayName} as {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/terminate.json -- diff --git a/streams-schemas/src/site/resources/verbs/terminate.json b/streams-schemas/src/site/resources/verbs/terminate.json new file mode 100644 index 000..280eb31 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/terminate.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Terminate", +"description": "Indicates that the actor has terminated the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "terminate" +}, +"title": { +"type": "string", +"default": "{actor.displayName} terminated {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/tie.json -- diff --git a/streams-schemas/src/site/resources/verbs/tie.json b/streams-schemas/src/site/resources/verbs/tie.json new file mode 100644 index 000..7530ed2 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/tie.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tie", +"description": "Indicates that the actor has neither won or lost the object. This verb is generally only applicable when the object represents some form of competition, such as a game.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tie" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tied at {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/unfavorite.json -- diff --git a/streams-schemas/src/site/resources/verbs/unfavorite.json b/streams-schemas/src/site/resources/verbs/unfavorite.json new file mode 100644 index 000..bfa9c20 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/unfavorite.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnFavorite", +"description": "Indicates that the actor has removed the object from the collection of favorited items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unfavorite" +}, +"title": { +"type": "string", +"default": "{actor.displayName} removed {object.displayName} as a favorite" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda
[22/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/request.json -- diff --git a/streams-util/src/test/resources/activities/request.json b/streams-util/src/test/resources/activities/request.json new file mode 100644 index 000..3e7c285 --- /dev/null +++ b/streams-util/src/test/resources/activities/request.json @@ -0,0 +1,23 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "request", + "object": { +"objectType": "task", +"actor": { + "objectType": "person", + "displayName": "Mark" +}, +"verb": "join", +"object": { + "objectType": "event", + "displayName": "The Big Meeting" +} + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/resolve.json -- diff --git a/streams-util/src/test/resources/activities/resolve.json b/streams-util/src/test/resources/activities/resolve.json new file mode 100644 index 000..14998cf --- /dev/null +++ b/streams-util/src/test/resources/activities/resolve.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "resolve", + "object": { +"objectType": "issue", +"displayName": "Issue #126" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/retract.json -- diff --git a/streams-util/src/test/resources/activities/retract.json b/streams-util/src/test/resources/activities/retract.json new file mode 100644 index 000..9229868 --- /dev/null +++ b/streams-util/src/test/resources/activities/retract.json @@ -0,0 +1,26 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "retract", + "object": { +"actor": { + "objectType": "person", + "displayName": "Mark" +}, +"verb": "return", +"object": { + "objectType": "book", + "displayName": "Cloud Atlas" +}, +"target": { + "objectType": "person", + "displayName": "Laura" +} + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/return.json -- diff --git a/streams-util/src/test/resources/activities/return.json b/streams-util/src/test/resources/activities/return.json new file mode 100644 index 000..d6b8861 --- /dev/null +++ b/streams-util/src/test/resources/activities/return.json @@ -0,0 +1,19 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "return", + "object": { +"objectType": "book", +"displayName": "Cloud Atlas" + }, + "target": { +"objectType": "person", +"displayName": "Laura" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/rsvp-maybe.json -- diff --git a/streams-util/src/test/resources/activities/rsvp-maybe.json b/streams-util/src/test/resources/activities/rsvp-maybe.json new file mode 100644 index 000..b1ec1b5 --- /dev/null +++ b/streams-util/src/test/resources/activities/rsvp-maybe.json @@ -0,0 +1,16 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "rsvp-maybe", + "object": { +"objectType": "event", +"displayName": "The Big Meeting" + }, + "title": "Laura might attend The Big Meeting" +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/test/resources/activities/rsvp-no.json -- diff --git a/streams-util/src/test/resources/activities/rsvp-no.json b/streams-util/src/test/resources/activities/rsvp-no.json new file mode 100644 index 000..532b096 --- /dev/null +++ b/streams-util/src/test/resources/activities/rsvp-no.json @@ -0
[32/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
refactoring, testing, documentation, CLI modes break up streams-schemas into streams-util and streams-schema-activitystreams add index.md to each plugin specify basepath of jsonschema project-wide harmonize plugin behavior, code style, docs ensure all tests pass add CLI modes Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/6187265f Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/6187265f Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/6187265f Branch: refs/heads/STREAMS-389 Commit: 6187265fc0395a8051483ba3b905d976299217a3 Parents: 57f17d7 Author: Steve Blackmon @steveblackmon Authored: Wed Jun 1 12:32:14 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:32:32 2016 -0500 -- streams-components/streams-converters/pom.xml | 2 +- streams-components/streams-http/pom.xml | 2 +- .../streams-persist-kinesis/pom.xml | 2 +- .../streams-persist-s3/pom.xml | 6 +- .../spring/streams-cassandra-context.xml| 25 -- .../streams-persist-elasticsearch/pom.xml | 6 +- .../streams-persist-filebuffer/pom.xml | 2 +- streams-contrib/streams-persist-graph/pom.xml | 2 +- streams-contrib/streams-persist-hbase/pom.xml | 2 +- streams-contrib/streams-persist-hdfs/pom.xml| 2 +- streams-contrib/streams-persist-kafka/pom.xml | 2 +- streams-contrib/streams-persist-mongo/pom.xml | 2 +- .../streams-processor-lucene/pom.xml| 2 +- .../streams-processor-peoplepattern/pom.xml | 2 +- streams-contrib/streams-processor-tika/pom.xml | 2 +- streams-contrib/streams-processor-urls/pom.xml | 2 +- .../streams-provider-datasift/pom.xml | 2 +- .../streams-provider-facebook/pom.xml | 10 +- .../gnip-edc-instagram/pom.xml | 2 +- .../gnip-powertrack/pom.xml | 2 +- .../google-gmail/pom.xml| 2 +- .../google-gplus/pom.xml| 2 +- .../streams-provider-instagram/pom.xml | 4 +- .../streams-provider-moreover/pom.xml | 4 +- streams-contrib/streams-provider-rss/pom.xml| 2 +- .../streams-provider-sysomos/pom.xml| 4 +- .../streams-provider-twitter/pom.xml| 2 +- .../streams-provider-youtube/pom.xml| 2 +- streams-monitoring/pom.xml | 2 +- .../streams-plugin-cassandra/pom.xml| 13 +- .../StreamsCassandraGenerationConfig.java | 2 +- .../StreamsCassandraResourceGenerator.java | 42 +-- .../StreamsCassandraResourceGeneratorMojo.java | 37 +- .../src/site/markdown/index.md | 22 +- ...treamsCassandraResourceGeneratorCLITest.java | 10 +- ...reamsCassandraResourceGeneratorMojoTest.java | 9 +- .../StreamsCassandraResourceGeneratorTest.java | 58 +-- .../resources/streams-plugin-cassandra/pom.xml | 21 +- .../streams-plugin-elasticsearch/pom.xml| 13 +- .../StreamsElasticsearchGenerationConfig.java | 2 +- .../StreamsElasticsearchResourceGenerator.java | 75 ++-- ...reamsElasticsearchResourceGeneratorMojo.java | 29 +- .../src/site/markdown/index.md | 24 +- ...msElasticsearchResourceGeneratorCLITest.java | 39 ++ ...reamsElasticsearchResourceGeneratorTest.java | 59 +-- .../streams-plugin-elasticsearch/pom.xml| 23 +- streams-plugins/streams-plugin-hbase/pom.xml| 13 +- .../hbase/StreamsHbaseGenerationConfig.java | 2 +- .../hbase/StreamsHbaseResourceGenerator.java| 41 +- .../StreamsHbaseResourceGeneratorMojo.java | 28 +- .../src/site/markdown/index.md | 26 +- .../StreamsHbaseResourceGeneratorCLITest.java | 2 +- .../StreamsHbaseResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHbaseResourceGeneratorTest.java | 31 +- .../test/resources/streams-plugin-hbase/pom.xml | 23 +- streams-plugins/streams-plugin-hive/pom.xml | 13 +- .../hive/StreamsHiveGenerationConfig.java | 3 +- .../hive/StreamsHiveResourceGenerator.java | 35 +- .../hive/StreamsHiveResourceGeneratorMojo.java | 38 +- .../src/site/markdown/index.md | 28 +- .../StreamsHiveResourceGeneratorCLITest.java| 2 +- .../StreamsHiveResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHiveResourceGeneratorTest.java | 32 +- .../test/resources/streams-plugin-hive/pom.xml | 23 +- streams-plugins/streams-plugin-pig/pom.xml | 13 +- .../plugins/pig/StreamsPigGenerationConfig.java | 3 +- .../pig/StreamsPigResourceGenerator.java| 46 +-- .../pig/StreamsPigResourceGeneratorMojo.java| 38 +- .../src/site/markdown/index.md | 24 +- .../StreamsPigResourceGeneratorCLITest.java | 4 +- .../StreamsPig
[07/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/terminate.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/terminate.json b/streams-schemas/src/main/jsonschema/verbs/terminate.json new file mode 100644 index 000..280eb31 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/terminate.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Terminate", +"description": "Indicates that the actor has terminated the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "terminate" +}, +"title": { +"type": "string", +"default": "{actor.displayName} terminated {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/tie.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/tie.json b/streams-schemas/src/main/jsonschema/verbs/tie.json new file mode 100644 index 000..7530ed2 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/tie.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tie", +"description": "Indicates that the actor has neither won or lost the object. This verb is generally only applicable when the object represents some form of competition, such as a game.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tie" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tied at {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/unfavorite.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/unfavorite.json b/streams-schemas/src/main/jsonschema/verbs/unfavorite.json new file mode 100644 index 000..bfa9c20 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/unfavorite.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnFavorite", +"description": "Indicates that the actor has removed the object from the collection of favorited items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unfavorite" +}, +"title": { +"type": "string", +"default": "{actor.displayName} removed {object.displayName} as a favorite" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/unlike.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/unlike.json b/streams-schemas/src/main/jsonschema/verbs/unlike.json new file mode 100644 index 000..4dc75f6 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/unlike.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnLike", +"description": "Indicates that the actor has removed the object from the collection of liked items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unlike" +}, +"title": { +"type": "string", +"default": "{actor.displayName} no longer likes {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/main/jsonschema/verbs/unsatisfy.json ---
[23/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java -- diff --git a/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java b/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java new file mode 100644 index 000..d4b2c3f --- /dev/null +++ b/streams-util/src/main/java/org/apache/streams/util/schema/GenerationConfig.java @@ -0,0 +1,116 @@ +package org.apache.streams.util.schema; + +import java.io.File; +import java.io.FileFilter; +import java.net.URL; +import java.util.Iterator; + +/** + * GenerationConfig represents the common fields and field accessors for + * streams modules that transform schemas into generated-sources or generated-resources + */ +public interface GenerationConfig { + +/** + * Gets the 'source' configuration option. + * + * @return The source file(s) or directory(ies) from which JSON Schema will + * be read. + */ +Iterator getSource(); + +/** + * Gets the 'targetDirectory' configuration option. + * + * @return The target directory into which generated types will be written + * (may or may not exist before types are written) + */ +File getTargetDirectory(); + +/** + * Gets the 'outputEncoding' configuration option. + * + * @return The character encoding that should be used when writing output files. + */ +String getOutputEncoding(); + +/** + * Gets the file filter used to isolate the schema mapping files in the + * source directories. + * + * @return the file filter use when scanning for schema files. + */ +FileFilter getFileFilter(); + +/** + * Gets the 'includeAdditionalProperties' configuration option. + * + * @return Whether to allow 'additional properties' support in objects. + * Setting this to false will disable additional properties support, + * regardless of the input schema(s). + */ +//boolean isIncludeAdditionalProperties(); + +/** + * Gets the 'targetVersion' configuration option. + * + * @return The target version for generated source files. + */ +//String getTargetVersion(); + +///** +// * Gets the `includeDynamicAccessors` configuraiton option. +// * +// * @return Whether to include dynamic getters, setters, and builders +// * or to omit these methods. +// */ +//boolean isIncludeDynamicAccessors(); + +///** +// * Gets the `dateTimeType` configuration option. +// * +// * Example values: +// * +// * org.joda.time.LocalDateTime (Joda) +// * java.time.LocalDateTime (JSR310) +// * null (default behavior) +// * +// * +// * @return The java type to use instead of {@link java.util.Date} +// * when adding date type fields to generate Java types. +// */ +//String getDateTimeType(); +// +///** +// * Gets the `dateType` configuration option. +// * +// * Example values: +// * +// * org.joda.time.LocalDate (Joda) +// * java.time.LocalDate (JSR310) +// * null (default behavior) +// * +// * +// * @return The java type to use instead of string +// * when adding string type fields with a format of date (not +// * date-time) to generated Java types. +// */ +//String getDateType(); +// +///** +// * Gets the `timeType` configuration option. +// * +// * Example values: +// * +// * org.joda.time.LocalTime (Joda) +// * java.time.LocalTime (JSR310) +// * null (default behavior) +// * +// * +// * @return The java type to use instead of string +// * when adding string type fields with a format of time (not +// * date-time) to generated Java types. +// */ +//String getTimeType(); + +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java -- diff --git a/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java b/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java new file mode 100644 index 000..fc0a3f2 --- /dev/null +++ b/streams-util/src/main/java/org/apache/streams/util/schema/Schema.java @@ -0,0 +1,57 @@ +package org.apache.streams.util.schema; + +import com.fasterxml.jackson.databind.JsonNode; + +import java.net.URI; + +/** + * A JSON Schema document. + */ +public class Schema { + +private final URI id; +private final URI uri; +private final JsonNode content; +
[01/32] incubator-streams git commit: start of implementation for STREAMS-398
Repository: incubator-streams Updated Branches: refs/heads/STREAMS-389 [created] 6187265fc start of implementation for STREAMS-398 Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/f0a3518e Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/f0a3518e Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/f0a3518e Branch: refs/heads/STREAMS-389 Commit: f0a3518ef7e89f4b3ce2ebc3b0141ef240c00c72 Parents: c2229a4 Author: Steve Blackmon (@steveblackmon) Authored: Tue Dec 29 17:19:15 2015 -0600 Committer: Steve Blackmon (@steveblackmon) Committed: Tue Dec 29 17:19:15 2015 -0600 -- streams-plugins/pom.xml | 56 streams-plugins/streams-plugin-hive/pom.xml | 232 +++ .../apache/streams/plugins/StreamsPojoHive.java | 242 +++ .../streams/plugins/StreamsPojoHiveMojo.java| 71 + .../plugins/test/StreamsPojoHiveTest.java | 55 .../src/test/resources/Tweet.hql| 297 +++ .../test/resources/streams-plugin-hive/pom.xml | 42 +++ 7 files changed, 995 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/f0a3518e/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml new file mode 100644 index 000..2306aab --- /dev/null +++ b/streams-plugins/pom.xml @@ -0,0 +1,56 @@ + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +streams-project +org.apache.streams +0.3-incubating-SNAPSHOT +../pom.xml + + +streams-plugins + +pom +streams-plugins + + + + + + +streams-plugin-scala + + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-pojo +${project.version} + + + + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/f0a3518e/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml new file mode 100644 index 000..cbc055b --- /dev/null +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -0,0 +1,232 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-hive +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT +.. + + + +1.14 + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-core +${project.version} + + +org.jsonschema2pojo +jsonschema2pojo-core + + +org.apache.streams +streams-pojo +${project.version} +test +test-jar + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +
[13/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/install.json -- diff --git a/streams-schemas/src/test/resources/activities/install.json b/streams-schemas/src/test/resources/activities/install.json new file mode 100644 index 000..1ecdecd --- /dev/null +++ b/streams-schemas/src/test/resources/activities/install.json @@ -0,0 +1,18 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "install", + "object": { +"objectType": "application", +"displayName": "Approved Software Scanning Tool", +"location": { + "displayName": "All computers in Building A" +} + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/interact.json -- diff --git a/streams-schemas/src/test/resources/activities/interact.json b/streams-schemas/src/test/resources/activities/interact.json new file mode 100644 index 000..f427513 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/interact.json @@ -0,0 +1,16 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Bob" + }, + "verb": "interact", + "object": { +"objectType": "person", +"displayName": "Laura" + }, + "title": "Bob called Laura." +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/invite.json -- diff --git a/streams-schemas/src/test/resources/activities/invite.json b/streams-schemas/src/test/resources/activities/invite.json new file mode 100644 index 000..7c84b78 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/invite.json @@ -0,0 +1,19 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "invite", + "object": { +"objectType": "person", +"displayName": "Mark" + }, + "target": { +"objectType": "event", +"displayName": "Job Interview" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/join.json -- diff --git a/streams-schemas/src/test/resources/activities/join.json b/streams-schemas/src/test/resources/activities/join.json new file mode 100644 index 000..7996a9b --- /dev/null +++ b/streams-schemas/src/test/resources/activities/join.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "join", + "object": { +"objectType": "organization", +"displayName": "Acme, Co" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/leave.json -- diff --git a/streams-schemas/src/test/resources/activities/leave.json b/streams-schemas/src/test/resources/activities/leave.json new file mode 100644 index 000..08516c5 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/leave.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "leave", + "object": { +"objectType": "organization", +"displayName": "Other, Co" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/test/resources/activities/like.json -- diff --git a/streams-schemas/src/test/resources/activities/like.json b/streams-schemas/src/test/resources/activities/like.json new file mode 100644 index 000..853676f --- /dev/null +++ b/streams-schemas/src/test/resources/activities/like.json @@ -0,0 +1,22 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "like", + "ob
[16/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/join.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/join.json b/streams-schemas/src/main/jsonschema/verbs/join.json index 78daed8..5276072 100644 --- a/streams-schemas/src/main/jsonschema/verbs/join.json +++ b/streams-schemas/src/main/jsonschema/verbs/join.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/join.json#";, "type": "object", "title": "Join", "description": "Indicates that the actor has become a member of the object.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/leave.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/leave.json b/streams-schemas/src/main/jsonschema/verbs/leave.json index 1ce73bc..9995099 100644 --- a/streams-schemas/src/main/jsonschema/verbs/leave.json +++ b/streams-schemas/src/main/jsonschema/verbs/leave.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/leave.json#";, "type": "object", "title": "Leave", "description": "Indicates that the actor has left the object. For instance, a Person leaving a Group or checking-out of a Place.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/like.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/like.json b/streams-schemas/src/main/jsonschema/verbs/like.json index 4ac1bf7..d583305 100644 --- a/streams-schemas/src/main/jsonschema/verbs/like.json +++ b/streams-schemas/src/main/jsonschema/verbs/like.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/like.json#";, "type": "object", "title": "Like", "description": "Indicates that the actor marked the object as an item of special interest.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/listen.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/listen.json b/streams-schemas/src/main/jsonschema/verbs/listen.json index 3476144..9982ac6 100644 --- a/streams-schemas/src/main/jsonschema/verbs/listen.json +++ b/streams-schemas/src/main/jsonschema/verbs/listen.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/listen.json#";, "type": "object", "title": "Listen", "description": "Indicates that the actor has listened to the object. This is typically only applicable for objects representing audio content, such as music, an audio-book, or a radio broadcast.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/lose.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/lose.json b/streams-schemas/src/main/jsonschema/verbs/lose.json index 60899ba..1d959a4 100644 --- a/streams-schemas/src/main/jsonschema/verbs/lose.json +++ b/streams-schemas/src/main/jsonschema/verbs/lose.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/lose.json#";, "type": "object", "title": "Lose", "description": "Indicates that the actor has lost the object. For instance, if a person loses a game.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/jsonschema/verbs/make-friend.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/make-friend.json b/streams-schemas/src/main/jsonschema/verbs/make-friend.json index a64
[19/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-elasticsearch/pom.xml -- diff --git a/streams-plugins/streams-plugin-elasticsearch/pom.xml b/streams-plugins/streams-plugin-elasticsearch/pom.xml new file mode 100644 index 000..4f0ed4a --- /dev/null +++ b/streams-plugins/streams-plugin-elasticsearch/pom.xml @@ -0,0 +1,245 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-elasticsearch +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT +.. + + + +2.3.0 +5.4.0 + + + + +org.apache.streams +streams-config +${project.version} + + +commons-logging +commons-logging + + + + +org.apache.streams +streams-core +${project.version} + + +org.apache.streams +streams-schemas +${project.version} + + +com.google.guava +guava + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.apache.maven.shared +maven-verifier +1.6 +test + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +commons-logging +commons-logging + + + + +org.apache.maven.plugin-tools +maven-plugin-tools-api +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-annotations +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-tools-generators +3.3 + + +org.apache.maven.plugin-testing +maven-plugin-testing-harness +3.3.0 +test + + +junit +junit +test + + +commons-lang +commons-lang +2.6 + + +joda-time +joda-time +2.2 + + +org.joda +joda-convert +1.8.1 + + + + +src/main/java +src/test/java + + +src/main/resources + + + + +src/test/resources + + + + +maven-plugin-plugin +3.4 + + true + + + +mojo-descriptor +process-classes + +descriptor + + + + + +org.reflections +reflections-maven + + + +reflections + +process-classes + + + + +org.apache.maven.plugins +maven-dependency-plugin +2.4 + + +resource-dependencies +process-test-resources +
[29/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java -- diff --git a/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java b/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java deleted file mode 100644 index 53f0a98..000 --- a/streams-schemas/src/main/java/org/apache/streams/schema/FileUtil.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.apache.streams.schema; - -import com.google.common.base.Preconditions; -import com.google.common.base.Strings; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.Arrays; -import java.util.List; - -/** - * Created by steve on 5/1/16. - */ -public class FileUtil { - -private final static Logger LOGGER = LoggerFactory.getLogger(FileUtil.class); - -public static String dropSourcePathPrefix(String inputFile, String sourceDirectory) { -if(Strings.isNullOrEmpty(sourceDirectory)) -return inputFile; -else { -try { -if( inputFile.contains(sourceDirectory) && inputFile.indexOf(sourceDirectory) > 0) { -return inputFile.substring(inputFile.indexOf(sourceDirectory)+sourceDirectory.length()+1); -} -} catch( Throwable e ) { -return inputFile; -} -} -return inputFile; -} - -public static String swapExtension(String inputFile, String originalExtension, String newExtension) { -if(inputFile.endsWith("."+originalExtension)) -return inputFile.replace("."+originalExtension, "."+newExtension); -else return inputFile; -} - -public static String dropExtension(String inputFile) { -if(inputFile.contains(".")) -return inputFile.substring(0, inputFile.lastIndexOf(".")); -else return inputFile; -} - -public static void writeFile(String resourceFile, String resourceContent) { -try { -File path = new File(resourceFile); -File dir = path.getParentFile(); -if( !dir.exists() ) -dir.mkdirs(); -Files.write(Paths.get(resourceFile), resourceContent.getBytes(), StandardOpenOption.CREATE_NEW); -} catch (Exception e) { -LOGGER.error("Write Exception: {}", e); -} -} - -public static void resolveRecursive(GenerationConfig config, List schemaFiles) { - -Preconditions.checkArgument(schemaFiles.size() > 0); -int i = 0; -while( schemaFiles.size() > i) { -File child = schemaFiles.get(i); -if (child.isDirectory()) { - schemaFiles.addAll(Arrays.asList(child.listFiles(config.getFileFilter(; -schemaFiles.remove(child); -} else { -i += 1; -} -} - -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java -- diff --git a/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java b/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java deleted file mode 100644 index ec77367..000 --- a/streams-schemas/src/main/java/org/apache/streams/schema/GenerationConfig.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.apache.streams.schema; - -import java.io.File; -import java.io.FileFilter; -import java.net.URL; -import java.util.Iterator; - -/** - * Created by sblackmon on 5/3/16. - */ -public interface GenerationConfig { - -/** - * Gets the 'source' configuration option. - * - * @return The source file(s) or directory(ies) from which JSON Schema will - * be read. - */ -Iterator getSource(); - -/** - * Gets the 'targetDirectory' configuration option. - * - * @return The target directory into which generated types will be written - * (may or may not exist before types are written) - */ -File getTargetDirectory(); - -/** - * Gets the 'outputEncoding' configuration option. - * - * @return The character encoding that should be used when writing output files. - */ -String getOutputEncoding(); - -/** - * Gets the file filter used to isolate the schema mapping files in the - * source directories. - * - * @return the file filter use when scanning for schema files. - */ -FileFilter getFileFilter(); - -/** - * Gets the 'includeAdditionalProperties' configuration option. - * - * @return Whether to allow 'additional properties' support in objects. - * Setting this to false
[14/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/read.json -- diff --git a/streams-schemas/src/site/resources/verbs/read.json b/streams-schemas/src/site/resources/verbs/read.json deleted file mode 100644 index e797f41..000 --- a/streams-schemas/src/site/resources/verbs/read.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Read", -"description": "Indicates that the actor read the object. This is typically only applicable for objects representing printed or written content, such as a book, a message or a comment.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "read" -}, -"title": { -"type": "string", -"default": "{actor.displayName} read {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/receive.json -- diff --git a/streams-schemas/src/site/resources/verbs/receive.json b/streams-schemas/src/site/resources/verbs/receive.json deleted file mode 100644 index 0d44aef..000 --- a/streams-schemas/src/site/resources/verbs/receive.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Receive", -"description": "Indicates that the actor is receiving an object. Examples include a person receiving a badge object. The object identifies the object being received.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "receive" -}, -"title": { -"type": "string", -"default": "{actor.displayName} received {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/reject.json -- diff --git a/streams-schemas/src/site/resources/verbs/reject.json b/streams-schemas/src/site/resources/verbs/reject.json deleted file mode 100644 index b82fac7..000 --- a/streams-schemas/src/site/resources/verbs/reject.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Reject", -"description": "Indicates that the actor has rejected the object.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "reject" -}, -"title": { -"type": "string", -"default": "{actor.displayName} rejected {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/remove-friend.json -- diff --git a/streams-schemas/src/site/resources/verbs/remove-friend.json b/streams-schemas/src/site/resources/verbs/remove-friend.json deleted file mode 100644 index 073441d..000 --- a/streams-schemas/src/site/resources/verbs/remove-friend.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "UnFriend", -"description": "Indicates that the actor has removed the object from the collection of friends.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "remove-friend" -}, -"title": { -"type": "string", -"default": "{actor.displayName} removed friend {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/verbs/remove.json
[30/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/site/markdown/index.md -- diff --git a/streams-plugins/streams-plugin-pig/src/site/markdown/index.md b/streams-plugins/streams-plugin-pig/src/site/markdown/index.md index d0d4791..5ab4375 100644 --- a/streams-plugins/streams-plugin-pig/src/site/markdown/index.md +++ b/streams-plugins/streams-plugin-pig/src/site/markdown/index.md @@ -3,17 +3,33 @@ org.apache.streams.plugins:streams-plugin-pig streams-plugin-pig generates resources from json schemas to assist with analysis of json data using Apache Pig. - Usage +### Usage + +Output will be placed in target/generated-resources/pig by default + +# Maven Run within a module containing a src/main/jsonschema directory mvn org.apache.streams.plugins:streams-plugin-pig:0.3-incubating-SNAPSHOT:pig -Output will be placed in target/generated-resources/pig by default +[streams-plugin-pig/pom.xml](streams-plugin-pig/pom.xml "streams-plugin-pig/pom.xml") - Example +# SDK -[streams-plugin-pig/pom.xml](streams-plugin-pig/pom.xml "streams-plugin-pig/pom.xml") +Embed within your own java code + +StreamsPigGenerationConfig config = new StreamsPigGenerationConfig(); +config.setSourceDirectory("src/main/jsonschema"); +config.setTargetDirectory("target/generated-resources"); +StreamsPigGenerationConfig generator = new StreamsPigGenerationConfig(config); +generator.run(); + +# CLI + +Run from CLI without Maven + +java -jar streams-plugin-pig-jar-with-dependencies.jar StreamsPigResourceGenerator src/main/jsonschema target/generated-resources Documentation http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java -- diff --git a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java index c94bca9..8190d50 100644 --- a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java +++ b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorCLITest.java @@ -19,8 +19,8 @@ public class StreamsPigResourceGeneratorCLITest { @Test public void testStreamsPigResourceGeneratorCLI() throws Exception { -String sourceDirectory = "target/test-classes/streams-schemas"; -String targetDirectory = "target/generated-resources/hive-cli"; +String sourceDirectory = "target/test-classes/streams-schema-activitystreams"; +String targetDirectory = "target/generated-resources/pig-cli"; List argsList = Lists.newArrayList(sourceDirectory, targetDirectory); StreamsPigResourceGenerator.main(argsList.toArray(new String[0])); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java -- diff --git a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java index 401c506..76c4eb2 100644 --- a/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java +++ b/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/StreamsPigResourceGeneratorMojoTest.java @@ -31,7 +31,7 @@ public class StreamsPigResourceGeneratorMojoTest extends TestCase { @Test -public void testStreamsHiveResourceGeneratorMojo() throws Exception { +public void testStreamsPigResourceGeneratorMojo() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/streams-plugin-pig" ); @@ -50,7 +50,7 @@ public class StreamsPigResourceGeneratorMojoTest extends TestCase { verifier.resetStreams(); -File testOutput = new File(testDir.getAbsolutePath() + "/target/generated-resources/test-mojo"); +File testOutput = new File(testDir.getAbsolutePath() + "/target/generated-resources/pig-mojo"); assert( testOutput != null ); assert( testOutput.exists() == true ); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-pig/src/test/java/org/apache/streams/plugins/pig/test/Stre
[18/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml -- diff --git a/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml b/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml new file mode 100644 index 000..9aa7d8d --- /dev/null +++ b/streams-plugins/streams-plugin-hbase/src/test/resources/streams-plugin-hbase/pom.xml @@ -0,0 +1,76 @@ +http://maven.apache.org/POM/4.0.0"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.streams.plugins +streams-plugin-hbase-test +0.3-incubating-SNAPSHOT +jar +Test StreamsHbaseResourceGeneratorMojo + + + +junit +junit +4.11 +test + + +org.apache.streams +streams-schemas +${project.version} +test + + + + + + +org.apache.streams.plugins +streams-plugin-hbase +0.3-incubating-SNAPSHOT + + + target/test-classes/streams-schemas/activity.json + target/test-classes/streams-schemas/collection.json + target/test-classes/streams-schemas/media_link.json + target/test-classes/streams-schemas/object.json + target/test-classes/streams-schemas/objectTypes + target/test-classes/streams-schemas/verbs + + target/generated-resources/test-mojo +cf + + + + +hbase + + + + + +org.apache.maven.plugins +maven-dependency-plugin +2.10 + +**/*.json + ${project.build.directory}/test-classes/streams-schemas +org.apache.streams +streams-schemas +jar,test-jar + + + +unpack-schemas +process-resources + +unpack-dependencies + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml index b173a8d..515314a 100644 --- a/streams-plugins/streams-plugin-hive/pom.xml +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -148,6 +148,12 @@ test +org.apache.maven.shared +maven-verifier +1.6 +test + + junit junit test http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java index 06c1499..c09f7dd 100644 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java +++ b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/hive/StreamsHiveResourceGenerator.java @@ -46,12 +46,11 @@ public class StreamsHiveResourceGenerator implements Runnable { private int currentDepth = 0; -public void main(String[] args) { +public static void main(String[] args) { StreamsHiveGenerationConfig config = new StreamsHiveGenerationConfig(); -String sourceDirectory = "./target/test-classes/activities"; -String targetDirectory = "./target/generated-sources/streams-plugin-hive"; -String targetPackage = ""; +String sourceDirectory = "src/main/jsonschema"; +String targetDirectory = "target/generated-resources/hive"; if( args.length > 0 ) sourceDirectory = args[0]; http://git-wip-us.apache.org/repos/a
[20/32] incubator-streams git commit: WIP for apachecon
WIP for apachecon Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/95a02d71 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/95a02d71 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/95a02d71 Branch: refs/heads/STREAMS-389 Commit: 95a02d71c8b28ffda7ef37a151efd896d65b1223 Parents: 02dc8ef Author: Steve Blackmon @steveblackmon Authored: Fri May 6 19:45:12 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Fri May 6 19:45:12 2016 -0500 -- pom.xml | 10 - streams-config/pom.xml | 8 +- .../spring/streams-cassandra-context.xml| 25 ++ .../src/main/jsonschema/com/twitter/tweet.json | 6 +- streams-plugins/pom.xml | 4 + .../streams-plugin-cassandra/pom.xml| 244 .../StreamsCassandraGenerationConfig.java | 81 .../StreamsCassandraResourceGenerator.java | 376 +++ .../StreamsCassandraResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ ...treamsCassandraResourceGeneratorCLITest.java | 50 +++ ...reamsCassandraResourceGeneratorMojoTest.java | 75 .../StreamsCassandraResourceGeneratorTest.java | 124 ++ .../resources/streams-plugin-cassandra/pom.xml | 75 .../streams-plugin-elasticsearch/pom.xml| 245 .../StreamsElasticsearchGenerationConfig.java | 81 .../StreamsElasticsearchResourceGenerator.java | 373 ++ ...reamsElasticsearchResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ ...sElasticsearchResourceGeneratorMojoTest.java | 50 +++ ...reamsElasticsearchResourceGeneratorTest.java | 139 +++ .../streams-plugin-elasticsearch/pom.xml| 75 streams-plugins/streams-plugin-hbase/pom.xml| 244 .../hbase/StreamsHbaseGenerationConfig.java | 90 + .../hbase/StreamsHbaseResourceGenerator.java| 204 ++ .../StreamsHbaseResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ .../StreamsHbaseResourceGeneratorCLITest.java | 41 ++ .../StreamsHbaseResourceGeneratorMojoTest.java | 65 .../test/StreamsHbaseResourceGeneratorTest.java | 125 ++ .../test/resources/streams-plugin-hbase/pom.xml | 76 streams-plugins/streams-plugin-hive/pom.xml | 6 + .../hive/StreamsHiveResourceGenerator.java | 7 +- .../hive/StreamsHiveResourceGeneratorMojo.java | 33 +- .../src/site/markdown/index.md | 22 ++ .../StreamsHiveResourceGeneratorCLITest.java| 41 ++ .../StreamsHiveResourceGeneratorMojoTest.java | 64 .../test/StreamsHiveResourceGeneratorTest.java | 21 +- .../test/resources/streams-plugin-hive/pom.xml | 41 +- streams-plugins/streams-plugin-pig/pom.xml | 244 .../plugins/pig/StreamsPigGenerationConfig.java | 84 + .../pig/StreamsPigResourceGenerator.java| 317 .../pig/StreamsPigResourceGeneratorMojo.java| 93 + .../src/site/markdown/index.md | 22 ++ .../StreamsPigResourceGeneratorCLITest.java | 39 ++ .../StreamsPigResourceGeneratorMojoTest.java| 64 .../test/StreamsPigResourceGeneratorTest.java | 122 ++ .../src/test/resources/expected/media_link.pig | 1 + .../resources/expected/objectTypes/file.pig | 1 + .../expected/objectTypes/photo-album.pig| 1 + .../test/resources/streams-plugin-pig/pom.xml | 75 streams-plugins/streams-plugin-pojo/pom.xml | 7 - .../plugins/StreamsPojoSourceGenerator.java | 16 +- .../plugins/StreamsPojoSourceGeneratorMojo.java | 43 +-- .../src/site/markdown/index.md | 22 ++ .../test/StreamsPojoSourceGeneratorCLITest.java | 43 +++ .../StreamsPojoSourceGeneratorMojoTest.java | 68 +--- .../test/StreamsPojoSourceGeneratorTest.java| 28 +- .../test/resources/streams-plugin-pojo/pom.xml | 1 + .../org/apache/streams/schema/FieldUtil.java| 30 ++ .../org/apache/streams/schema/FileUtil.java | 13 +- .../apache/streams/schema/GenerationConfig.java | 4 +- .../org/apache/streams/schema/SchemaUtil.java | 4 +- .../src/main/jsonschema/activity.json | 10 +- .../src/main/jsonschema/collection.json | 2 +- .../src/main/jsonschema/media_link.json | 2 +- streams-schemas/src/main/jsonschema/object.json | 6 +- .../src/main/jsonschema/objectTypes/alert.json | 2 +- .../jsonschema/objectTypes/application.json | 2 +- .../main/jsonschema/objectTypes/article.json| 2 +- .../src/main/jsonschema/objectTypes/audio.json | 2 +- .../src/main/jsonschema/objectTypes/badge.json | 2 +- .../src/main/jso
[24/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json new file mode 100644 index 000..9995099 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/leave.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/leave.json#";, +"type": "object", +"title": "Leave", +"description": "Indicates that the actor has left the object. For instance, a Person leaving a Group or checking-out of a Place.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "leave" +}, +"title": { +"type": "string", +"default": "{actor.displayName} left {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json new file mode 100644 index 000..d583305 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/like.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/like.json#";, +"type": "object", +"title": "Like", +"description": "Indicates that the actor marked the object as an item of special interest.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "like" +}, +"title": { +"type": "string", +"default": "{actor.displayName} likes {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json new file mode 100644 index 000..9982ac6 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/listen.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/listen.json#";, +"type": "object", +"title": "Listen", +"description": "Indicates that the actor has listened to the object. This is typically only applicable for objects representing audio content, such as music, an audio-book, or a radio broadcast.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "listen" +}, +"title": { +"type": "string", +"default": "{actor.displayName} listened to {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json new file mode 100644 index 000..1d959a4 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/verbs/lose.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.open
[15/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/note.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/note.json b/streams-schemas/src/site/resources/objectTypes/note.json deleted file mode 100644 index 09de97c..000 --- a/streams-schemas/src/site/resources/objectTypes/note.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "note", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "note" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/offer.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/offer.json b/streams-schemas/src/site/resources/objectTypes/offer.json deleted file mode 100644 index 38db718..000 --- a/streams-schemas/src/site/resources/objectTypes/offer.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "offer", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "offer" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/organization.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/organization.json b/streams-schemas/src/site/resources/objectTypes/organization.json deleted file mode 100644 index a3fd5a2..000 --- a/streams-schemas/src/site/resources/objectTypes/organization.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "organization", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "organization" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/page.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/page.json b/streams-schemas/src/site/resources/objectTypes/page.json deleted file mode 100644 index 4f76aa2..000 --- a/streams-schemas/src/site/resources/objectTypes/page.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "page", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "page" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/site/resources/objectTypes/permission.json -- diff --git a/streams-schemas/src/site/resources/objectTypes/permission.json b/streams-schemas/src/site/resources/objectTypes/permission.json deleted file mode 100644 index 32b395c..000 --- a/streams-schemas/src/site/resources/objectTypes/permission.json +++ /dev/null @@ -1,36 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "permission", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "permission" -}, -"scope": { -"type": "object", -"extends": { - "$ref": "../object.json" -} -}, -"actions":
[27/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json b/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json deleted file mode 100644 index 6339f1e..000 --- a/streams-schemas/src/main/jsonschema/verbs/rsvp-no.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/rsvp-no.json#";, -"type": "object", -"title": "Rsvp No", -"description": "To indicate that the actor will not attend an event", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "rsvp-no" -}, -"title": { -"type": "string", -"default": "{actor.displayName} will not attend {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json b/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json deleted file mode 100644 index 7fecc78..000 --- a/streams-schemas/src/main/jsonschema/verbs/rsvp-yes.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/rsvp-yes.json#";, -"type": "object", -"title": "Rsvp Yes", -"description": "To indicate that the actor will attend an event", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "rsvp-yes" -}, -"title": { -"type": "string", -"default": "{actor.displayName} is attending {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/satisfy.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/satisfy.json b/streams-schemas/src/main/jsonschema/verbs/satisfy.json deleted file mode 100644 index 9c36006..000 --- a/streams-schemas/src/main/jsonschema/verbs/satisfy.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/satisfy.json#";, -"type": "object", -"title": "Satisfy", -"description": "Indicates that the actor has satisfied the object. If a target is specified, it indicate the context within which the object was satisfied. For instance, if a person satisfies the requirements for a particular challenge, the person is the actor; the requirement is the object; and the challenge is the target.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "satisfy" -}, -"title": { -"type": "string", -"default": "{actor.displayName} has satisfied {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/save.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/save.json b/streams-schemas/src/main/jsonschema/verbs/save.json deleted file mode 100644 index 06ec16f..000 --- a/streams-schemas/src/main/jsonschema/verbs/save.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/save.json#";, -"type": "object", -"title": "Save", -"description": "Indicates that the actor has called out the object as being of interest prim
[17/32] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java b/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java index 667661f..8d904af 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java +++ b/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java @@ -1,14 +1,19 @@ package org.apache.streams.plugins.test; +import com.google.common.base.Predicate; import com.google.common.collect.Lists; +import com.google.common.io.Files; import org.apache.streams.plugins.StreamsPojoGenerationConfig; import org.apache.streams.plugins.StreamsPojoSourceGenerator; +import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; import java.io.File; import java.io.FileFilter; +import java.util.Collection; import java.util.List; /** @@ -18,6 +23,15 @@ public class StreamsPojoSourceGeneratorTest { private final static Logger LOGGER = LoggerFactory.getLogger(StreamsPojoSourceGeneratorTest.class); +public static final Predicate javaFilter = new Predicate() { +@Override +public boolean apply(@Nullable File file) { +if( file.getName().endsWith(".java") ) +return true; +else return false; +} +}; + /** * Tests that all example activities can be loaded into Activity beans * @@ -54,18 +68,16 @@ public class StreamsPojoSourceGeneratorTest { } File testOutput = new File( "target/generated-sources/test"); -FileFilter javaFilter = new FileFilter() { -@Override -public boolean accept(File pathname) { -if( pathname.getName().endsWith(".java") ) -return true; -return false; -} -}; assert( testOutput != null ); assert( testOutput.exists() == true ); assert( testOutput.isDirectory() == true ); + +Iterable outputIterator = Files.fileTreeTraverser().breadthFirstTraversal(testOutput) +.filter(javaFilter); +Collection outputCollection = Lists.newArrayList(outputIterator); +assert( outputCollection.size() > 133 ); + //assert( testOutput.listFiles(javaFilter).length == 11 ); //assert( new File(testOutput + "/traits").exists() == true ); //assert( new File(testOutput + "/traits").isDirectory() == true ); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml index 359179e..21fd50e 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml @@ -104,6 +104,7 @@ org.codehaus.mojo build-helper-maven-plugin +1.8 add-source http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/95a02d71/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java -- diff --git a/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java b/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java index 5f83767..4173e50 100644 --- a/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java +++ b/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java @@ -1,11 +1,20 @@ package org.apache.streams.schema; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * Created by steve on 5/1/16. */ public class FieldUtil { + public static FieldType determineFieldType(ObjectNode fieldNode) { String typeSchemaField = "type"; if( !fieldNode.has(typeSchemaField)) @@ -26,4 +35,25 @@ public class FieldUtil { } else return null; }
[25/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json new file mode 100644 index 000..63445d5 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/note.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/note.json#";, +"type": "object", +"title": "note", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "note" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json new file mode 100644 index 000..6d4b5f2 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/offer.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/offer.json#";, +"type": "object", +"title": "offer", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "offer" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json new file mode 100644 index 000..7ee7513 --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/organization.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/organization.json#";, +"type": "object", +"title": "organization", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "organization" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json -- diff --git a/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json new file mode 100644 index 000..4f18fcf --- /dev/null +++ b/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/page.json @@ -0,0 +1,19 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/page.json#";, +"type": "object", +"title": "page", +"extends": { +"$ref": "../object.json" +}, +"properties": { +"objectType": { +"type": "string", +"default": "page" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/streams-schema-activitystreams/src/main/jsonschema/objectTypes/permission.json --
[02/32] incubator-streams git commit: create streams-plugin-pojo
create streams-plugin-pojo Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/1c78ecc7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/1c78ecc7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/1c78ecc7 Branch: refs/heads/STREAMS-389 Commit: 1c78ecc7fe7bf72dad6cd204cffc4fae1ac4b41b Parents: f0a3518 Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:00 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Mar 28 08:32:00 2016 -0500 -- pom.xml | 5 + streams-plugins/pom.xml | 2 +- streams-plugins/streams-plugin-hive/pom.xml | 5 +- .../plugins/StreamsHiveResourceGenerator.java | 219 +++ .../StreamsHiveResourceGeneratorMojo.java | 68 + .../apache/streams/plugins/StreamsPojoHive.java | 242 - .../streams/plugins/StreamsPojoHiveMojo.java| 71 - .../test/StreamsHiveResourceGeneratorTest.java | 55 .../plugins/test/StreamsPojoHiveTest.java | 55 streams-plugins/streams-plugin-pojo/pom.xml | 239 .../plugins/StreamsPojoGenerationConfig.java| 198 ++ .../plugins/StreamsPojoSourceGeneratorMojo.java | 272 +++ .../test/StreamsPojoSourceGeneratorTest.java| 54 .../test/resources/streams-plugin-pojo/pom.xml | 42 +++ 14 files changed, 1156 insertions(+), 371 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/pom.xml -- diff --git a/pom.xml b/pom.xml index 74e5cf4..b284ae2 100644 --- a/pom.xml +++ b/pom.xml @@ -175,6 +175,7 @@ streams-osgi-components streams-pojo streams-pojo-extensions +streams-plugins streams-runtimes streams-testing streams-util @@ -183,6 +184,10 @@ pom + +0.4.22 + + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml index 2306aab..390c8a0 100644 --- a/streams-plugins/pom.xml +++ b/streams-plugins/pom.xml @@ -36,7 +36,7 @@ -streams-plugin-scala +streams-plugin-pojo http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml index cbc055b..22d75ce 100644 --- a/streams-plugins/streams-plugin-hive/pom.xml +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -213,19 +213,20 @@ 2.4 -streams-pojo-resource-dependencies +resource-dependencies process-test-resources unpack-dependencies streams-pojo - org/apache/streams/pojo/json/** +**/*.json ${project.build.directory}/test-classes + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1c78ecc7/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java new file mode 100644 index 000..4edacf0 --- /dev/null +++ b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java @@ -0,0 +1,219 @@ +package org.apache.streams.plugins; + +import com.google.common.base.Strings; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import org.reflections.ReflectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.Serializable; +import java.lang.reflect.Field; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/**
[31/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java -- diff --git a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java index d46eaa6..daf85ae 100644 --- a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java +++ b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java @@ -1,15 +1,12 @@ package org.apache.streams.plugins.cassandra.test; -import com.google.common.base.Charsets; import com.google.common.base.Predicate; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.common.io.Files; -import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.apache.streams.plugins.cassandra.StreamsCassandraGenerationConfig; import org.apache.streams.plugins.cassandra.StreamsCassandraResourceGenerator; -import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,10 +16,6 @@ import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import static org.apache.streams.schema.FileUtil.dropSourcePathPrefix; /** * Test that cassandra resources are generated. @@ -50,28 +43,20 @@ public class StreamsCassandraResourceGeneratorTest { StreamsCassandraGenerationConfig config = new StreamsCassandraGenerationConfig(); -String sourceDirectory = "target/test-classes/streams-schemas"; +String sourceDirectory = "target/test-classes/streams-schema-activitystreams"; config.setSourceDirectory(sourceDirectory); -config.setTargetDirectory("target/generated-sources/test"); +config.setTargetDirectory("target/generated-resources/cassandra"); config.setExclusions(Sets.newHashSet("attachments")); config.setMaxDepth(2); StreamsCassandraResourceGenerator streamsCassandraResourceGenerator = new StreamsCassandraResourceGenerator(config); -Thread thread = new Thread(streamsCassandraResourceGenerator); -thread.start(); -try { -thread.join(); -} catch (InterruptedException e) { -LOGGER.error("InterruptedException", e); -} catch (Exception e) { -LOGGER.error("Exception", e); -} +streamsCassandraResourceGenerator.run(); -File testOutput = new File( "./target/generated-sources/test"); +File testOutput = config.getTargetDirectory(); assert( testOutput != null ); assert( testOutput.exists() == true ); @@ -82,43 +67,14 @@ public class StreamsCassandraResourceGeneratorTest { Collection outputCollection = Lists.newArrayList(outputIterator); assert( outputCollection.size() == 1 ); -Path path = Paths.get("./target/generated-sources/test/types.cql"); +Path path = Paths.get(testOutput.getAbsolutePath()).resolve("types.cql"); + +assert( path.toFile().exists() ); String typesCqlBytes = new String( java.nio.file.Files.readAllBytes(path)); assert( StringUtils.countMatches(typesCqlBytes, "CREATE TYPE") == 133 ); -assert( !typesCqlBytes.contains("IDK")); - - -//String expectedDirectory = "target/test-classes/expected"; -//File testExpected = new File( expectedDirectory ); -// -//Iterable expectedIterator = Files.fileTreeTraverser().breadthFirstTraversal(testExpected) -//.filter(cqlFilter); -//Collection expectedCollection = Lists.newArrayList(expectedIterator); -// -//int fails = 0; -// -//Iterator iterator = expectedCollection.iterator(); -//while( iterator.hasNext() ) { -//File objectExpected = iterator.next(); -//String expectedEnd = dropSourcePathPrefix(objectExpected.getAbsolutePath(), expectedDirectory); -//File objectActual = new File(config.getTargetDirectory() + "/" + expectedEnd); -//LOGGER.info("Comparing: {} and {}", objectExpected.getAbsolutePath(), objectActual.getAbsolutePath()); -//assert( objectActual.exists()); -//if( FileUtils.contentEquals(objectActual, objectExpected) == true ) { -//LOGGER.info("Exact Match!"); -//} else { -//LOGGER.info("No Match!"); -//fails++
[06/32] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/agree.json -- diff --git a/streams-schemas/src/site/resources/verbs/agree.json b/streams-schemas/src/site/resources/verbs/agree.json new file mode 100644 index 000..5095153 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/agree.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Agree", +"description": "Indicates that the actor agrees with the object. For example, a person agreeing with an argument, or expressing agreement with a particular issue.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "agree" +}, +"title": { +"type": "string", +"default": "{actor.displayName} agrees with {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/append.json -- diff --git a/streams-schemas/src/site/resources/verbs/append.json b/streams-schemas/src/site/resources/verbs/append.json new file mode 100644 index 000..648d192 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/append.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Append", +"description": "Indicates that the actor has appended the object to the target. For instance, a person appending a new record to a database.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "append" +}, +"title": { +"type": "string", +"default": "{actor.displayName} append {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/approve.json -- diff --git a/streams-schemas/src/site/resources/verbs/approve.json b/streams-schemas/src/site/resources/verbs/approve.json new file mode 100644 index 000..ec66f9b --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/approve.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Approve", +"description": "Indicates that the actor has approved the object. For instance, a manager might approve a travel request.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "approve" +}, +"title": { +"type": "string", +"default": "{actor.displayName} approved {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/archive.json -- diff --git a/streams-schemas/src/site/resources/verbs/archive.json b/streams-schemas/src/site/resources/verbs/archive.json new file mode 100644 index 000..24aea16 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/archive.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Archive", +"description": "Indicates that the actor has archived the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "archive" +}, +"title": { +"type": "string", +"default": "{actor.displayName} archived {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/02b5adda/streams-schemas/src/site/resources/verbs/assign.json ---
[11/32] incubator-streams git commit: hive generation is looking pretty good
hive generation is looking pretty good Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/9618adaf Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/9618adaf Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/9618adaf Branch: refs/heads/STREAMS-389 Commit: 9618adaf3f828f9f3682226f666e5732824e4212 Parents: bf31cbe Author: Steve Blackmon @steveblackmon Authored: Tue May 3 16:32:58 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Tue May 3 16:32:58 2016 -0500 -- streams-plugins/streams-plugin-hive/pom.xml | 23 +- .../plugins/StreamsHiveResourceGenerator.java | 221 - .../StreamsHiveResourceGeneratorMojo.java | 68 .../hive/StreamsHiveGenerationConfig.java | 84 + .../hive/StreamsHiveResourceGenerator.java | 322 +++ .../hive/StreamsHiveResourceGeneratorMojo.java | 76 + .../test/StreamsHiveResourceGeneratorTest.java | 88 - .../src/test/resources/expected/activity.hql| 203 .../src/test/resources/expected/collection.hql | 47 +++ .../src/test/resources/expected/media_link.hql | 11 + .../src/test/resources/expected/object.hql | 61 .../resources/expected/objectTypes/place.hql| 79 + .../test/resources/expected/verbs/purchase.hql | 203 streams-schemas/pom.xml | 37 ++- .../org/apache/streams/schema/FieldType.java| 13 + .../org/apache/streams/schema/FieldUtil.java| 29 ++ .../org/apache/streams/schema/FileUtil.java | 69 .../apache/streams/schema/GenerationConfig.java | 115 +++ .../java/org/apache/streams/schema/Schema.java | 57 .../org/apache/streams/schema/SchemaStore.java | 283 .../org/apache/streams/schema/SchemaUtil.java | 50 +++ .../java/org/apache/streams/schema/URIUtil.java | 31 ++ 22 files changed, 1860 insertions(+), 310 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/9618adaf/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml index 22d75ce..b173a8d 100644 --- a/streams-plugins/streams-plugin-hive/pom.xml +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -40,6 +40,12 @@ org.apache.streams streams-config ${project.version} + + +commons-logging +commons-logging + + org.apache.streams @@ -47,15 +53,13 @@ ${project.version} -org.jsonschema2pojo -jsonschema2pojo-core - - org.apache.streams -streams-pojo +streams-schemas ${project.version} -test -test-jar + + +com.google.guava +guava org.reflections @@ -219,9 +223,10 @@ unpack-dependencies - streams-pojo + org.apache.streams + streams-schemas **/*.json - ${project.build.directory}/test-classes + ${project.build.directory}/test-classes/streams-schemas http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/9618adaf/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java deleted file mode 100644 index 1efb15e..000 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java +++ /dev/null @@ -1,221 +0,0 @@ -package org.apache.streams.plugins; - -import com.google.common.base.Strings; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import org.reflections.ReflectionUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.Serializable; -import java.lang.reflect.Field; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import ja
[28/32] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/objectTypes/task.json -- diff --git a/streams-schemas/src/main/jsonschema/objectTypes/task.json b/streams-schemas/src/main/jsonschema/objectTypes/task.json deleted file mode 100644 index 2c8a3ea..000 --- a/streams-schemas/src/main/jsonschema/objectTypes/task.json +++ /dev/null @@ -1,40 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/task.json#";, -"type": "object", -"title": "task", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "task" -}, -"by": { - "type": "string", - "format": "date-time" -}, -"prerequisites": { - "type": "array", - "items": { -"type": "object", -"$ref": "../activity.json" - } -}, -"required": { - "type": "boolean" -}, -"supersedes": { - "type": "array", - "items": { -"type": "object", -"$ref": "../activity.json" - } -} -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/objectTypes/team.json -- diff --git a/streams-schemas/src/main/jsonschema/objectTypes/team.json b/streams-schemas/src/main/jsonschema/objectTypes/team.json deleted file mode 100644 index f4f7494..000 --- a/streams-schemas/src/main/jsonschema/objectTypes/team.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/team.json#";, -"type": "object", -"title": "team", -"extends": { -"$ref": "../object.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "team" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/objectTypes/video.json -- diff --git a/streams-schemas/src/main/jsonschema/objectTypes/video.json b/streams-schemas/src/main/jsonschema/objectTypes/video.json deleted file mode 100644 index 88a528d..000 --- a/streams-schemas/src/main/jsonschema/objectTypes/video.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/objectTypes/video.json#";, -"type": "object", -"title": "video", -"extends": { -"$ref": "../objectTypes/file.json" -}, -"properties": { -"objectType": { -"type": "string", -"default": "video" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6187265f/streams-schemas/src/main/jsonschema/verbs/accept.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/accept.json b/streams-schemas/src/main/jsonschema/verbs/accept.json deleted file mode 100644 index 04efee5..000 --- a/streams-schemas/src/main/jsonschema/verbs/accept.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/accept.json#";, -"type": "object", -"title": "Accept", -"description": "Indicates that that the actor has accepted the object. For instance, a person accepting an award, or accepting an assignment.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "accept" -}, -"title": { -"type": "string", -"default": "{actor.displayName}
[GitHub] incubator-streams pull request #283: source and resource generation modules
GitHub user steveblackmon opened a pull request: https://github.com/apache/incubator-streams/pull/283 source and resource generation modules supports generation of source code and resource files for several technologies from project and arbitrary jsonschemas resolves STREAMS-389 resolves STREAMS-398 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-streams STREAMS-389 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-streams/pull/283.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #283 commit f0a3518ef7e89f4b3ce2ebc3b0141ef240c00c72 Author: Steve Blackmon (@steveblackmon) Date: 2015-12-29T23:19:15Z start of implementation for STREAMS-398 commit 1c78ecc7fe7bf72dad6cd204cffc4fae1ac4b41b Author: Steve Blackmon @steveblackmon Date: 2016-03-28T13:32:00Z create streams-plugin-pojo commit 6501b27cdc148e5044b893197b5dc38d34aa8aeb Author: Steve Blackmon @steveblackmon Date: 2016-03-28T13:32:19Z rename Hive Generator commit eea09756b2388acca625e2e752be127874a52599 Author: Steve Blackmon @steveblackmon Date: 2016-03-28T13:32:27Z test pom for streams-plugin-pojo commit 02b5adda7694698e732980c4b2702a2b67ff5548 Author: Steve Blackmon @steveblackmon Date: 2016-04-21T16:41:59Z STREAMS-398 - streams-schemas moves jsonschemas to a seperate module this averts dependency graph cycle that would occur once streams-plugin-pojo is a dependency of streams-pojo and streams-scala commit bf31cbe000b950cb07298d7dbc735726d4b91e3d Author: Steve Blackmon @steveblackmon Date: 2016-04-21T16:42:44Z STREAMS-398 - pojo generation code and plugin for generating POJOs now resides in streams-project unit testing for generating POJOs without maven unit testing for generating POJOs with maven commit 9618adaf3f828f9f3682226f666e5732824e4212 Author: Steve Blackmon @steveblackmon Date: 2016-05-03T21:32:58Z hive generation is looking pretty good commit 02dc8efc6615142cce4d3ddd62d28c1972c82855 Author: Steve Blackmon @steveblackmon Date: 2016-05-03T21:33:47Z re-enable hive plugin commit 95a02d71c8b28ffda7ef37a151efd896d65b1223 Author: Steve Blackmon @steveblackmon Date: 2016-05-07T00:45:12Z WIP for apachecon commit 57f17d765a5e0f4767a998e47e8afb096a8ff792 Author: Steve Blackmon (@steveblackmon) Date: 2015-12-07T20:48:38Z first take at STREAMS-389: streams-project/streams-plugins/streams-plugin-scala commit 6187265fc0395a8051483ba3b905d976299217a3 Author: Steve Blackmon @steveblackmon Date: 2016-06-01T17:32:14Z refactoring, testing, documentation, CLI modes break up streams-schemas into streams-util and streams-schema-activitystreams add index.md to each plugin specify basepath of jsonschema project-wide harmonize plugin behavior, code style, docs ensure all tests pass add CLI modes --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (STREAMS-389) Support generation of scala source from jsonschemas
[ https://issues.apache.org/jira/browse/STREAMS-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15310741#comment-15310741 ] ASF GitHub Bot commented on STREAMS-389: GitHub user steveblackmon opened a pull request: https://github.com/apache/incubator-streams/pull/283 source and resource generation modules supports generation of source code and resource files for several technologies from project and arbitrary jsonschemas resolves STREAMS-389 resolves STREAMS-398 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-streams STREAMS-389 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-streams/pull/283.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #283 commit f0a3518ef7e89f4b3ce2ebc3b0141ef240c00c72 Author: Steve Blackmon (@steveblackmon) Date: 2015-12-29T23:19:15Z start of implementation for STREAMS-398 commit 1c78ecc7fe7bf72dad6cd204cffc4fae1ac4b41b Author: Steve Blackmon @steveblackmon Date: 2016-03-28T13:32:00Z create streams-plugin-pojo commit 6501b27cdc148e5044b893197b5dc38d34aa8aeb Author: Steve Blackmon @steveblackmon Date: 2016-03-28T13:32:19Z rename Hive Generator commit eea09756b2388acca625e2e752be127874a52599 Author: Steve Blackmon @steveblackmon Date: 2016-03-28T13:32:27Z test pom for streams-plugin-pojo commit 02b5adda7694698e732980c4b2702a2b67ff5548 Author: Steve Blackmon @steveblackmon Date: 2016-04-21T16:41:59Z STREAMS-398 - streams-schemas moves jsonschemas to a seperate module this averts dependency graph cycle that would occur once streams-plugin-pojo is a dependency of streams-pojo and streams-scala commit bf31cbe000b950cb07298d7dbc735726d4b91e3d Author: Steve Blackmon @steveblackmon Date: 2016-04-21T16:42:44Z STREAMS-398 - pojo generation code and plugin for generating POJOs now resides in streams-project unit testing for generating POJOs without maven unit testing for generating POJOs with maven commit 9618adaf3f828f9f3682226f666e5732824e4212 Author: Steve Blackmon @steveblackmon Date: 2016-05-03T21:32:58Z hive generation is looking pretty good commit 02dc8efc6615142cce4d3ddd62d28c1972c82855 Author: Steve Blackmon @steveblackmon Date: 2016-05-03T21:33:47Z re-enable hive plugin commit 95a02d71c8b28ffda7ef37a151efd896d65b1223 Author: Steve Blackmon @steveblackmon Date: 2016-05-07T00:45:12Z WIP for apachecon commit 57f17d765a5e0f4767a998e47e8afb096a8ff792 Author: Steve Blackmon (@steveblackmon) Date: 2015-12-07T20:48:38Z first take at STREAMS-389: streams-project/streams-plugins/streams-plugin-scala commit 6187265fc0395a8051483ba3b905d976299217a3 Author: Steve Blackmon @steveblackmon Date: 2016-06-01T17:32:14Z refactoring, testing, documentation, CLI modes break up streams-schemas into streams-util and streams-schema-activitystreams add index.md to each plugin specify basepath of jsonschema project-wide harmonize plugin behavior, code style, docs ensure all tests pass add CLI modes > Support generation of scala source from jsonschemas > --- > > Key: STREAMS-389 > URL: https://issues.apache.org/jira/browse/STREAMS-389 > Project: Streams > Issue Type: New Feature >Reporter: Steve Blackmon >Assignee: Steve Blackmon > > Support generation of scala source from jsonschemas, similar to what > jsonschema2pojo does to generate java pojos. Implement as a maven plugin > that can be enable on a module-by-module basis. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[04/46] incubator-streams git commit: Merge branch 'STREAMS-393'
Merge branch 'STREAMS-393' Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/c7490d3b Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/c7490d3b Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/c7490d3b Branch: refs/heads/STREAMS-389 Commit: c7490d3b621429df235b6280f7b86837623ab80c Parents: 19f69e5 296861a Author: Steve Blackmon @steveblackmon Authored: Wed Mar 2 11:52:47 2016 -0600 Committer: Steve Blackmon @steveblackmon Committed: Wed Mar 2 11:52:47 2016 -0600 -- .../processor/PercolateTagProcessor.java| 5 ++-- .../filebuffer/FileBufferPersistReader.java | 2 +- .../org/apache/streams/tika/TikaProcessor.java | 3 +-- .../streams/urls/LinkHelperFunctionsTest.java | 26 +++- .../com/datasift/test/DatasiftSerDeTest.java| 1 - .../facebook/test/FacebookActivitySerDeIT.java | 3 +-- .../facebook/test/FacebookPageSerDeIT.java | 3 +-- .../facebook/test/FacebookPostSerDeIT.java | 3 +-- .../test/FacebookEDCAsActivityTest.java | 2 +- .../facebook/test/FacebookEDCSerDeTest.java | 2 +- .../flickr/test/FlickrEDCAsActivityTest.java| 2 +- .../gnip/flickr/test/FlickrEDCSerDeTest.java| 2 +- .../com/gplus/api/GPlusEDCAsActivityTest.java | 5 ++-- .../reddit/api/RedditEDCAsActivityJSONTest.java | 5 ++-- .../java/com/gnip/test/YouTubeEDCSerDeTest.java | 2 +- .../com/gnip/test/YoutubeEDCAsActivityTest.java | 2 +- .../twitter/test/InstagramActivitySerDeIT.java | 7 ++ .../data/MoreoverJsonActivitySerializer.java| 6 - .../streams/data/util/MoreoverTestUtil.java | 7 -- .../rss/test/SyndEntryActivitySerializerIT.java | 13 +- .../converter/util/TwitterActivityUtil.java | 6 - .../twitter/test/TwitterObjectMapperIT.java | 3 +-- .../test/processors/DoNothingProcessor.java | 6 - .../PassthroughDatumCounterProcessor.java | 8 -- .../local/test/writer/DoNothingWriter.java | 6 - .../local/test/writer/SystemOutWriter.java | 6 - 26 files changed, 78 insertions(+), 58 deletions(-) --
[10/46] incubator-streams git commit: elasticsearch diagram and confs
elasticsearch diagram and confs Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/c22fce00 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/c22fce00 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/c22fce00 Branch: refs/heads/STREAMS-389 Commit: c22fce00f388b222ba7337a0d0290fd661af7cea Parents: a786c8b Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 15:37:33 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Thu Apr 21 15:37:33 2016 -0500 -- .../src/main/resources/components.dot | 42 .../src/main/resources/elasticsearch-read.conf | 18 + .../src/main/resources/elasticsearch-write.conf | 9 + .../src/main/resources/reference.conf | 9 - 4 files changed, 69 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/c22fce00/streams-contrib/streams-persist-elasticsearch/src/main/resources/components.dot -- diff --git a/streams-contrib/streams-persist-elasticsearch/src/main/resources/components.dot b/streams-contrib/streams-persist-elasticsearch/src/main/resources/components.dot new file mode 100644 index 000..b3f26e0 --- /dev/null +++ b/streams-contrib/streams-persist-elasticsearch/src/main/resources/components.dot @@ -0,0 +1,42 @@ +digraph g { + + graph [compound = true]; + + //presentation + splines = true; + overlap = false; + rankdir = TB; + + generators [label="generators", shape="circle"]; + providers [label="providers", shape="circle"]; + + subgraph cluster_processors { +label="processors"; +processors_elasticsearch_DatumFromMetadataAsDocumentProcessor [label="DatumFromMetadataAsDocumentProcessor"] +processors_elasticsearch_DatumFromMetadataProcessor [label="DatumFromMetadataProcessor"] +processors_elasticsearch_DocumentToMetadataProcessor [label="DocumentToMetadataProcessor"] +processors_elasticsearch_MetadataFromDocumentProcessor [label="MetadataFromDocumentProcessor"] +processors_elasticsearch_PercolateTagProcessor [label="PercolateTagProcessor"] + } + + subgraph cluster_persisters { +label="persisters"; +persisters_elasticsearch_reader [label="ElasticsearchPersistReader"] +persisters_elasticsearch_writer [label="ElasticsearchPersistWriter"] +persisters_elasticsearch_updater [label="ElasticsearchPersistUpdater"] + } + + subgraph cluster_dbs { +label="dbs"; +elasticsearch [label="elasticsearch"] + } + + generators -> providers + providers -> processors + processors -> persisters_elasticsearch_writer [label="o.a.s.p.StreamsDatum"] + processors -> persisters_elasticsearch_updater [label="o.a.s.p.StreamsDatum"] + persisters_elasticsearch_reader -> processors [label="o.a.s.p.StreamsDatum[String]"] + persisters_elasticsearch_reader <- elasticsearch + persisters_elasticsearch_writer -> elasticsearch + persisters_elasticsearch_updater -> elasticsearch +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/c22fce00/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-read.conf -- diff --git a/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-read.conf b/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-read.conf new file mode 100644 index 000..c1638ca --- /dev/null +++ b/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-read.conf @@ -0,0 +1,18 @@ +"elasticsearch": { + "hosts": [ +"localhost" + ], + "port": 9300, + "clusterName": "elasticsearch", + "indexes": [ +"streams" + ], + "types": [ +"post" + ], + "_search": { +"query" : { + "match_all" : { } +} + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/c22fce00/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-write.conf -- diff --git a/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-write.conf b/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-write.conf new file mode 100644 index 000..4c24b3f --- /dev/null +++ b/streams-contrib/streams-persist-elasticsearch/src/main/resources/elasticsearch-write.conf @@ -0,0 +1,9 @@ +"elasticsearch": { + "hosts": [ +"localhost" + ], + "port": 9300, + "clusterName": "elasticsearch", + "index": "streams", + "type": "post" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/c22fce00/streams-contrib/s
[13/46] incubator-streams git commit: fix a few edges that were pointing the wrong way
fix a few edges that were pointing the wrong way Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/c907f058 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/c907f058 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/c907f058 Branch: refs/heads/STREAMS-389 Commit: c907f058f913e15a2f7b73fab927ef0293ec18e5 Parents: 2a4a96d Author: Steve Blackmon @steveblackmon Authored: Mon Apr 25 16:18:38 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Apr 25 16:18:38 2016 -0500 -- .../streams-persist-kinesis/src/main/resources/components.dot | 2 +- .../streams-persist-filebuffer/src/main/resources/components.dot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/c907f058/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot -- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot index 3a20456..bae342b 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot +++ b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot @@ -27,5 +27,5 @@ digraph g { processors -> persisters_kinesis_writer [label="StreamsDatum"] persisters_kinesis_reader -> processors [label="StreamsDatum[String]"] persisters_kinesis_writer -> kinesis - persisters_kinesis_reader <- kinesis + kinesis -> persisters_kinesis_reader } http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/c907f058/streams-contrib/streams-persist-filebuffer/src/main/resources/components.dot -- diff --git a/streams-contrib/streams-persist-filebuffer/src/main/resources/components.dot b/streams-contrib/streams-persist-filebuffer/src/main/resources/components.dot index d082398..c12b161 100644 --- a/streams-contrib/streams-persist-filebuffer/src/main/resources/components.dot +++ b/streams-contrib/streams-persist-filebuffer/src/main/resources/components.dot @@ -27,5 +27,5 @@ digraph g { processors -> persisters_filebuffer_writer [label="StreamsDatum"] persisters_filebuffer_reader -> processors [label="StreamsDatum[String]"] persisters_filebuffer_writer -> filebuffer - persisters_filebuffer_reader <- filebuffer + filebuffer -> persisters_filebuffer_reader }
[21/46] incubator-streams git commit: STREAMS-398 - pojo generation
STREAMS-398 - pojo generation code and plugin for generating POJOs now resides in streams-project unit testing for generating POJOs without maven unit testing for generating POJOs with maven Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/7b8ef0a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/7b8ef0a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/7b8ef0a2 Branch: refs/heads/STREAMS-389 Commit: 7b8ef0a22707af88426c18e0869ad01a261602c5 Parents: 0424855 Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 11:42:44 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:49:27 2016 -0500 -- pom.xml | 1 + streams-plugins/streams-plugin-pojo/pom.xml | 28 ++- .../plugins/StreamsPojoGenerationConfig.java| 230 --- .../plugins/StreamsPojoSourceGenerator.java | 98 .../plugins/StreamsPojoSourceGeneratorMojo.java | 80 +++ .../StreamsPojoSourceGeneratorMojoTest.java | 96 .../test/StreamsPojoSourceGeneratorTest.java| 43 +++- .../test/resources/streams-plugin-pojo/pom.xml | 90 +++- streams-pojo/pom.xml| 6 + 9 files changed, 421 insertions(+), 251 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/7b8ef0a2/pom.xml -- diff --git a/pom.xml b/pom.xml index cb935af..6010572 100644 --- a/pom.xml +++ b/pom.xml @@ -177,6 +177,7 @@ streams-pojo-extensions streams-plugins streams-runtimes +streams-schemas streams-testing streams-util streams-verbs http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/7b8ef0a2/streams-plugins/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/pom.xml index 399a371..d7210c8 100644 --- a/streams-plugins/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/pom.xml @@ -43,8 +43,14 @@ ${project.version} +org.apache.streams +streams-schemas +${project.version} + + org.jsonschema2pojo jsonschema2pojo-core +0.4.10 commons-logging @@ -55,6 +61,7 @@ org.jsonschema2pojo jsonschema2pojo-maven-plugin +0.4.10 org.apache.streams @@ -86,6 +93,12 @@ test +org.apache.maven.shared +maven-verifier +1.6 +test + + org.apache.maven maven-core 3.3.3 @@ -216,19 +229,20 @@ org.apache.maven.plugins maven-dependency-plugin -2.4 + +**/*.json + ${project.build.directory}/test-classes/streams-schemas +org.apache.streams +streams-schemas +jar,test-jar + -resource-dependencies +test-resource-dependencies process-test-resources unpack-dependencies - - streams-pojo -**/*.json - ${project.build.directory}/test-classes - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/7b8ef0a2/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java -- diff --git a/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java b/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java index b42ccf9..4c1f850 100644 --- a/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java +++ b/streams-plugins/streams-plugin-pojo/src/main/java/org/apache/streams/plugins/StreamsPojoGenerationConfig.java @@ -2,197 +2,67 @@ package org.apache.streams.plugins; import org.jsonschema2pojo.AnnotationStyle; import org.jsonschema2pojo.Annotator; +import org.js
[15/46] incubator-streams git commit: tweaks to readmes
tweaks to readmes Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/0e7fbcb6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/0e7fbcb6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/0e7fbcb6 Branch: refs/heads/STREAMS-389 Commit: 0e7fbcb6b783373e95073eb12c14b884b9f42489 Parents: 4b6121a Author: Steve Blackmon @steveblackmon Authored: Wed Apr 27 19:22:32 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Apr 27 19:22:32 2016 -0500 -- pom.xml | 3 +++ src/site/site.xml| 3 --- .../src/site/markdown/index.md | 11 +++ .../streams-provider-moreover/src/site/markdown/index.md | 2 +- .../streams-provider-youtube/src/site/markdown/index.md | 4 5 files changed, 19 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0e7fbcb6/pom.xml -- diff --git a/pom.xml b/pom.xml index 167fbb1..2d79739 100644 --- a/pom.xml +++ b/pom.xml @@ -260,6 +260,9 @@ maven-javadoc-plugin + +maven-source-plugin + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0e7fbcb6/src/site/site.xml -- diff --git a/src/site/site.xml b/src/site/site.xml index 3b0a2cf..b94e182 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -17,9 +17,6 @@ ~ under the License. --> - - - true http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0e7fbcb6/streams-contrib/streams-provider-instagram/src/site/markdown/index.md -- diff --git a/streams-contrib/streams-provider-instagram/src/site/markdown/index.md b/streams-contrib/streams-provider-instagram/src/site/markdown/index.md index e6b5d8a..487d7f3 100644 --- a/streams-contrib/streams-provider-instagram/src/site/markdown/index.md +++ b/streams-contrib/streams-provider-instagram/src/site/markdown/index.md @@ -3,6 +3,17 @@ streams-provider-instagram Module connects to instagram API, collects events, converts to activity, and passes each activity downstream. +## Data Types + +This module relies on classes from com.sachinhandiekar:jInstagram + +## Configuration + +| Schema | +|| +| [InstagramConfiguration.json](com/instagram/InstagramConfiguration.json "InstagramConfiguration.json") [InstagramConfiguration.html](apidocs/com/instagram/InstagramConfiguration.html "javadoc") | +| [InstagramUserInformationConfiguration.json](com/instagram/InstagramUserInformationConfiguration.json "InstagramUserInformationConfiguration.json") [InstagramUserInformationConfiguration.html](apidocs/com/instagram/InstagramUserInformationConfiguration.html "javadoc") | + ## Components ![components](components.dot.svg "Components") http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0e7fbcb6/streams-contrib/streams-provider-moreover/src/site/markdown/index.md -- diff --git a/streams-contrib/streams-provider-moreover/src/site/markdown/index.md b/streams-contrib/streams-provider-moreover/src/site/markdown/index.md index fa3516a..3550a87 100644 --- a/streams-contrib/streams-provider-moreover/src/site/markdown/index.md +++ b/streams-contrib/streams-provider-moreover/src/site/markdown/index.md @@ -14,7 +14,7 @@ streams-provider-moreover contains schema definitions, providers, conversions, a | Schema | || -| [MoreoverConfiguration.json](org/apache/streams/moreover/MoreoverConfiguration.json "MoreoverConfiguration.json") [MoreoverConfiguration.html](apidocs/org/apache/streams/moreover/MoreoverConfiguration.html "javadoc") | +| [MoreoverConfiguration.json](com/moreover/MoreoverConfiguration.json "MoreoverConfiguration.json") [MoreoverConfiguration.html](apidocs/com/moreover/MoreoverConfiguration.html "javadoc") | ## Components http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0e7fbcb6/streams-contrib/streams-provider-youtube/src/site/markdown/index.md -- diff --git a/streams-contrib/streams-provider-youtube/src/site/markdown/index.md b/streams-contrib/streams-provider-youtube/src/site/markdown/index.md index bccdd58..cea90fe 100644 --- a/streams-contrib/streams-provider-youtube/src/site/markdown/index.md +++ b/streams-contrib/streams-provider-youtube/src/site/markdown/index.md @@ -3,6 +3,10 @@ org.ap
[06/46] incubator-streams git commit: more READMEs
more READMEs Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/89e10dd5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/89e10dd5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/89e10dd5 Branch: refs/heads/STREAMS-389 Commit: 89e10dd581ae06e9c88cee7667cf15a227e497fb Parents: 25f1ca1 Author: Steve Blackmon Authored: Sun Mar 27 19:54:49 2016 -0500 Committer: Steve Blackmon Committed: Sun Mar 27 19:54:49 2016 -0500 -- README.md | 2 +- streams-components/streams-converters/README.md | 8 +++ .../src/site/markdown/index.md | 8 +++ streams-components/streams-filters/README.md| 6 +-- streams-components/streams-http/README.md | 27 +++--- streams-config/README.md| 10 ++-- .../streams-persist-kinesis/README.md | 22 +++- .../streams-persist-s3/README.md| 22 +++- .../streams-persist-elasticsearch/README.md | 42 +++ .../streams-persist-filebuffer/README.md| 16 +++--- streams-contrib/streams-persist-graph/README.md | 55 ++-- streams-contrib/streams-persist-hbase/README.md | 24 +++-- streams-contrib/streams-persist-hdfs/README.md | 33 +++- streams-contrib/streams-persist-kafka/README.md | 18 +++ streams-contrib/streams-persist-mongo/README.md | 19 +++ .../streams-processor-jackson/README.md | 9 ++-- .../streams-processor-json/README.md| 9 ++-- .../streams-processor-peoplepattern/README.md | 17 +++--- .../streams-processor-regex/README.md | 9 ++-- .../streams-processor-urls/README.md| 9 ++-- .../src/site/markdown/index.md | 21 .../src/site/markdown/index.md | 8 ++- .../gnip-powertrack/README.md | 8 +++ .../streams-provider-instagram/README.md| 2 +- streams-contrib/streams-provider-rss/README.md | 2 +- .../streams-provider-sysomos/README.md | 2 +- .../streams-provider-twitter/README.md | 2 +- .../streams-provider-youtube/README.md | 8 +++ streams-core/README.md | 10 ++-- streams-monitoring/README.md| 6 ++- streams-pojo/README.md | 10 ++-- 31 files changed, 172 insertions(+), 272 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/89e10dd5/README.md -- diff --git a/README.md b/README.md index 51970dc..32b3c03 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ Apache Streams (incubating) Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 -[README.md](src/site/index.md "README") +[README.md](src/site/markdown/index.md "README") http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/89e10dd5/streams-components/streams-converters/README.md -- diff --git a/streams-components/streams-converters/README.md b/streams-components/streams-converters/README.md new file mode 100644 index 000..266a861 --- /dev/null +++ b/streams-components/streams-converters/README.md @@ -0,0 +1,8 @@ +Apache Streams (incubating) +Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 + + +org.apache.streams:streams-converters +=== + +[README.md](src/site/markdown/index.md "README") http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/89e10dd5/streams-components/streams-converters/src/site/markdown/index.md -- diff --git a/streams-components/streams-converters/src/site/markdown/index.md b/streams-components/streams-converters/src/site/markdown/index.md new file mode 100644 index 000..8d8701b --- /dev/null +++ b/streams-components/streams-converters/src/site/markdown/index.md @@ -0,0 +1,8 @@ +Apache Streams (incubating) +Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 + + +streams-converters += + +Apply a filter to an activity stream, dropping any document that does not match the criteria http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/89e10dd5/streams-components/streams-filters/README.md -- diff --git a/streams-components/stre
[25/46] incubator-streams git commit: test pom for streams-plugin-pojo
test pom for streams-plugin-pojo Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/387da685 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/387da685 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/387da685 Branch: refs/heads/STREAMS-389 Commit: 387da685f37a7135d556f4f645a3e77e6138f958 Parents: 7d318c3 Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:27 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:49:27 2016 -0500 -- .../src/test/resources/streams-plugin-pojo/pom.xml| 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/387da685/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml index b1de7b8..fbb2864 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml @@ -4,10 +4,10 @@ 4.0.0 org.apache.streams.plugins -streams-plugin-hive-test +streams-plugin-pojo-test 0.3-incubating-SNAPSHOT jar -Test StreamsPojoHiveMojo +Test StreamsPojoMojo @@ -21,18 +21,18 @@ org.apache.streams.plugins -streams-plugin-hive +streams-plugin-pojo 0.3-incubating-SNAPSHOT org.apache.streams.pojo.json -target/test-classes/streams-hive-plugin/ +target/test-classes/streams-pojo-plugin/ -hive +pojo
[16/46] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/site/resources/verbs/tag.json -- diff --git a/streams-schemas/src/site/resources/verbs/tag.json b/streams-schemas/src/site/resources/verbs/tag.json new file mode 100644 index 000..6208eae --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/tag.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tag", +"description": "Indicates that the actor has associated the object with the target. For example, if the actor specifies that a particular user appears in a photo. the object is the user and the target is the photo.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tag" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tagged {object.displayName} as {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/site/resources/verbs/terminate.json -- diff --git a/streams-schemas/src/site/resources/verbs/terminate.json b/streams-schemas/src/site/resources/verbs/terminate.json new file mode 100644 index 000..280eb31 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/terminate.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Terminate", +"description": "Indicates that the actor has terminated the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "terminate" +}, +"title": { +"type": "string", +"default": "{actor.displayName} terminated {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/site/resources/verbs/tie.json -- diff --git a/streams-schemas/src/site/resources/verbs/tie.json b/streams-schemas/src/site/resources/verbs/tie.json new file mode 100644 index 000..7530ed2 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/tie.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tie", +"description": "Indicates that the actor has neither won or lost the object. This verb is generally only applicable when the object represents some form of competition, such as a game.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tie" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tied at {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/site/resources/verbs/unfavorite.json -- diff --git a/streams-schemas/src/site/resources/verbs/unfavorite.json b/streams-schemas/src/site/resources/verbs/unfavorite.json new file mode 100644 index 000..bfa9c20 --- /dev/null +++ b/streams-schemas/src/site/resources/verbs/unfavorite.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnFavorite", +"description": "Indicates that the actor has removed the object from the collection of favorited items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unfavorite" +}, +"title": { +"type": "string", +"default": "{actor.displayName} removed {object.displayName} as a favorite" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c
[23/46] incubator-streams git commit: start of implementation for STREAMS-398
start of implementation for STREAMS-398 Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/50f67bf8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/50f67bf8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/50f67bf8 Branch: refs/heads/STREAMS-389 Commit: 50f67bf8d97a61bb325f8524472f5c20e86287d0 Parents: 0e7fbcb Author: Steve Blackmon (@steveblackmon) Authored: Tue Dec 29 17:19:15 2015 -0600 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:49:27 2016 -0500 -- streams-plugins/pom.xml | 56 streams-plugins/streams-plugin-hive/pom.xml | 232 +++ .../apache/streams/plugins/StreamsPojoHive.java | 242 +++ .../streams/plugins/StreamsPojoHiveMojo.java| 71 + .../plugins/test/StreamsPojoHiveTest.java | 55 .../src/test/resources/Tweet.hql| 297 +++ .../test/resources/streams-plugin-hive/pom.xml | 42 +++ 7 files changed, 995 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/50f67bf8/streams-plugins/pom.xml -- diff --git a/streams-plugins/pom.xml b/streams-plugins/pom.xml new file mode 100644 index 000..2306aab --- /dev/null +++ b/streams-plugins/pom.xml @@ -0,0 +1,56 @@ + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +streams-project +org.apache.streams +0.3-incubating-SNAPSHOT +../pom.xml + + +streams-plugins + +pom +streams-plugins + + + + + + +streams-plugin-scala + + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-pojo +${project.version} + + + + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/50f67bf8/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml new file mode 100644 index 000..cbc055b --- /dev/null +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -0,0 +1,232 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-hive +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT +.. + + + +1.14 + + + + +org.apache.streams +streams-config +${project.version} + + +org.apache.streams +streams-core +${project.version} + + +org.jsonschema2pojo +jsonschema2pojo-core + + +org.apache.streams +streams-pojo +${project.version} +test +test-jar + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +commons-logging +commons-logging + + +
[05/46] incubator-streams git commit: move all README.md into src/site/markdown, add example configurations, link to jsons, confs, and javadocs from module index.md
move all README.md into src/site/markdown, add example configurations, link to jsons, confs, and javadocs from module index.md Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/25f1ca14 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/25f1ca14 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/25f1ca14 Branch: refs/heads/STREAMS-389 Commit: 25f1ca1431026a57dfb5935edc655765f3b13fe2 Parents: c7490d3 Author: Steve Blackmon Authored: Sun Mar 27 12:42:30 2016 -0500 Committer: Steve Blackmon Committed: Sun Mar 27 12:42:30 2016 -0500 -- README.md | 45 +--- pom.xml | 26 +-- src/site/markdown/index.md | 39 + src/site/site.xml | 16 +++ streams-components/pom.xml | 6 +-- .../google-gmail/src/main/resources/gmail.conf | 6 +++ .../google-gmail/src/site/markdown/index.md | 20 + .../google-gplus/src/site/markdown/index.md | 21 + .../streams-provider-instagram/README.md| 22 +++--- .../src/site/markdown/index.md | 18 .../streams-provider-rss/README.markdown| 17 streams-contrib/streams-provider-rss/README.md | 8 .../src/site/markdown/index.md | 19 + .../src/test/resources/rss.conf | 15 +++ .../streams-provider-sysomos/README.md | 23 +++--- .../src/main/resources/sysomos.conf | 10 + .../src/site/markdown/index.md | 20 +++-- .../streams-provider-twitter/README.md | 42 +++--- .../jsonschema/com/twitter/UserstreamEvent.json | 1 + .../src/main/resources/followers.conf | 14 ++ .../src/main/resources/friends.conf | 14 ++ .../src/main/resources/sample.conf | 17 .../src/main/resources/userinfo.conf| 14 ++ .../src/main/resources/userstream.conf | 11 + .../src/site/markdown/index.md | 31 ++ .../src/site/resources/readme.txt | 1 + .../jsonschema/SparkRuntimeConfiguration.json | 27 27 files changed, 353 insertions(+), 150 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/25f1ca14/README.md -- diff --git a/README.md b/README.md index 2798f93..51970dc 100644 --- a/README.md +++ b/README.md @@ -2,47 +2,4 @@ Apache Streams (incubating) Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 -About -= -Apache Streams is a lightweight (yet scalable) server for ActivityStreams. The role of Apache Streams is to provide a central point of aggregation, filtering and querying for Activities that have been submitted by disparate systems. Apache Streams also intends to include a mechanism for intelligent filtering and recommendation to reduce the noise to end users. - -Release Notes -= - -[CHANGELOG.md](CHANGELOG.md "CHANGELOG.md") - -Getting Started -=== - -Please visit the project website for the latest information: -http://streams.incubator.apache.org/ - -Check out the following repository for ready-to-run examples: -https://git-wip-us.apache.org/repos/asf/incubator-streams-examples.git - -Along with the developer mailing list archive: -http://mail-archives.apache.org/mod_mbox/streams-dev/ - -Auto-generated documentation and resources are located here: -http://streams.incubator.apache.org/site/0.2-incubating/streams-project/ - -System Requirements -=== -You need a platform that supports Java SE 7 or later. - - - Sources compilation require Java SE 7 or higher. - - - Streams currently requires Java 1.7.0u72+, or Java 1.8.0u25+ during build phase. - - - The project is built with Apache Maven 3+ (suggested is 3.2.5). - -Building - -To build from source code: - - - Invoke maven in the root directory. - - `export MAVEN_OPTS="-Xmx2G"` - - `mvn install` - +[README.md](src/site/index.md "README") http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/25f1ca14/pom.xml -- diff --git a/pom.xml b/pom.xml index 74e5cf4..3290bf3 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ Apache Streams Project Apache Streams Project - http://streams.incubator.apache.org/${project.version}/${project.artifactId} + http://streams.incubator.apa
[11/46] incubator-streams git commit: add diagrams and improve index.html
add diagrams and improve index.html Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/d8fc7022 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/d8fc7022 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/d8fc7022 Branch: refs/heads/STREAMS-389 Commit: d8fc70224375415825531be728831718bfd982f7 Parents: c22fce0 Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 16:15:02 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Thu Apr 21 16:15:02 2016 -0500 -- .../src/main/resources/components.dot | 4 +-- .../src/main/resources/components.dot | 4 +-- .../src/main/resources/components.dot | 4 +-- .../src/main/resources/components.dot | 6 ++-- .../src/main/resources/components.dot | 4 +-- .../src/main/resources/components.dot | 4 +-- .../src/main/resources/components.dot | 2 +- .../src/main/resources/components.dot | 4 +-- .../src/main/resources/components.dot | 4 +-- .../src/main/resources/components.dot | 28 +++ .../src/site/markdown/index.md | 9 + .../src/main/resources/components.dot | 28 +++ .../src/site/markdown/index.md | 9 + .../src/main/resources/components.dot | 36 .../src/site/markdown/index.md | 11 ++ .../src/main/resources/components.dot | 24 + .../src/site/markdown/index.md | 8 + 17 files changed, 171 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d8fc7022/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot -- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot index 736c7f4..3a20456 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot +++ b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot @@ -24,8 +24,8 @@ digraph g { generators -> providers providers -> processors - processors -> persisters_kinesis_writer [label="o.a.s.p.StreamsDatum"] - persisters_kinesis_reader -> processors [label="o.a.s.p.StreamsDatum[String]"] + processors -> persisters_kinesis_writer [label="StreamsDatum"] + persisters_kinesis_reader -> processors [label="StreamsDatum[String]"] persisters_kinesis_writer -> kinesis persisters_kinesis_reader <- kinesis } http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d8fc7022/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/resources/components.dot -- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/resources/components.dot b/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/resources/components.dot index 35c5bed..279c609 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/resources/components.dot +++ b/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/resources/components.dot @@ -24,8 +24,8 @@ digraph g { generators -> providers providers -> processors - processors -> persisters_s3_writer [label="o.a.s.p.StreamsDatum"] - persisters_s3_reader -> processors [label="o.a.s.p.StreamsDatum[String]"] + processors -> persisters_s3_writer [label="StreamsDatum"] + persisters_s3_reader -> processors [label="StreamsDatum[String]"] persisters_s3_reader <- s3 persisters_s3_writer -> s3 http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d8fc7022/streams-contrib/streams-persist-console/src/main/resources/components.dot -- diff --git a/streams-contrib/streams-persist-console/src/main/resources/components.dot b/streams-contrib/streams-persist-console/src/main/resources/components.dot index 64e696d..507ffdc 100644 --- a/streams-contrib/streams-persist-console/src/main/resources/components.dot +++ b/streams-contrib/streams-persist-console/src/main/resources/components.dot @@ -19,7 +19,7 @@ digraph g { generators -> providers providers -> processors - processors -> persisters_console_writer [label="o.a.s.p.StreamsDatum"] - persisters_console_reader -> processors [label="o.a.s.p.StreamsDatum[String]"] + processors -> persisters_console_writer [label="StreamsDatum"] + persisters_console_reader -> processors [label="StreamsDatum
[03/46] incubator-streams git commit: refactor persist-pdfs and persist-s3 for STREAMS-377
refactor persist-pdfs and persist-s3 for STREAMS-377 Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/19f69e5a Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/19f69e5a Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/19f69e5a Branch: refs/heads/STREAMS-389 Commit: 19f69e5ae37aead22f033d720f8cfb84ad20bb91 Parents: 1b2891d Author: Steve Blackmon (@steveblackmon) Authored: Sun Dec 13 23:27:05 2015 -0600 Committer: Steve Blackmon (@steveblackmon) Committed: Sun Dec 13 23:27:05 2015 -0600 -- .../org/apache/streams/s3/S3PersistReader.java | 8 -- .../org/apache/streams/s3/S3PersistWriter.java | 22 +++ .../org/apache/streams/s3/S3Configuration.json | 23 ++-- .../streams/hdfs/WebHdfsPersistReader.java | 13 + .../streams/hdfs/WebHdfsPersistWriter.java | 15 +- .../apache/streams/hdfs/HdfsConfiguration.json | 29 +++- 6 files changed, 44 insertions(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/19f69e5a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistReader.java -- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistReader.java b/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistReader.java index b186288..702df71 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistReader.java +++ b/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistReader.java @@ -32,7 +32,11 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Strings; import com.google.common.collect.Queues; import org.apache.streams.converter.LineReadWriteUtil; -import org.apache.streams.core.*; +import org.apache.streams.core.DatumStatusCountable; +import org.apache.streams.core.DatumStatusCounter; +import org.apache.streams.core.StreamsDatum; +import org.apache.streams.core.StreamsPersistReader; +import org.apache.streams.core.StreamsResultSet; import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -108,7 +112,7 @@ public class S3PersistReader implements StreamsPersistReader, DatumStatusCountab public void prepare(Object configurationObject) { -lineReaderUtil = LineReadWriteUtil.getInstance(s3ReaderConfiguration.getFields(), s3ReaderConfiguration.getFieldDelimiter(), s3ReaderConfiguration.getLineDelimiter()); +lineReaderUtil = LineReadWriteUtil.getInstance(s3ReaderConfiguration); // Connect to S3 synchronized (this) { http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/19f69e5a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistWriter.java -- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistWriter.java b/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistWriter.java index e426983..3686f55 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistWriter.java +++ b/streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3PersistWriter.java @@ -25,21 +25,31 @@ import com.amazonaws.regions.Region; import com.amazonaws.regions.Regions; import com.amazonaws.services.s3.AmazonS3Client; import com.amazonaws.services.s3.S3ClientOptions; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import org.apache.streams.config.ComponentConfigurator; import org.apache.streams.config.StreamsConfigurator; import org.apache.streams.converter.LineReadWriteUtil; -import org.apache.streams.core.*; -import org.apache.streams.hdfs.WebHdfsPersistWriter; +import org.apache.streams.core.DatumStatus; +import org.apache.streams.core.DatumStatusCountable; +import org.apache.streams.core.DatumStatusCounter; +import org.apache.streams.core.StreamsDatum; +import org.apache.streams.core.StreamsPersistWriter; import org.apache.streams.jackson.StreamsJacksonMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.*; -import java.util.*; +import java.io.Flushable; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputSt
[27/46] incubator-streams git commit: rename Hive Generator
rename Hive Generator Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/7d318c3f Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/7d318c3f Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/7d318c3f Branch: refs/heads/STREAMS-389 Commit: 7d318c3fba9faf106eed8797263d52114a312d6c Parents: ded4ad6 Author: Steve Blackmon @steveblackmon Authored: Mon Mar 28 08:32:19 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:49:27 2016 -0500 -- .../streams/plugins/StreamsHiveResourceGenerator.java | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/7d318c3f/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java index 4edacf0..1efb15e 100644 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java +++ b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java @@ -27,15 +27,14 @@ public class StreamsHiveResourceGenerator implements Runnable { private final static String LS = System.getProperty("line.separator"); -private StreamsPojoHiveMojo mojo; +private StreamsHiveResourceGeneratorMojo mojo; String inDir = "./target/test-classes/activities"; String outDir = "./target/generated-sources/hive"; -String packages[] = {"org.apache.streams.pojo.json"}; public void main(String[] args) { StreamsHiveResourceGenerator streamsHiveResourceGenerator = new StreamsHiveResourceGenerator(); -Thread thread = new Thread(streamsPojoScala); +Thread thread = new Thread(streamsHiveResourceGenerator); thread.start(); try { thread.join(); @@ -47,7 +46,7 @@ public class StreamsHiveResourceGenerator implements Runnable { return; } -public StreamsHiveResourceGenerator(StreamsPojoHiveMojo mojo) { +public StreamsHiveResourceGenerator(StreamsHiveResourceGeneratorMojo mojo) { this.mojo = mojo; if (mojo != null && mojo.getTarget() != null && @@ -67,6 +66,9 @@ public class StreamsHiveResourceGenerator implements Runnable { public void run() { +List schemaFiles; + + List> serializableClasses = detectSerializableClasses(); LOGGER.info("Detected {} serialiables:", serializableClasses.size());
[02/46] incubator-streams git commit: resolves STREAMS-377
resolves STREAMS-377 Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/1b2891d4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/1b2891d4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/1b2891d4 Branch: refs/heads/STREAMS-389 Commit: 1b2891d43f428c8719e470554e8af8b8f674c7fe Parents: c2229a4 Author: Steve Blackmon (@steveblackmon) Authored: Sun Dec 13 14:24:06 2015 -0600 Committer: Steve Blackmon (@steveblackmon) Committed: Sun Dec 13 14:24:06 2015 -0600 -- .../streams/converter/LineReadWriteUtil.java| 66 +++- .../converter/LineReadWriteConfiguration.json | 36 +++ .../converter/test/TestLineReadWriteUtil.java | 58 - 3 files changed, 87 insertions(+), 73 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1b2891d4/streams-components/streams-converters/src/main/java/org/apache/streams/converter/LineReadWriteUtil.java -- diff --git a/streams-components/streams-converters/src/main/java/org/apache/streams/converter/LineReadWriteUtil.java b/streams-components/streams-converters/src/main/java/org/apache/streams/converter/LineReadWriteUtil.java index d418b52..a38568b 100644 --- a/streams-components/streams-converters/src/main/java/org/apache/streams/converter/LineReadWriteUtil.java +++ b/streams-components/streams-converters/src/main/java/org/apache/streams/converter/LineReadWriteUtil.java @@ -24,13 +24,13 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Joiner; import com.google.common.base.Strings; import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import org.apache.streams.core.StreamsDatum; import org.apache.streams.jackson.StreamsJacksonMapper; import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.math.BigInteger; import java.util.Iterator; import java.util.List; @@ -44,69 +44,45 @@ public class LineReadWriteUtil { private final static Logger LOGGER = LoggerFactory.getLogger(TypeConverterUtil.class); -private static LineReadWriteUtil INSTANCE; +private static Map INSTANCE_MAP = Maps.newConcurrentMap(); private final static List DEFAULT_FIELDS = Lists.newArrayList("ID", "SEQ", "TS", "META", "DOC"); private List fields; private String fieldDelimiter = "\t"; private String lineDelimiter = "\n"; +private String encoding = "UTF-8"; private static ObjectMapper MAPPER = StreamsJacksonMapper.getInstance(); private LineReadWriteUtil() { -this(LineReadWriteUtil.DEFAULT_FIELDS); } -private LineReadWriteUtil(List fields) { -if( fields != null && fields.size() > 0) this.fields = fields; -else this.fields = LineReadWriteUtil.DEFAULT_FIELDS; +private LineReadWriteUtil(LineReadWriteConfiguration configuration) { +this.fields = configuration.getFields(); +this.fieldDelimiter = configuration.getFieldDelimiter(); +this.lineDelimiter = configuration.getLineDelimiter(); +this.encoding = configuration.getEncoding(); } -private LineReadWriteUtil(List fields, String fieldDelimiter) { -this(fields); -if( fieldDelimiter != null ) this.fieldDelimiter = fieldDelimiter; +public static LineReadWriteUtil getInstance() { +return getInstance(new LineReadWriteConfiguration()); } -private LineReadWriteUtil(List fields, String fieldDelimiter, String lineDelimiter) { -this(fields); -if( fieldDelimiter != null ) this.fieldDelimiter = fieldDelimiter; -if( lineDelimiter != null ) this.lineDelimiter = lineDelimiter; -} - -public static LineReadWriteUtil getInstance(){ -if( INSTANCE == null ) -INSTANCE = new LineReadWriteUtil(LineReadWriteUtil.DEFAULT_FIELDS); -return INSTANCE; -} - -public static LineReadWriteUtil getInstance(List fields){ -if( INSTANCE == null ) -INSTANCE = new LineReadWriteUtil(fields); -else if( !INSTANCE.fields.equals(fields)) -return new LineReadWriteUtil(fields); -return INSTANCE; -} - -public static LineReadWriteUtil getInstance(List fields, String fieldDelimiter){ -if( INSTANCE == null ) -INSTANCE = new LineReadWriteUtil(fields, fieldDelimiter); -else if( !INSTANCE.fields.equals(fields) || !INSTANCE.fieldDelimiter.equals(fieldDelimiter)) -return new LineReadWriteUtil(fields, fieldDelimiter); -return INSTANCE; -} - -public static LineReadWriteUtil getInstance(List fields, String fieldDelimiter, Str
[GitHub] incubator-streams pull request #283: source and resource generation modules
Github user steveblackmon closed the pull request at: https://github.com/apache/incubator-streams/pull/283 --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[26/46] incubator-streams git commit: hive generation is looking pretty good
hive generation is looking pretty good Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/e84dcd72 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/e84dcd72 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/e84dcd72 Branch: refs/heads/STREAMS-389 Commit: e84dcd7230f02087db2b6bf7ea6d2148d585e77d Parents: 7b8ef0a Author: Steve Blackmon @steveblackmon Authored: Tue May 3 16:32:58 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:49:27 2016 -0500 -- streams-plugins/streams-plugin-hive/pom.xml | 23 +- .../plugins/StreamsHiveResourceGenerator.java | 221 - .../StreamsHiveResourceGeneratorMojo.java | 68 .../hive/StreamsHiveGenerationConfig.java | 84 + .../hive/StreamsHiveResourceGenerator.java | 322 +++ .../hive/StreamsHiveResourceGeneratorMojo.java | 76 + .../test/StreamsHiveResourceGeneratorTest.java | 88 - .../src/test/resources/expected/activity.hql| 203 .../src/test/resources/expected/collection.hql | 47 +++ .../src/test/resources/expected/media_link.hql | 11 + .../src/test/resources/expected/object.hql | 61 .../resources/expected/objectTypes/place.hql| 79 + .../test/resources/expected/verbs/purchase.hql | 203 streams-schemas/pom.xml | 37 ++- .../org/apache/streams/schema/FieldType.java| 13 + .../org/apache/streams/schema/FieldUtil.java| 29 ++ .../org/apache/streams/schema/FileUtil.java | 69 .../apache/streams/schema/GenerationConfig.java | 115 +++ .../java/org/apache/streams/schema/Schema.java | 57 .../org/apache/streams/schema/SchemaStore.java | 283 .../org/apache/streams/schema/SchemaUtil.java | 50 +++ .../java/org/apache/streams/schema/URIUtil.java | 31 ++ 22 files changed, 1860 insertions(+), 310 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/e84dcd72/streams-plugins/streams-plugin-hive/pom.xml -- diff --git a/streams-plugins/streams-plugin-hive/pom.xml b/streams-plugins/streams-plugin-hive/pom.xml index 22d75ce..b173a8d 100644 --- a/streams-plugins/streams-plugin-hive/pom.xml +++ b/streams-plugins/streams-plugin-hive/pom.xml @@ -40,6 +40,12 @@ org.apache.streams streams-config ${project.version} + + +commons-logging +commons-logging + + org.apache.streams @@ -47,15 +53,13 @@ ${project.version} -org.jsonschema2pojo -jsonschema2pojo-core - - org.apache.streams -streams-pojo +streams-schemas ${project.version} -test -test-jar + + +com.google.guava +guava org.reflections @@ -219,9 +223,10 @@ unpack-dependencies - streams-pojo + org.apache.streams + streams-schemas **/*.json - ${project.build.directory}/test-classes + ${project.build.directory}/test-classes/streams-schemas http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/e84dcd72/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java -- diff --git a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java b/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java deleted file mode 100644 index 1efb15e..000 --- a/streams-plugins/streams-plugin-hive/src/main/java/org/apache/streams/plugins/StreamsHiveResourceGenerator.java +++ /dev/null @@ -1,221 +0,0 @@ -package org.apache.streams.plugins; - -import com.google.common.base.Strings; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import org.reflections.ReflectionUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.Serializable; -import java.lang.reflect.Field; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import ja
[20/46] incubator-streams git commit: STREAMS-398 - streams-schemas
STREAMS-398 - streams-schemas moves jsonschemas to a seperate module this averts dependency graph cycle that would occur once streams-plugin-pojo is a dependency of streams-pojo and streams-scala Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/0424855c Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/0424855c Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/0424855c Branch: refs/heads/STREAMS-389 Commit: 0424855cf0a4fd15be298906922333ae74c8e9ae Parents: 387da68 Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 11:41:59 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:49:27 2016 -0500 -- streams-schemas/pom.xml | 71 .../src/main/jsonschema/activity.json | 108 +++ .../src/main/jsonschema/collection.json | 47 .../src/main/jsonschema/media_link.json | 34 ++ streams-schemas/src/main/jsonschema/object.json | 98 + .../src/main/jsonschema/objectTypes/alert.json | 19 .../jsonschema/objectTypes/application.json | 19 .../main/jsonschema/objectTypes/article.json| 19 .../src/main/jsonschema/objectTypes/audio.json | 19 .../src/main/jsonschema/objectTypes/badge.json | 19 .../src/main/jsonschema/objectTypes/binary.json | 19 .../main/jsonschema/objectTypes/bookmark.json | 19 .../main/jsonschema/objectTypes/comment.json| 19 .../src/main/jsonschema/objectTypes/device.json | 19 .../src/main/jsonschema/objectTypes/event.json | 51 + .../src/main/jsonschema/objectTypes/file.json | 25 + .../src/main/jsonschema/objectTypes/folder.json | 19 .../src/main/jsonschema/objectTypes/game.json | 19 .../src/main/jsonschema/objectTypes/group.json | 19 .../src/main/jsonschema/objectTypes/image.json | 22 .../src/main/jsonschema/objectTypes/issue.json | 25 + .../src/main/jsonschema/objectTypes/job.json| 19 .../src/main/jsonschema/objectTypes/list.json | 28 + .../src/main/jsonschema/objectTypes/note.json | 19 .../src/main/jsonschema/objectTypes/offer.json | 19 .../jsonschema/objectTypes/organization.json| 19 .../src/main/jsonschema/objectTypes/page.json | 19 .../main/jsonschema/objectTypes/permission.json | 36 +++ .../src/main/jsonschema/objectTypes/person.json | 25 + .../jsonschema/objectTypes/photo-album.json | 19 .../src/main/jsonschema/objectTypes/photo.json | 23 .../src/main/jsonschema/objectTypes/place.json | 43 .../main/jsonschema/objectTypes/playlist.json | 19 .../main/jsonschema/objectTypes/process.json| 19 .../main/jsonschema/objectTypes/product.json| 25 + .../main/jsonschema/objectTypes/property.json | 48 + .../main/jsonschema/objectTypes/question.json | 28 + .../src/main/jsonschema/objectTypes/review.json | 22 .../src/main/jsonschema/objectTypes/role.json | 25 + .../main/jsonschema/objectTypes/service.json| 19 .../src/main/jsonschema/objectTypes/song.json | 19 .../src/main/jsonschema/objectTypes/status.json | 19 .../src/main/jsonschema/objectTypes/task.json | 40 +++ .../src/main/jsonschema/objectTypes/team.json | 19 .../src/main/jsonschema/objectTypes/video.json | 19 .../src/main/jsonschema/verbs/accept.json | 24 + .../src/main/jsonschema/verbs/access.json | 24 + .../src/main/jsonschema/verbs/acknowledge.json | 24 + .../src/main/jsonschema/verbs/add.json | 24 + .../src/main/jsonschema/verbs/agree.json| 24 + .../src/main/jsonschema/verbs/append.json | 24 + .../src/main/jsonschema/verbs/approve.json | 24 + .../src/main/jsonschema/verbs/archive.json | 24 + .../src/main/jsonschema/verbs/assign.json | 24 + .../src/main/jsonschema/verbs/at.json | 24 + .../src/main/jsonschema/verbs/attach.json | 24 + .../src/main/jsonschema/verbs/attend.json | 24 + .../src/main/jsonschema/verbs/author.json | 24 + .../src/main/jsonschema/verbs/authorize.json| 24 + .../src/main/jsonschema/verbs/borrow.json | 24 + .../src/main/jsonschema/verbs/build.json| 24 + .../src/main/jsonschema/verbs/cancel.json | 24 + .../src/main/jsonschema/verbs/checkin.json | 24 + .../src/main/jsonschema/verbs/close.json| 24 + .../src/main/jsonschema/verbs/complete.json | 24 + .../src/main/jsonschema/verbs/confirm.json | 24 + .../src/main/jsonschema/verbs/consume.json | 24 + .../src/main/jsonschema/verbs/create.json
[32/46] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java b/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java index 667661f..8d904af 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java +++ b/streams-plugins/streams-plugin-pojo/src/test/java/org/apache/streams/plugins/test/StreamsPojoSourceGeneratorTest.java @@ -1,14 +1,19 @@ package org.apache.streams.plugins.test; +import com.google.common.base.Predicate; import com.google.common.collect.Lists; +import com.google.common.io.Files; import org.apache.streams.plugins.StreamsPojoGenerationConfig; import org.apache.streams.plugins.StreamsPojoSourceGenerator; +import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; import java.io.File; import java.io.FileFilter; +import java.util.Collection; import java.util.List; /** @@ -18,6 +23,15 @@ public class StreamsPojoSourceGeneratorTest { private final static Logger LOGGER = LoggerFactory.getLogger(StreamsPojoSourceGeneratorTest.class); +public static final Predicate javaFilter = new Predicate() { +@Override +public boolean apply(@Nullable File file) { +if( file.getName().endsWith(".java") ) +return true; +else return false; +} +}; + /** * Tests that all example activities can be loaded into Activity beans * @@ -54,18 +68,16 @@ public class StreamsPojoSourceGeneratorTest { } File testOutput = new File( "target/generated-sources/test"); -FileFilter javaFilter = new FileFilter() { -@Override -public boolean accept(File pathname) { -if( pathname.getName().endsWith(".java") ) -return true; -return false; -} -}; assert( testOutput != null ); assert( testOutput.exists() == true ); assert( testOutput.isDirectory() == true ); + +Iterable outputIterator = Files.fileTreeTraverser().breadthFirstTraversal(testOutput) +.filter(javaFilter); +Collection outputCollection = Lists.newArrayList(outputIterator); +assert( outputCollection.size() > 133 ); + //assert( testOutput.listFiles(javaFilter).length == 11 ); //assert( new File(testOutput + "/traits").exists() == true ); //assert( new File(testOutput + "/traits").isDirectory() == true ); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml -- diff --git a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml index 359179e..21fd50e 100644 --- a/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml +++ b/streams-plugins/streams-plugin-pojo/src/test/resources/streams-plugin-pojo/pom.xml @@ -104,6 +104,7 @@ org.codehaus.mojo build-helper-maven-plugin +1.8 add-source http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java -- diff --git a/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java b/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java index 5f83767..4173e50 100644 --- a/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java +++ b/streams-schemas/src/main/java/org/apache/streams/schema/FieldUtil.java @@ -1,11 +1,20 @@ package org.apache.streams.schema; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * Created by steve on 5/1/16. */ public class FieldUtil { + public static FieldType determineFieldType(ObjectNode fieldNode) { String typeSchemaField = "type"; if( !fieldNode.has(typeSchemaField)) @@ -26,4 +35,25 @@ public class FieldUtil { } else return null; }
[29/46] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/site/resources/verbs/read.json -- diff --git a/streams-schemas/src/site/resources/verbs/read.json b/streams-schemas/src/site/resources/verbs/read.json deleted file mode 100644 index e797f41..000 --- a/streams-schemas/src/site/resources/verbs/read.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Read", -"description": "Indicates that the actor read the object. This is typically only applicable for objects representing printed or written content, such as a book, a message or a comment.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "read" -}, -"title": { -"type": "string", -"default": "{actor.displayName} read {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/site/resources/verbs/receive.json -- diff --git a/streams-schemas/src/site/resources/verbs/receive.json b/streams-schemas/src/site/resources/verbs/receive.json deleted file mode 100644 index 0d44aef..000 --- a/streams-schemas/src/site/resources/verbs/receive.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Receive", -"description": "Indicates that the actor is receiving an object. Examples include a person receiving a badge object. The object identifies the object being received.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "receive" -}, -"title": { -"type": "string", -"default": "{actor.displayName} received {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/site/resources/verbs/reject.json -- diff --git a/streams-schemas/src/site/resources/verbs/reject.json b/streams-schemas/src/site/resources/verbs/reject.json deleted file mode 100644 index b82fac7..000 --- a/streams-schemas/src/site/resources/verbs/reject.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "Reject", -"description": "Indicates that the actor has rejected the object.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "reject" -}, -"title": { -"type": "string", -"default": "{actor.displayName} rejected {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/site/resources/verbs/remove-friend.json -- diff --git a/streams-schemas/src/site/resources/verbs/remove-friend.json b/streams-schemas/src/site/resources/verbs/remove-friend.json deleted file mode 100644 index 073441d..000 --- a/streams-schemas/src/site/resources/verbs/remove-friend.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "#", -"type": "object", -"title": "UnFriend", -"description": "Indicates that the actor has removed the object from the collection of friends.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "remove-friend" -}, -"title": { -"type": "string", -"default": "{actor.displayName} removed friend {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/site/resources/verbs/remove.json
[42/46] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/main/jsonschema/verbs/disagree.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/disagree.json b/streams-schemas/src/main/jsonschema/verbs/disagree.json deleted file mode 100644 index 17f0c4c..000 --- a/streams-schemas/src/main/jsonschema/verbs/disagree.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/disagree.json#";, -"type": "object", -"title": "Disagree", -"description": "Indicates that the actor disagrees with the object.", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "disagree" -}, -"title": { -"type": "string", -"default": "{actor.displayName} disagrees with {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/main/jsonschema/verbs/dislike.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/dislike.json b/streams-schemas/src/main/jsonschema/verbs/dislike.json deleted file mode 100644 index 308d5eb..000 --- a/streams-schemas/src/main/jsonschema/verbs/dislike.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/dislike.json#";, -"type": "object", -"title": "Dislike", -"description": "Indicates that the actor dislikes the object. Note that the \"dislike\" verb is distinct from the \"unlike\" verb which assumes that the object had been previously \"liked\".", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "dislike" -}, -"title": { -"type": "string", -"default": "{actor.displayName} dislikes {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/main/jsonschema/verbs/experience.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/experience.json b/streams-schemas/src/main/jsonschema/verbs/experience.json deleted file mode 100644 index 543ac2c..000 --- a/streams-schemas/src/main/jsonschema/verbs/experience.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/experience.json#";, -"type": "object", -"title": "Experience", -"description": "Indicates that the actor has experienced the object in some manner. Note that, depending on the specific object types used for both the actor and object, the meaning of this verb can overlap that of the \"consume\" and \"play\" verbs. For instance, a person might \"experience\" a movie; or \"play\" the movie; or \"consume\" the movie. The \"experience\" verb can be considered a more generic form of other more specific verbs as \"consume\", \"play\", \"watch\", \"listen\", and \"read\"", -"extends": { -"$ref": "../activity.json" -}, -"properties": { -"verb": { -"type": "string", -"default": "experience" -}, -"title": { -"type": "string", -"default": "{actor.displayName} experienced {object.displayName}" -} -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/main/jsonschema/verbs/favorite.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/favorite.json b/streams-schemas/src/main/jsonschema/verbs/favorite.json deleted file mode 100644 index 17e2490..000 --- a/streams-schemas/src/main/jsonschema/verbs/favorite.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-ag
[37/46] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/resources/activities/accept.json -- diff --git a/streams-util/src/test/resources/activities/accept.json b/streams-util/src/test/resources/activities/accept.json new file mode 100644 index 000..c1dfd5f --- /dev/null +++ b/streams-util/src/test/resources/activities/accept.json @@ -0,0 +1,16 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Sally" + }, + "verb": "accept", + "object": { +"objectType": "job", +"displayName": "Director of Marketing" + }, + "title": "Sally accepted the Director of Marketing job." +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/resources/activities/access.json -- diff --git a/streams-util/src/test/resources/activities/access.json b/streams-util/src/test/resources/activities/access.json new file mode 100644 index 000..93bc6e2 --- /dev/null +++ b/streams-util/src/test/resources/activities/access.json @@ -0,0 +1,17 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Joe" + }, + "verb": "access", + "object": { +"objectType": "file", +"displayName": "4Q2012 Sales Forecast.xls" + }, + "published": "2012-12-12T12:12:12Z", + "title": "Joe accessed the file \"4Q2012 Sales Forecast.xls\"" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/resources/activities/acknowledge.json -- diff --git a/streams-util/src/test/resources/activities/acknowledge.json b/streams-util/src/test/resources/activities/acknowledge.json new file mode 100644 index 000..2b69fa7 --- /dev/null +++ b/streams-util/src/test/resources/activities/acknowledge.json @@ -0,0 +1,16 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Sally" + }, + "verb": "acknowledge", + "object": { +"objectType": "issue", +"displayName": "#123: There is a problem with the build" + }, + "content": "Sally acknowledged Issue #123" +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/resources/activities/add.json -- diff --git a/streams-util/src/test/resources/activities/add.json b/streams-util/src/test/resources/activities/add.json new file mode 100644 index 000..b4e8151 --- /dev/null +++ b/streams-util/src/test/resources/activities/add.json @@ -0,0 +1,21 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Joe" + }, + "verb": "add", + "object": { +"objectType": "image", +"displayName": "My cat", +"fullImage": {"url": "http://example.org/cat.jpg"} + }, + "target": { +"objectType": "collection", +"displayName": "Joe's Photo Album", +"objectTypes": ["image"] + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/resources/activities/agree.json -- diff --git a/streams-util/src/test/resources/activities/agree.json b/streams-util/src/test/resources/activities/agree.json new file mode 100644 index 000..3034cd8 --- /dev/null +++ b/streams-util/src/test/resources/activities/agree.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Sally" + }, + "verb": "agree", + "object": { +"objectType": "article", +"displayName": "Some Random Article Online" + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-util/src/test/resources/activities/append.json -- diff --git a/streams-util/src/test/resources/activities/append.json b/streams-util/src/test/resources/activities/append.json new file mode 100644 index 000..d8fb3be --- /dev/null +++ b/streams-util/src/test/resources/activities/append.json @@ -0,0 +1,16
[31/46] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/main/jsonschema/verbs/join.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/join.json b/streams-schemas/src/main/jsonschema/verbs/join.json index 78daed8..5276072 100644 --- a/streams-schemas/src/main/jsonschema/verbs/join.json +++ b/streams-schemas/src/main/jsonschema/verbs/join.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/join.json#";, "type": "object", "title": "Join", "description": "Indicates that the actor has become a member of the object.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/main/jsonschema/verbs/leave.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/leave.json b/streams-schemas/src/main/jsonschema/verbs/leave.json index 1ce73bc..9995099 100644 --- a/streams-schemas/src/main/jsonschema/verbs/leave.json +++ b/streams-schemas/src/main/jsonschema/verbs/leave.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/leave.json#";, "type": "object", "title": "Leave", "description": "Indicates that the actor has left the object. For instance, a Person leaving a Group or checking-out of a Place.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/main/jsonschema/verbs/like.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/like.json b/streams-schemas/src/main/jsonschema/verbs/like.json index 4ac1bf7..d583305 100644 --- a/streams-schemas/src/main/jsonschema/verbs/like.json +++ b/streams-schemas/src/main/jsonschema/verbs/like.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/like.json#";, "type": "object", "title": "Like", "description": "Indicates that the actor marked the object as an item of special interest.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/main/jsonschema/verbs/listen.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/listen.json b/streams-schemas/src/main/jsonschema/verbs/listen.json index 3476144..9982ac6 100644 --- a/streams-schemas/src/main/jsonschema/verbs/listen.json +++ b/streams-schemas/src/main/jsonschema/verbs/listen.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/listen.json#";, "type": "object", "title": "Listen", "description": "Indicates that the actor has listened to the object. This is typically only applicable for objects representing audio content, such as music, an audio-book, or a radio broadcast.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/main/jsonschema/verbs/lose.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/lose.json b/streams-schemas/src/main/jsonschema/verbs/lose.json index 60899ba..1d959a4 100644 --- a/streams-schemas/src/main/jsonschema/verbs/lose.json +++ b/streams-schemas/src/main/jsonschema/verbs/lose.json @@ -4,7 +4,7 @@ "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, "http://www.apache.org/licenses/LICENSE-2.0"; ], -"id": "#", +"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/verbs/lose.json#";, "type": "object", "title": "Lose", "description": "Indicates that the actor has lost the object. For instance, if a person loses a game.", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/main/jsonschema/verbs/make-friend.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/make-friend.json b/streams-schemas/src/main/jsonschema/verbs/make-friend.json index a64
[07/46] incubator-streams git commit: create index.md for most modules
create index.md for most modules Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/6e5e5c20 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/6e5e5c20 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/6e5e5c20 Branch: refs/heads/STREAMS-389 Commit: 6e5e5c207269e77eabdbd8f9093f1f2db7132c24 Parents: 89e10dd Author: Steve Blackmon Authored: Mon Mar 28 08:26:50 2016 -0500 Committer: Steve Blackmon Committed: Mon Mar 28 08:26:50 2016 -0500 -- README.md | 2 + src/site/markdown/index.md | 22 +++- .../src/site/markdown/index.md | 6 +-- .../streams-filters/src/src/markdown/index.md | 6 +++ .../streams-http/src/site/markdown/index.md | 24 + streams-config/src/site/markdown/index.md | 6 +++ .../src/site/markdown/index.md | 19 +++ .../src/site/markdown/index.md | 19 +++ .../src/site/markdown/index.md | 39 ++ .../src/site/markdown/index.md | 14 + .../src/site/markdown/index.md | 54 .../src/site/markdown/index.md | 21 .../src/site/markdown/index.md | 28 ++ .../src/site/markdown/index.md | 15 ++ .../src/site/markdown/index.md | 15 ++ .../src/site/markdown/index.md | 6 +++ .../src/site/markdown/index.md | 6 +++ .../src/site/markdown/index.md | 14 + .../src/site/markdown/index.md | 6 +++ .../src/site/markdown/index.md | 6 +++ .../src/main/resources/datasift.conf| 8 +++ .../src/site/markdown/index.md | 10 ++-- .../src/main/resources/facebook.conf| 0 .../src/site/markdown/index.md | 5 +- .../gnip-powertrack/src/site/markdown/index.md | 13 + .../google-gmail/src/site/markdown/index.md | 8 ++- .../google-gplus/src/site/markdown/index.md | 6 +-- .../src/site/markdown/index.md | 4 +- .../src/site/markdown/index.md | 5 +- .../src/site/markdown/index.md | 5 +- .../src/site/markdown/index.md | 5 +- .../src/site/markdown/index.md | 5 +- .../src/site/markdown/index.md | 19 +++ streams-core/src/site/markdown/index.md | 6 +++ streams-monitoring/src/site/markdown/index.md | 6 +++ streams-pojo-extensions/README.md | 7 +-- .../src/site/markdown/README.md | 6 +++ streams-pojo/src/site/markdown/index.md | 5 +- .../src/site/markdown/index.md | 14 + .../src/site/markdown/index.md | 10 .../src/site/markdown/index.md | 6 +++ 41 files changed, 420 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5e5c20/README.md -- diff --git a/README.md b/README.md index 32b3c03..92d2627 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,5 @@ Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 [README.md](src/site/markdown/index.md "README") + + http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5e5c20/src/site/markdown/index.md -- diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 7dc4e4f..ba6bab8 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -1,14 +1,3 @@ -Apache Streams (incubating) -Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - -# org.apache.streams:streams-project - -Release Notes -= - -[CHANGELOG.md](CHANGELOG.md "CHANGELOG.md") - System Requirements === You need a platform that supports Java SE 7 or later. @@ -29,11 +18,14 @@ To build from source code: `mvn install` -Additional Documentation +Modules -[Modules](modules.md "Modules") +[Modules](modules.html "Modules") -[JavaDocs](apidocs/index.html "JavaDocs") +Release Notes += + +[CHANGELOG.md](CHANGELOG.md "CHANGELOG.md") -[TestJavaDocs](testapidocs/index.html "TestJavaDocs") +## Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5e5
[40/46] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/test/resources/objects/event.json -- diff --git a/streams-schemas/src/test/resources/objects/event.json b/streams-schemas/src/test/resources/objects/event.json deleted file mode 100644 index ae1108e..000 --- a/streams-schemas/src/test/resources/objects/event.json +++ /dev/null @@ -1,18 +0,0 @@ -{ -"objectType": "event", -"displayName": "Meeting with Joe", -"startTime": "2012-12-12T12:00:00Z", -"endTime: "2012-12-12T13:00:00Z", -"invited": { - "items": [ -{"objectType": "person", - "displayName": "Joe"} - ] -}, -"attending": { - "items": [ -{"objectType": "person", - "displayName": "Joe"} - ] -} -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/test/resources/objects/group.json -- diff --git a/streams-schemas/src/test/resources/objects/group.json b/streams-schemas/src/test/resources/objects/group.json deleted file mode 100644 index 9721874..000 --- a/streams-schemas/src/test/resources/objects/group.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "objectType": "group", - "displayName": "My Work Group", - "members": { - "items": [ - { - "objectType": "person", - "displayName": "Laura" - }, - { - "objectType": "person", - "displayName": "Mark" - } - ] - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/test/resources/objects/issue.json -- diff --git a/streams-schemas/src/test/resources/objects/issue.json b/streams-schemas/src/test/resources/objects/issue.json deleted file mode 100644 index 86bc6d2..000 --- a/streams-schemas/src/test/resources/objects/issue.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "objectType": "issue", - "displayName": "Terms of Use Violation", - "url": "http://.../terms-of-use";, - "types": [ -"http://example.org/codes/inappropriateMaterial";, -"http://example.org/codes/copyrightViolation"; - ] -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/test/resources/objects/note.json -- diff --git a/streams-schemas/src/test/resources/objects/note.json b/streams-schemas/src/test/resources/objects/note.json deleted file mode 100644 index 15a4495..000 --- a/streams-schemas/src/test/resources/objects/note.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "objectType": "note", - "displayName": "A note with a binary attachment", - "attachments": [ - { - "objectType": "binary", - "data": "dGhpcyBpcyB1bmNvbXByZXNzZWQgZGF0YQo=", - "md5": "827ae7e1ab45e4dd591d087c741e5770", - "length": 25 - } - ] -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/test/resources/objects/permission.json -- diff --git a/streams-schemas/src/test/resources/objects/permission.json b/streams-schemas/src/test/resources/objects/permission.json deleted file mode 100644 index 24b6fa2..000 --- a/streams-schemas/src/test/resources/objects/permission.json +++ /dev/null @@ -1,9 +0,0 @@ -{ -"objectType": "permission", -"displayName": "Permission to Edit File: 2Q2014 Sales Forecast.xls", -"scope": { - "objectType": "file", - "displayName": "2Q2014 Sales Forecast.xls" -}, -"actions": ["modify", "delete", "create"] -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/test/resources/objects/place.json -- diff --git a/streams-schemas/src/test/resources/objects/place.json b/streams-schemas/src/test/resources/objects/place.json deleted file mode 100644 index 8e454be..000 --- a/streams-schemas/src/test/resources/objects/place.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "objectType": "place", - "displayName": "Some Random Location on Earth", - "position": { - "latitude": 34.34, - "longitude": -127.23, - "altitude": 100.05 - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/test/resources/objects/task.json -- diff --git a/streams-schemas/src/test/resources/objects/task.json b/streams-schemas/src/test/resources/objects/task.json deleted file mode 100644 index f4878dc..000 --- a/streams-schemas/src/test/resources/objects/task.json +++ /dev/null @@ -1,16 +0,0 @@ -{ -"objectType": "task", -"displayName": "
[34/46] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-plugins/streams-plugin-elasticsearch/pom.xml -- diff --git a/streams-plugins/streams-plugin-elasticsearch/pom.xml b/streams-plugins/streams-plugin-elasticsearch/pom.xml new file mode 100644 index 000..4f0ed4a --- /dev/null +++ b/streams-plugins/streams-plugin-elasticsearch/pom.xml @@ -0,0 +1,245 @@ + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +4.0.0 +org.apache.streams.plugins +streams-plugin-elasticsearch +0.3-incubating-SNAPSHOT +maven-plugin + + +org.apache.streams +streams-plugins +0.3-incubating-SNAPSHOT +.. + + + +2.3.0 +5.4.0 + + + + +org.apache.streams +streams-config +${project.version} + + +commons-logging +commons-logging + + + + +org.apache.streams +streams-core +${project.version} + + +org.apache.streams +streams-schemas +${project.version} + + +com.google.guava +guava + + +org.reflections +reflections +0.9.9 + + +org.apache.maven +maven-aether-provider +3.3.3 + + +org.apache.maven +maven-artifact +3.3.3 +provided + + +org.apache.maven +maven-compat +3.3.3 +test + + +org.apache.maven +maven-core +3.3.3 + + +org.sonatype.aether +* + + + + +org.apache.maven +maven-plugin-api +3.3.3 + + +org.apache.maven.plugins +maven-resources-plugin +2.7 + + +org.apache.maven +* + + + + +org.apache.maven.shared +maven-verifier +1.6 +test + + +org.codehaus.plexus +plexus-utils +3.0.15 + + +org.apache.maven.plugins +maven-plugin-plugin +3.4 + + +commons-logging +commons-logging + + + + +org.apache.maven.plugin-tools +maven-plugin-tools-api +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-annotations +3.3 + + +org.apache.maven.plugin-tools +maven-plugin-tools-generators +3.3 + + +org.apache.maven.plugin-testing +maven-plugin-testing-harness +3.3.0 +test + + +junit +junit +test + + +commons-lang +commons-lang +2.6 + + +joda-time +joda-time +2.2 + + +org.joda +joda-convert +1.8.1 + + + + +src/main/java +src/test/java + + +src/main/resources + + + + +src/test/resources + + + + +maven-plugin-plugin +3.4 + + true + + + +mojo-descriptor +process-classes + +descriptor + + + + + +org.reflections +reflections-maven + + + +reflections + +process-classes + + + + +org.apache.maven.plugins +maven-dependency-plugin +2.4 + + +resource-dependencies +process-test-resources +
[46/46] incubator-streams git commit: refactoring, testing, documentation, CLI modes
refactoring, testing, documentation, CLI modes break up streams-schemas into streams-util and streams-schema-activitystreams add index.md to each plugin specify basepath of jsonschema project-wide harmonize plugin behavior, code style, docs ensure all tests pass add CLI modes Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/d9674f7c Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/d9674f7c Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/d9674f7c Branch: refs/heads/STREAMS-389 Commit: d9674f7c0706d0e170f123c461d22e56e8f73807 Parents: 61f2736 Author: Steve Blackmon @steveblackmon Authored: Wed Jun 1 12:32:14 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:52:22 2016 -0500 -- .../spring/streams-cassandra-context.xml| 25 -- .../streams-plugin-cassandra/pom.xml| 13 +- .../StreamsCassandraGenerationConfig.java | 2 +- .../StreamsCassandraResourceGenerator.java | 42 +-- .../StreamsCassandraResourceGeneratorMojo.java | 37 +- .../src/site/markdown/index.md | 22 +- ...treamsCassandraResourceGeneratorCLITest.java | 10 +- ...reamsCassandraResourceGeneratorMojoTest.java | 9 +- .../StreamsCassandraResourceGeneratorTest.java | 58 +-- .../resources/streams-plugin-cassandra/pom.xml | 21 +- .../streams-plugin-elasticsearch/pom.xml| 13 +- .../StreamsElasticsearchGenerationConfig.java | 2 +- .../StreamsElasticsearchResourceGenerator.java | 75 ++-- ...reamsElasticsearchResourceGeneratorMojo.java | 29 +- .../src/site/markdown/index.md | 24 +- ...msElasticsearchResourceGeneratorCLITest.java | 39 ++ ...reamsElasticsearchResourceGeneratorTest.java | 59 +-- .../streams-plugin-elasticsearch/pom.xml| 23 +- streams-plugins/streams-plugin-hbase/pom.xml| 13 +- .../hbase/StreamsHbaseGenerationConfig.java | 2 +- .../hbase/StreamsHbaseResourceGenerator.java| 41 +- .../StreamsHbaseResourceGeneratorMojo.java | 28 +- .../src/site/markdown/index.md | 26 +- .../StreamsHbaseResourceGeneratorCLITest.java | 2 +- .../StreamsHbaseResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHbaseResourceGeneratorTest.java | 31 +- .../test/resources/streams-plugin-hbase/pom.xml | 23 +- streams-plugins/streams-plugin-hive/pom.xml | 13 +- .../hive/StreamsHiveGenerationConfig.java | 3 +- .../hive/StreamsHiveResourceGenerator.java | 35 +- .../hive/StreamsHiveResourceGeneratorMojo.java | 38 +- .../src/site/markdown/index.md | 28 +- .../StreamsHiveResourceGeneratorCLITest.java| 2 +- .../StreamsHiveResourceGeneratorMojoTest.java | 2 +- .../test/StreamsHiveResourceGeneratorTest.java | 32 +- .../test/resources/streams-plugin-hive/pom.xml | 23 +- streams-plugins/streams-plugin-pig/pom.xml | 13 +- .../plugins/pig/StreamsPigGenerationConfig.java | 3 +- .../pig/StreamsPigResourceGenerator.java| 46 +-- .../pig/StreamsPigResourceGeneratorMojo.java| 38 +- .../src/site/markdown/index.md | 24 +- .../StreamsPigResourceGeneratorCLITest.java | 4 +- .../StreamsPigResourceGeneratorMojoTest.java| 4 +- .../test/StreamsPigResourceGeneratorTest.java | 32 +- .../test/resources/streams-plugin-pig/pom.xml | 23 +- streams-plugins/streams-plugin-pojo/pom.xml | 13 +- .../plugins/StreamsPojoSourceGenerator.java | 15 +- .../plugins/StreamsPojoSourceGeneratorMojo.java | 154 +--- .../src/site/markdown/index.md | 24 +- .../test/StreamsPojoSourceGeneratorCLITest.java | 2 +- .../StreamsPojoSourceGeneratorMojoTest.java | 2 +- .../test/StreamsPojoSourceGeneratorTest.java| 51 +-- .../test/resources/streams-plugin-pojo/pom.xml | 30 +- streams-plugins/streams-plugin-scala/pom.xml| 12 + .../streams/plugins/StreamsPojoScala.java | 371 --- .../streams/plugins/StreamsPojoScalaMojo.java | 71 .../plugins/StreamsScalaSourceGenerator.java| 351 ++ .../StreamsScalaSourceGeneratorMojo.java| 59 +++ .../src/site/markdown/index.md | 36 ++ .../plugins/test/StreamsPojoScalaTest.java | 55 --- .../test/StreamsScalaSourceGeneratorTest.java | 55 +++ streams-runtimes/streams-runtime-local/pom.xml | 2 +- streams-schemas/pom.xml | 77 +--- .../org/apache/streams/schema/FieldType.java| 13 - .../org/apache/streams/schema/FieldUtil.java| 59 --- .../org/apache/streams/schema/FileUtil.java | 76 .../apache/streams/schema/GenerationConfig.java | 115 -- .../java/org/apache/streams/schema/Schema.java | 57 --- .../org/apache/streams/schema/SchemaStore.java | 283 -- .../org
[18/46] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/terminate.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/terminate.json b/streams-schemas/src/main/jsonschema/verbs/terminate.json new file mode 100644 index 000..280eb31 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/terminate.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Terminate", +"description": "Indicates that the actor has terminated the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "terminate" +}, +"title": { +"type": "string", +"default": "{actor.displayName} terminated {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/tie.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/tie.json b/streams-schemas/src/main/jsonschema/verbs/tie.json new file mode 100644 index 000..7530ed2 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/tie.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Tie", +"description": "Indicates that the actor has neither won or lost the object. This verb is generally only applicable when the object represents some form of competition, such as a game.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "tie" +}, +"title": { +"type": "string", +"default": "{actor.displayName} tied at {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/unfavorite.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/unfavorite.json b/streams-schemas/src/main/jsonschema/verbs/unfavorite.json new file mode 100644 index 000..bfa9c20 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/unfavorite.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnFavorite", +"description": "Indicates that the actor has removed the object from the collection of favorited items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unfavorite" +}, +"title": { +"type": "string", +"default": "{actor.displayName} removed {object.displayName} as a favorite" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/unlike.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/unlike.json b/streams-schemas/src/main/jsonschema/verbs/unlike.json new file mode 100644 index 000..4dc75f6 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/unlike.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "UnLike", +"description": "Indicates that the actor has removed the object from the collection of liked items.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "unlike" +}, +"title": { +"type": "string", +"default": "{actor.displayName} no longer likes {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/unsatisfy.json ---
[19/46] incubator-streams git commit: STREAMS-398 - streams-schemas
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/approve.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/approve.json b/streams-schemas/src/main/jsonschema/verbs/approve.json new file mode 100644 index 000..ec66f9b --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/approve.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Approve", +"description": "Indicates that the actor has approved the object. For instance, a manager might approve a travel request.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "approve" +}, +"title": { +"type": "string", +"default": "{actor.displayName} approved {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/archive.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/archive.json b/streams-schemas/src/main/jsonschema/verbs/archive.json new file mode 100644 index 000..24aea16 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/archive.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Archive", +"description": "Indicates that the actor has archived the object.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "archive" +}, +"title": { +"type": "string", +"default": "{actor.displayName} archived {object.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/assign.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/assign.json b/streams-schemas/src/main/jsonschema/verbs/assign.json new file mode 100644 index 000..8fe5458 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/assign.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "Assign", +"description": "Indicates that the actor has assigned the object to the target.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "assign" +}, +"title": { +"type": "string", +"default": "{actor.displayName} assigned {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/at.json -- diff --git a/streams-schemas/src/main/jsonschema/verbs/at.json b/streams-schemas/src/main/jsonschema/verbs/at.json new file mode 100644 index 000..42c1222 --- /dev/null +++ b/streams-schemas/src/main/jsonschema/verbs/at.json @@ -0,0 +1,24 @@ +{ +"$schema": "http://json-schema.org/draft-03/schema";, +"$license": [ + "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; +], +"id": "#", +"type": "object", +"title": "At", +"description": "Indicates that the actor is currently located at the object. For instance, a person being at a specific physical location.", +"extends": { +"$ref": "../activity.json" +}, +"properties": { +"verb": { +"type": "string", +"default": "assign" +}, +"title": { +"type": "string", +"default": "{actor.displayName} assigned {object.displayName} to {target.displayName}" +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0424855c/streams-schemas/src/main/jsonschema/verbs/attach.json -- diff --git a/streams-schema
[09/46] incubator-streams git commit: add diagrams and improve index.md for provider / persist modules
add diagrams and improve index.md for provider / persist modules Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/a786c8b8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/a786c8b8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/a786c8b8 Branch: refs/heads/STREAMS-389 Commit: a786c8b8c65e080c3a7f2861b22374ed5a674acc Parents: 44bc089 Author: Steve Blackmon @steveblackmon Authored: Thu Apr 21 15:28:06 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Thu Apr 21 15:28:06 2016 -0500 -- .../src/main/resources/components.dot | 31 +++ .../src/main/resources/kinesis-read.conf| 10 .../src/site/markdown/index.md | 24 + .../src/main/resources/components.dot | 32 .../src/main/resources/s3-read.conf | 10 .../src/site/markdown/index.md | 24 + .../src/main/resources/components.dot | 25 + .../src/site/markdown/index.md | 15 ++ .../src/site/markdown/index.md | 52 +++--- .../src/main/resources/components.dot | 31 +++ .../src/main/resources/filebuffer.conf | 3 ++ .../src/site/markdown/index.md | 24 ++--- .../src/main/resources/components.dot | 32 .../src/main/resources/graph-read.conf | 21 .../src/main/resources/graph-write.conf | 21 .../src/site/markdown/index.md | 55 .../src/main/resources/components.dot | 29 +++ .../src/main/resources/hbase.conf | 12 + .../src/site/markdown/index.md | 25 + .../src/main/resources/components.dot | 32 .../src/main/resources/hdfs-read.conf | 8 +++ .../src/main/resources/hdfs-write.conf | 8 +++ .../src/site/markdown/index.md | 31 +-- .../src/test/resources/hdfs-read.conf | 9 .../src/test/resources/hdfs-write.conf | 7 +++ .../src/main/resources/kafka.conf | 6 +++ .../src/site/markdown/index.md | 22 +--- .../src/main/resources/components.dot | 32 .../src/main/resources/mongo.conf | 6 +++ .../src/main/resources/reference.conf | 8 --- .../src/site/markdown/index.md | 22 +--- .../streams-provider-moreover/README.md | 21 +++- .../src/main/resources/components.dot | 36 + .../src/main/resources/moreover.conf| 8 +++ .../src/site/markdown/index.md | 17 -- .../src/main/resources/components.dot | 33 .../src/site/markdown/index.md | 4 +- 37 files changed, 601 insertions(+), 185 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/a786c8b8/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot -- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot new file mode 100644 index 000..736c7f4 --- /dev/null +++ b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/components.dot @@ -0,0 +1,31 @@ +digraph g { + + graph [compound = true]; + + //presentation + splines = true; + overlap = false; + rankdir = TB; + + generators [label="generators", shape="circle"]; + providers [label="providers", shape="circle"]; + processors [label="processors", shape="circle"]; + + subgraph cluster_persisters { +label="persisters"; +persisters_kinesis_reader [label="KinesisPersistReader"] +persisters_kinesis_writer [label="KinesisPersistWriter"] + } + + subgraph cluster_queues { +label="queues"; +kinesis [label="kinesis"] + } + + generators -> providers + providers -> processors + processors -> persisters_kinesis_writer [label="o.a.s.p.StreamsDatum"] + persisters_kinesis_reader -> processors [label="o.a.s.p.StreamsDatum[String]"] + persisters_kinesis_writer -> kinesis + persisters_kinesis_reader <- kinesis +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/a786c8b8/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/kinesis-read.conf -- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/src/main/resources/kinesis-read.conf b/streams-contrib/stre
[35/46] incubator-streams git commit: WIP for apachecon
WIP for apachecon Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/1bc84dbc Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/1bc84dbc Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/1bc84dbc Branch: refs/heads/STREAMS-389 Commit: 1bc84dbc614cc0537e3238a6786a005f609b429c Parents: 114c1c5 Author: Steve Blackmon @steveblackmon Authored: Fri May 6 19:45:12 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Wed Jun 1 12:51:43 2016 -0500 -- pom.xml | 10 - streams-config/pom.xml | 2 +- .../spring/streams-cassandra-context.xml| 25 ++ .../src/main/jsonschema/com/twitter/tweet.json | 6 +- streams-plugins/pom.xml | 4 + .../streams-plugin-cassandra/pom.xml| 244 .../StreamsCassandraGenerationConfig.java | 81 .../StreamsCassandraResourceGenerator.java | 376 +++ .../StreamsCassandraResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ ...treamsCassandraResourceGeneratorCLITest.java | 50 +++ ...reamsCassandraResourceGeneratorMojoTest.java | 75 .../StreamsCassandraResourceGeneratorTest.java | 124 ++ .../resources/streams-plugin-cassandra/pom.xml | 75 .../streams-plugin-elasticsearch/pom.xml| 245 .../StreamsElasticsearchGenerationConfig.java | 81 .../StreamsElasticsearchResourceGenerator.java | 373 ++ ...reamsElasticsearchResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ ...sElasticsearchResourceGeneratorMojoTest.java | 50 +++ ...reamsElasticsearchResourceGeneratorTest.java | 139 +++ .../streams-plugin-elasticsearch/pom.xml| 75 streams-plugins/streams-plugin-hbase/pom.xml| 244 .../hbase/StreamsHbaseGenerationConfig.java | 90 + .../hbase/StreamsHbaseResourceGenerator.java| 204 ++ .../StreamsHbaseResourceGeneratorMojo.java | 93 + .../src/site/markdown/index.md | 22 ++ .../StreamsHbaseResourceGeneratorCLITest.java | 41 ++ .../StreamsHbaseResourceGeneratorMojoTest.java | 65 .../test/StreamsHbaseResourceGeneratorTest.java | 125 ++ .../test/resources/streams-plugin-hbase/pom.xml | 76 streams-plugins/streams-plugin-hive/pom.xml | 6 + .../hive/StreamsHiveResourceGenerator.java | 7 +- .../hive/StreamsHiveResourceGeneratorMojo.java | 33 +- .../src/site/markdown/index.md | 22 ++ .../StreamsHiveResourceGeneratorCLITest.java| 41 ++ .../StreamsHiveResourceGeneratorMojoTest.java | 64 .../test/StreamsHiveResourceGeneratorTest.java | 21 +- .../test/resources/streams-plugin-hive/pom.xml | 41 +- streams-plugins/streams-plugin-pig/pom.xml | 244 .../plugins/pig/StreamsPigGenerationConfig.java | 84 + .../pig/StreamsPigResourceGenerator.java| 317 .../pig/StreamsPigResourceGeneratorMojo.java| 93 + .../src/site/markdown/index.md | 22 ++ .../StreamsPigResourceGeneratorCLITest.java | 39 ++ .../StreamsPigResourceGeneratorMojoTest.java| 64 .../test/StreamsPigResourceGeneratorTest.java | 122 ++ .../src/test/resources/expected/media_link.pig | 1 + .../resources/expected/objectTypes/file.pig | 1 + .../expected/objectTypes/photo-album.pig| 1 + .../test/resources/streams-plugin-pig/pom.xml | 75 streams-plugins/streams-plugin-pojo/pom.xml | 7 - .../plugins/StreamsPojoSourceGenerator.java | 16 +- .../plugins/StreamsPojoSourceGeneratorMojo.java | 43 +-- .../src/site/markdown/index.md | 22 ++ .../test/StreamsPojoSourceGeneratorCLITest.java | 43 +++ .../StreamsPojoSourceGeneratorMojoTest.java | 68 +--- .../test/StreamsPojoSourceGeneratorTest.java| 28 +- .../test/resources/streams-plugin-pojo/pom.xml | 1 + .../org/apache/streams/schema/FieldUtil.java| 30 ++ .../org/apache/streams/schema/FileUtil.java | 13 +- .../apache/streams/schema/GenerationConfig.java | 4 +- .../org/apache/streams/schema/SchemaUtil.java | 4 +- .../src/main/jsonschema/activity.json | 10 +- .../src/main/jsonschema/collection.json | 2 +- .../src/main/jsonschema/media_link.json | 2 +- streams-schemas/src/main/jsonschema/object.json | 6 +- .../src/main/jsonschema/objectTypes/alert.json | 2 +- .../jsonschema/objectTypes/application.json | 2 +- .../main/jsonschema/objectTypes/article.json| 2 +- .../src/main/jsonschema/objectTypes/audio.json | 2 +- .../src/main/jsonschema/objectTypes/badge.json | 2 +- .../src/main/jso
[43/46] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-schemas/src/main/jsonschema/object.json -- diff --git a/streams-schemas/src/main/jsonschema/object.json b/streams-schemas/src/main/jsonschema/object.json deleted file mode 100644 index 94f6719..000 --- a/streams-schemas/src/main/jsonschema/object.json +++ /dev/null @@ -1,98 +0,0 @@ -{ -"$schema": "http://json-schema.org/draft-03/schema";, -"$license": [ - "http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, -"http://www.apache.org/licenses/LICENSE-2.0"; -], -"id": "http://streams.incubator.apache.org/site/0.3-incubating-SNAPSHOT/streams-schemas/object.json#";, -"type": "object", -"title": "object", -"javaInterfaces": ["java.io.Serializable"], -"description": "Basic object on the web. The only required property is the id", -"properties": { -"id": { -"type": "string", -"description": "Provides a permanent, universally unique identifier for the object in the form of an absolute IRI [RFC3987]. An object SHOULD contain a single id property. If an object does not contain an id property, consumers MAY use the value of the url property as a less-reliable, non-unique identifier.", -"required": true -}, -"image": { -"format": "image", -"type": "object", -"description": "Description of a resource providing a visual representation of the object, intended for human consumption. An object MAY contain an image property whose value is a Media Link.", -"extends": { -"$ref": "./media_link.json" -} -}, -"displayName": { -"type": "string", -"description": "A natural-language, human-readable and plain-text name for the object. HTML markup MUST NOT be included. An object MAY contain a displayName property. If the object does not specify an objectType property, the object SHOULD specify a displayName" -}, -"summary": { -"type": "string", -"description": "Natural-language summary of the object encoded as a single JSON String containing HTML markup. Visual elements such as thumbnail images MAY be included. An activity MAY contain a summary property" -}, -"content": { -"type": "string", -"description": "Natural-language description of the object encoded as a single JSON String containing HTML markup. Visual elements such as thumbnail images MAY be included. An object MAY contain a content property" -}, -"url": { -"type": "string", -"format": "url", -"description": "An IRI [RFC3987] identifying a resource providing an HTML representation of the object. An object MAY contain a url property" -}, -"objectType": { -"type": "string", -"description": "Identifies the type of object. An object MAY contain an objectType property whose value is a JSON String that is non-empty and matches either the \"isegment-nz-nc\" or the \"IRI\" production in [RFC3987]. Note that the use of a relative reference other than a simple name is not allowed. If no objectType property is contained, the object has no specific type." -}, -"author": { -"type": "object", -"description": "Describes the entity that created or authored the object. An object MAY contain a single author property whose value is an Object of any type. Note that the author field identifies the entity that created the object and does not necessarily identify the entity that published the object. For instance, it may be the case that an object created by one person is posted and published to a system by an entirely different entity", -"javaInterfaces": ["java.io.Serializable"], -"extends": { -"$ref": "./object.json" -} -}, -"published": { -"type": "string", -"description": "[RFC3339] date-time. The date and time at which the object was published. An object MAY contain a published property", -"format": "date-time" -}, -"updated": { -"type": "string", -"description": "[RFC3339] date-time. The date and time at which a previously published object has been modified. An Object MAY contain an updated property.", -"format": "date-time" -}, -"attachments": { -"title": "Related objects", -"description": "A collection of one or more additional, associated objects, similar to the concept of attached files in an email message. An object MAY have an attachedObjects property whose value is a JSON Array of Objects.", -"type": "array", -"items": { -
[44/46] incubator-streams git commit: refactoring, testing, documentation, CLI modes
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-scala/pom.xml -- diff --git a/streams-plugins/streams-plugin-scala/pom.xml b/streams-plugins/streams-plugin-scala/pom.xml index f718260..3988142 100644 --- a/streams-plugins/streams-plugin-scala/pom.xml +++ b/streams-plugins/streams-plugin-scala/pom.xml @@ -42,6 +42,18 @@ ${project.version} +org.apache.streams +streams-util +${project.version} + + +org.apache.streams +streams-schema-activitystreams +${project.version} +test-jar +test + + org.jsonschema2pojo jsonschema2pojo-core http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-scala/src/main/java/org/apache/streams/plugins/StreamsPojoScala.java -- diff --git a/streams-plugins/streams-plugin-scala/src/main/java/org/apache/streams/plugins/StreamsPojoScala.java b/streams-plugins/streams-plugin-scala/src/main/java/org/apache/streams/plugins/StreamsPojoScala.java deleted file mode 100644 index 1c3e317..000 --- a/streams-plugins/streams-plugin-scala/src/main/java/org/apache/streams/plugins/StreamsPojoScala.java +++ /dev/null @@ -1,371 +0,0 @@ -package org.apache.streams.plugins; - -import com.google.common.base.Strings; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; -import org.apache.streams.data.DocumentClassifier; -import org.reflections.ReflectionUtils; -import org.reflections.Reflections; -import org.reflections.scanners.SubTypesScanner; -import org.reflections.scanners.TypeAnnotationsScanner; -import org.reflections.util.ClasspathHelper; -import org.reflections.util.ConfigurationBuilder; -import org.reflections.ReflectionUtils.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.Generated; -import java.io.File; -import java.io.IOException; -import java.io.Serializable; -import java.lang.reflect.Field; -import java.nio.file.Files; -import java.nio.file.OpenOption; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import java.util.concurrent.ConcurrentHashMap; - -/** - * Created by sblackmon on 11/18/15. - */ -public class StreamsPojoScala implements Runnable { - -private final static Logger LOGGER = LoggerFactory.getLogger(StreamsPojoScala.class); - -private final static String LS = System.getProperty("line.separator"); - -private StreamsPojoScalaMojo mojo; - -String outDir = "./target/generated-sources/scala"; -String packages = "org.apache.streams.pojo.json"; - -private final Reflections reflections = new Reflections( -new ConfigurationBuilder() -// TODO -.forPackages(packages) -.setScanners( -new SubTypesScanner(), -new TypeAnnotationsScanner())); - -public void main(String[] args) { -StreamsPojoScala streamsPojoScala = new StreamsPojoScala(); -Thread thread = new Thread(streamsPojoScala); -thread.start(); -try { -thread.join(); -} catch (InterruptedException e) { -LOGGER.error("InterruptedException", e); -} catch (Exception e) { -LOGGER.error("Exception", e); -} -return; -} - -public StreamsPojoScala(StreamsPojoScalaMojo mojo) { -this.mojo = mojo; -if (mojo != null && -mojo.getTarget() != null && -!Strings.isNullOrEmpty(mojo.getTarget().getAbsolutePath()) -) -outDir = mojo.getTarget().getAbsolutePath(); - -if (mojo != null && -mojo.getPackages() != null && -!Strings.isNullOrEmpty(mojo.getPackages()) -) -packages = mojo.getPackages(); -} - -public StreamsPojoScala() { -} - -public void run() { - -List> serializableClasses = detectSerializableClasses(); - -LOGGER.info("Detected {} serialiables:", serializableClasses.size()); -for( Class clazz : serializableClasses ) -LOGGER.debug(clazz.toString()); - -List> pojoClasses = detectPojoClasses(serializableClasses); - -LOGGER.info("Detected {} pojos:", pojoClasses.size()); -for( Class clazz : pojoClasses ) -LOGGER.debug(clazz.toString()); - -List> traits = detectTraits(pojoClasses); - -LOGGER.i
[28/46] incubator-streams git commit: WIP for apachecon
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/test/resources/activities/install.json -- diff --git a/streams-schemas/src/test/resources/activities/install.json b/streams-schemas/src/test/resources/activities/install.json new file mode 100644 index 000..1ecdecd --- /dev/null +++ b/streams-schemas/src/test/resources/activities/install.json @@ -0,0 +1,18 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "install", + "object": { +"objectType": "application", +"displayName": "Approved Software Scanning Tool", +"location": { + "displayName": "All computers in Building A" +} + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/test/resources/activities/interact.json -- diff --git a/streams-schemas/src/test/resources/activities/interact.json b/streams-schemas/src/test/resources/activities/interact.json new file mode 100644 index 000..f427513 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/interact.json @@ -0,0 +1,16 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Bob" + }, + "verb": "interact", + "object": { +"objectType": "person", +"displayName": "Laura" + }, + "title": "Bob called Laura." +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/test/resources/activities/invite.json -- diff --git a/streams-schemas/src/test/resources/activities/invite.json b/streams-schemas/src/test/resources/activities/invite.json new file mode 100644 index 000..7c84b78 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/invite.json @@ -0,0 +1,19 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "invite", + "object": { +"objectType": "person", +"displayName": "Mark" + }, + "target": { +"objectType": "event", +"displayName": "Job Interview" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/test/resources/activities/join.json -- diff --git a/streams-schemas/src/test/resources/activities/join.json b/streams-schemas/src/test/resources/activities/join.json new file mode 100644 index 000..7996a9b --- /dev/null +++ b/streams-schemas/src/test/resources/activities/join.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "join", + "object": { +"objectType": "organization", +"displayName": "Acme, Co" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/test/resources/activities/leave.json -- diff --git a/streams-schemas/src/test/resources/activities/leave.json b/streams-schemas/src/test/resources/activities/leave.json new file mode 100644 index 000..08516c5 --- /dev/null +++ b/streams-schemas/src/test/resources/activities/leave.json @@ -0,0 +1,15 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Mark" + }, + "verb": "leave", + "object": { +"objectType": "organization", +"displayName": "Other, Co" + } +} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1bc84dbc/streams-schemas/src/test/resources/activities/like.json -- diff --git a/streams-schemas/src/test/resources/activities/like.json b/streams-schemas/src/test/resources/activities/like.json new file mode 100644 index 000..853676f --- /dev/null +++ b/streams-schemas/src/test/resources/activities/like.json @@ -0,0 +1,22 @@ +{ + "$license": [ +"http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0";, +"http://www.apache.org/licenses/LICENSE-2.0"; + ], + "actor": { +"objectType": "person", +"displayName": "Laura" + }, + "verb": "like", + "ob
[12/46] incubator-streams git commit: prefix schema directories with ${project.basedir}
prefix schema directories with ${project.basedir} prefix schema directories with ${project.basedir} because newer org.jsonschema2pojo requires this to resolve the right directories during a maven multi-module build Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/2a4a96d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/2a4a96d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/2a4a96d7 Branch: refs/heads/STREAMS-389 Commit: 2a4a96d79adc79668b97e0b857fc363f79270081 Parents: d8fc702 Author: Steve Blackmon @steveblackmon Authored: Mon Apr 25 16:18:07 2016 -0500 Committer: Steve Blackmon @steveblackmon Committed: Mon Apr 25 16:18:07 2016 -0500 -- streams-components/streams-converters/pom.xml | 2 +- streams-components/streams-http/pom.xml | 2 +- streams-config/pom.xml| 2 +- .../streams-amazon-aws/streams-persist-kinesis/pom.xml| 2 +- .../streams-amazon-aws/streams-persist-s3/pom.xml | 6 +++--- streams-contrib/streams-persist-elasticsearch/pom.xml | 6 +++--- streams-contrib/streams-persist-filebuffer/pom.xml| 2 +- streams-contrib/streams-persist-graph/pom.xml | 2 +- streams-contrib/streams-persist-hbase/pom.xml | 2 +- streams-contrib/streams-persist-hdfs/pom.xml | 2 +- streams-contrib/streams-persist-kafka/pom.xml | 2 +- streams-contrib/streams-persist-mongo/pom.xml | 2 +- streams-contrib/streams-processor-lucene/pom.xml | 2 +- streams-contrib/streams-processor-peoplepattern/pom.xml | 2 +- streams-contrib/streams-processor-tika/pom.xml| 2 +- streams-contrib/streams-processor-urls/pom.xml| 2 +- streams-contrib/streams-provider-datasift/pom.xml | 2 +- streams-contrib/streams-provider-facebook/pom.xml | 10 +- .../streams-provider-gnip/gnip-edc-instagram/pom.xml | 2 +- .../streams-provider-gnip/gnip-powertrack/pom.xml | 2 +- .../streams-provider-google/google-gmail/pom.xml | 2 +- .../streams-provider-google/google-gplus/pom.xml | 2 +- streams-contrib/streams-provider-instagram/pom.xml| 4 ++-- streams-contrib/streams-provider-moreover/pom.xml | 4 ++-- streams-contrib/streams-provider-rss/pom.xml | 2 +- streams-contrib/streams-provider-sysomos/pom.xml | 4 ++-- streams-contrib/streams-provider-twitter/pom.xml | 2 +- streams-contrib/streams-provider-youtube/pom.xml | 2 +- streams-monitoring/pom.xml| 2 +- streams-runtimes/streams-runtime-dropwizard/pom.xml | 2 +- streams-runtimes/streams-runtime-local/pom.xml| 2 +- streams-verbs/pom.xml | 2 +- 32 files changed, 43 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/2a4a96d7/streams-components/streams-converters/pom.xml -- diff --git a/streams-components/streams-converters/pom.xml b/streams-components/streams-converters/pom.xml index 5615027..c0d6551 100644 --- a/streams-components/streams-converters/pom.xml +++ b/streams-components/streams-converters/pom.xml @@ -128,7 +128,7 @@ true true -src/main/jsonschema + ${project.basedir}/src/main/jsonschema target/generated-sources/jsonschema2pojo org.apache.streams.converter http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/2a4a96d7/streams-components/streams-http/pom.xml -- diff --git a/streams-components/streams-http/pom.xml b/streams-components/streams-http/pom.xml index 486698e..88cc88e 100644 --- a/streams-components/streams-http/pom.xml +++ b/streams-components/streams-http/pom.xml @@ -163,7 +163,7 @@ true true -src/main/jsonschema + ${project.basedir}/src/main/jsonschema target/generated-sources/jsonschema2pojo org.apache.streams.http http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/2a4a96d7/streams-config/pom.xml -- diff --git a/streams-config/pom.xml b/streams-config/pom.xml index f9d8de9..38d5554 100644 --- a/streams-config/pom.xml +++ b/streams-config/pom.xml @@ -124,7 +124,7 @@