Repository: incubator-predictionio Updated Branches: refs/heads/develop 4e3d1993e -> 43b0e69f2
Enable event server to use provided event ID Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/commit/43b0e69f Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/tree/43b0e69f Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/diff/43b0e69f Branch: refs/heads/develop Commit: 43b0e69f2531c6fd37381e1b96eacc03456a3f40 Parents: 4e3d199 Author: Ahmet DAL <[email protected]> Authored: Tue Mar 7 10:21:34 2017 -0800 Committer: Donald Szeto <[email protected]> Committed: Tue Mar 7 10:21:34 2017 -0800 ---------------------------------------------------------------------- .../org/apache/predictionio/data/storage/EventJson4sSupport.scala | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/43b0e69f/data/src/main/scala/org/apache/predictionio/data/storage/EventJson4sSupport.scala ---------------------------------------------------------------------- diff --git a/data/src/main/scala/org/apache/predictionio/data/storage/EventJson4sSupport.scala b/data/src/main/scala/org/apache/predictionio/data/storage/EventJson4sSupport.scala index 7cfcfc9..ba20c61 100644 --- a/data/src/main/scala/org/apache/predictionio/data/storage/EventJson4sSupport.scala +++ b/data/src/main/scala/org/apache/predictionio/data/storage/EventJson4sSupport.scala @@ -50,6 +50,7 @@ object EventJson4sSupport { // use getOpt() if not required in json try { val event = fields.get[String]("event") + val eventId = fields.getOpt[String]("eventId") val entityType = fields.get[String]("entityType") val entityId = fields.get[String]("entityId") val targetEntityType = fields.getOpt[String]("targetEntityType") @@ -88,6 +89,7 @@ object EventJson4sSupport { val newEvent = Event( + eventId=eventId, event = event, entityType = entityType, entityId = entityId,
