predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Praveen Prasannakumar <praveen2399wo...@gmail.com>
Subject PIO Train error - JDBC - Oracle / Classification Template
Date Wed, 07 Mar 2018 14:46:56 GMT
Hello Team

I am using classification template and using oracle jdbc as datastore. I am
getting a error during PIO Train. I had checked the Data store and I have
data. Copied the error , query and data exported in json below. Can you
please help ?

Exception in thread "main" java.lang.IllegalArgumentException: requirement
failed: RDD[labeledPoints] in PreparedData cannot be empty. Please check if
DataSource generates TrainingData and Preparator generates PreparedData
correctly.

        at scala.Predef$.require(Predef.scala:224)

        at
org.example.classification.NaiveBayesAlgorithm.train(NaiveBayesAlgorithm.scala:25)

        at
org.example.classification.NaiveBayesAlgorithm.train(NaiveBayesAlgorithm.scala:18)

        at
org.apache.predictionio.controller.P2LAlgorithm.trainBase(P2LAlgorithm.scala:49)

        at
org.apache.predictionio.controller.Engine$$anonfun$18.apply(Engine.scala:690)

        at
org.apache.predictionio.controller.Engine$$anonfun$18.apply(Engine.scala:690)

        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)

        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)

        at scala.collection.immutable.List.foreach(List.scala:381)

        at
scala.collection.TraversableLike$class.map(TraversableLike.scala:234)

        at scala.collection.immutable.List.map(List.scala:285)

        at
org.apache.predictionio.controller.Engine$.train(Engine.scala:690)

        at org.apache.predictionio.controller.Engine.train(Engine.scala:176)

        at
org.apache.predictionio.workflow.CoreWorkflow$.runTrain(CoreWorkflow.scala:67)

        at
org.apache.predictionio.workflow.CreateWorkflow$.main(CreateWorkflow.scala:254)

        at
org.apache.predictionio.workflow.CreateWorkflow.main(CreateWorkflow.scala)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at
org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:743)

        at
org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)

        at
org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)

        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)

        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Query  is :  select         id,         event,         entityType,
entityId,         targetEntityType,         targetEntityId,
properties,         eventTime,         eventTimeZone,         tags,
prId,         creationTime,         creationTimeZone       from
pio_event_42       where         eventTime >=
TO_DATE('20000101','yyyymmdd') and         eventTime <
TO_DATE('20200101','yyyymmdd')       and entityType = 'user'
and (event = '$set' or event = '$unset' or event = '$delete')


JSON Data from oracle Database :

[{"eventId":"36a4e04c6ae64bf499d80529f86c4542","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:17.336Z","creationTime":"2018-03-06T22:27:17.336Z"},{"eventId":"f22d1b09210a4af78dfaaa846fc85296","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:18.260Z","creationTime":"2018-03-06T22:27:18.260Z"},{"eventId":"07ab0aacb53b48fda35283ea66520613","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:18.762Z","creationTime":"2018-03-06T22:27:18.762Z"},{"eventId":"ed07830d82f8409ab69585319c046759","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:20.149Z","creationTime":"2018-03-06T22:27:20.149Z"},{"eventId":"085da152c76f40c286360d393d0afcc5","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:20.681Z","creationTime":"2018-03-06T22:27:20.681Z"},{"eventId":"f2a070bf9f984e118f5ac224a2eb4a9c","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:21.162Z","creationTime":"2018-03-06T22:27:21.162Z"},{"eventId":"48d8721217974a12871eae59a5e94d58","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:21.602Z","creationTime":"2018-03-06T22:27:21.602Z"},{"eventId":"dba190567485456ab04258260a388c9b","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:22.023Z","creationTime":"2018-03-06T22:27:22.023Z"},{"eventId":"a6fa9afe16674d408b5f0155e33263f2","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:23.383Z","creationTime":"2018-03-06T22:27:23.383Z"}]


Thanks
Praveen

Mime
View raw message