From user-return-1826-archive-asf-public=cust-asf.ponee.io@predictionio.apache.org Wed Mar 7 15:47:03 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id F19B0180656 for ; Wed, 7 Mar 2018 15:47:01 +0100 (CET) Received: (qmail 27152 invoked by uid 500); 7 Mar 2018 14:47:00 -0000 Mailing-List: contact user-help@predictionio.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@predictionio.apache.org Delivered-To: mailing list user@predictionio.apache.org Received: (qmail 27141 invoked by uid 99); 7 Mar 2018 14:47:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2018 14:47:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7073D1A0FF1 for ; Wed, 7 Mar 2018 14:47:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.129 X-Spam-Level: ** X-Spam-Status: No, score=2.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 1yqRVLok32wD for ; Wed, 7 Mar 2018 14:46:57 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 864915F473 for ; Wed, 7 Mar 2018 14:46:57 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id w128so5326589wmw.0 for ; Wed, 07 Mar 2018 06:46:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=lVRF2VGLbQ/BcHnpznsVu6uywQ3OV6VaPr/4Qb2kZrM=; b=dYxENwc1IvT9N3QoRMOBekfsc/eWWFSx8PC3P4SJp/NljZdKWovwxhA6S3OjDpShxv XtPTt4BblaRY6bCgcJLzVyvCBWLoAizEPG3c7wY90EDDlmOuwxQOAi3S7VgdZsd2sQis zzumC92ikx79tTtnV4qzmuto0imH5VfucrBw1k5US3X81/n93LDGeLGsdv/TzNTFWbE5 Gp63E/r77EuyxaFCLMhvAGUvTG4EYlZhwdFc3UYxR1nJKTZ/6aFijXEIWfqf7d59GudO gbvHAkCLC/gVki/nrbqO88WtcXlRtfHD5rV0iYto4fdJDsoPRPbFzdKEra40gbEpNPb3 ogPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lVRF2VGLbQ/BcHnpznsVu6uywQ3OV6VaPr/4Qb2kZrM=; b=ZWzkB0zjYnVVeFkQsfhjXp8SjGpWy5iED3GGfkrolu6kW/svy7Ga/6rsN5oCv4gdR5 ZG+PxQnOSNBpRX4kXkbVpOMcWqHRIB0n+69zHDpugDxPvCmOFlWhsMEJDTjnI6/qPdp3 k6KCsWQgBLt0w4XtHQSU0Y9ssjwJY3WQz1G0ELmkVQj2n0Kkp9RRGycR7oIRDNMv37CR OkNJyDRdCVbvocHkqtkO+zLXB7SRq8vvPKp22Gagf92NkFE4/VFAXaJ01XGmhU6aq67o 203moowTVfbM1btEuc2HXBEVYeQyopY90/0oXC5P3vu6yuYu61wEewiMoDu1me/oaVzw 5qmQ== X-Gm-Message-State: AElRT7EGNfWYScSFoUFLuiUl9P90n1fZxfnrPVTwrS8FhrjrhlnzIM7b m5Hj456shBzkjp+N3WKIYwSvdFaxndytfBAQTJ6WQA== X-Google-Smtp-Source: AG47ELucyiV1W/oYMeKVy+gR7bq4y8C8nqpofDz4Gq3+ov3bC9lTr3f4K/JAsWUIFZYFG9k4/EJisadR+5r1GLJdvu8= X-Received: by 10.28.55.129 with SMTP id e123mr14643133wma.78.1520434017000; Wed, 07 Mar 2018 06:46:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.142.227 with HTTP; Wed, 7 Mar 2018 06:46:56 -0800 (PST) From: Praveen Prasannakumar Date: Wed, 7 Mar 2018 20:16:56 +0530 Message-ID: Subject: PIO Train error - JDBC - Oracle / Classification Template To: Pat Ferrel , user@predictionio.apache.org Content-Type: multipart/alternative; boundary="001a11442c487ce1be0566d3a187" --001a11442c487ce1be0566d3a187 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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.sc= ala:25) at org.example.classification.NaiveBayesAlgorithm.train(NaiveBayesAlgorithm.sc= ala:18) at org.apache.predictionio.controller.P2LAlgorithm.trainBase(P2LAlgorithm.scal= a:49) at org.apache.predictionio.controller.Engine$$anonfun$18.apply(Engine.scala:69= 0) at org.apache.predictionio.controller.Engine$$anonfun$18.apply(Engine.scala:69= 0) 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:6= 2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp= l.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$r= unMain(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 >=3D TO_DATE('20000101','yyyymmdd') and eventTime < TO_DATE('20200101','yyyymmdd') and entityType =3D 'user' and (event =3D '$set' or event =3D '$unset' or event =3D '$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:1= 7.336Z"},{"eventId":"f22d1b09210a4af78dfaaa846fc85296","event":"$set","enti= tyType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,= "plan":1},"eventTime":"2018-03-06T22:27:18.260Z","creationTime":"2018-03-06= T22:27:18.260Z"},{"eventId":"07ab0aacb53b48fda35283ea66520613","event":"$se= t","entityType":"user","entityId":"u0","properties":{"attr0":0,"attr1":1,"a= ttr2":0,"plan":1},"eventTime":"2018-03-06T22:27:18.762Z","creationTime":"20= 18-03-06T22:27:18.762Z"},{"eventId":"ed07830d82f8409ab69585319c046759","eve= nt":"$set","entityType":"user","entityId":"u0","properties":{"attr0":0,"att= r1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:20.149Z","creationT= ime":"2018-03-06T22:27:20.149Z"},{"eventId":"085da152c76f40c286360d393d0afc= c5","event":"$set","entityType":"user","entityId":"u0","properties":{"attr0= ":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T22:27:20.681Z","c= reationTime":"2018-03-06T22:27:20.681Z"},{"eventId":"f2a070bf9f984e118f5ac2= 24a2eb4a9c","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":"48d8721217974a= 12871eae59a5e94d58","event":"$set","entityType":"user","entityId":"u0","pro= perties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTime":"2018-03-06T2= 2:27:21.602Z","creationTime":"2018-03-06T22:27:21.602Z"},{"eventId":"dba190= 567485456ab04258260a388c9b","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","ent= ityId":"u0","properties":{"attr0":0,"attr1":1,"attr2":0,"plan":1},"eventTim= e":"2018-03-06T22:27:23.383Z","creationTime":"2018-03-06T22:27:23.383Z"}] Thanks Praveen --001a11442c487ce1be0566d3a187 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Team

I am usi= ng 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. Co= pied 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 Prepare= dData cannot be empty. Please check if DataSource generates TrainingData an= d Preparator generates PreparedData correctly.

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at scala.Predef$.require(Predef.scala:224)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.example.clas= sification.NaiveBayesAlgorithm.train(NaiveBayesAlgorithm.scala:25)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.example.classificat= ion.NaiveBayesAlgorithm.train(NaiveBayesAlgorithm.scala:18)

= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.predictionio.contr= oller.P2LAlgorithm.trainBase(P2LAlgorithm.scala:49)

=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.predictionio.controller.Eng= ine$$anonfun$18.apply(Engine.scala:690)

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

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 at scala.collection.TraversableLike$$anonfun$map$1.apply(Traversa= bleLike.scala:234)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.s= cala:234)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at sca= la.collection.immutable.List.foreach(List.scala:381)

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at scala.collection.TraversableLike$cl= ass.map(TraversableLike.scala:234)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at scala.collection.immutable.List.map(List.scala:285)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.predi= ctionio.controller.Engine$.train(Engine.scala:690)

=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.predictionio.controller.Eng= ine.train(Engine.scala:176)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 at org.apache.predictionio.workflow.CoreWorkflow$.runTrain(CoreWo= rkflow.scala:67)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 a= t org.apache.predictionio.workflow.CreateWorkflow$.main(CreateWorkflow.scal= a:254)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apac= he.predictionio.workflow.CreateWorkflow.main(CreateWorkflow.scala)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at sun.reflect.NativeMetho= dAccessorImpl.invoke0(Native Method)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMet= hodAccessorImpl.java:62)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA= ccessorImpl.java:43)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 at java.lang.reflect.Method.invoke(Method.java:498)

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.spark.deploy.SparkSub= mit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:743)

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

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.spark.deploy.SparkSub= mit$.submit(SparkSubmit.scala:212)

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

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org= .apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)


Query=C2=A0 is :=C2=A0=C2= =A0select=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 id,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 e= vent,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 entityType,=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 entityId,=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 targetEntityType,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 targetEntityId,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 properties,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 eventTim= e,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 eventTimeZone,=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 tags,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 prId,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cr= eationTime,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 creationTimeZon= e=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 from pio_event_42=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 where=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ev= entTime >=3D TO_DATE('20000101','yyyymmdd') and=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 eventTime < TO_DATE('2020010= 1','yyyymmdd')=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 and entityTy= pe =3D 'user'=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 and (event =3D '$set' or event =3D '$u= nset' or event =3D '$delete')=C2=A0=C2=A0=C2=A0


JSON Data from oracle Database :=C2=A0

<= /span>
[{"eventId":"36a4= e04c6ae64bf499d80529f86c4542","event":"$set","= ;entityType":"user","entityId":"u0",&quo= t;properties":{"attr0":0,"attr1":1,"attr2&quo= t;:0,"plan":1},"eventTime":"2018-03-06T22:27:17.33= 6Z","creationTime":"2018-03-06T22:27:17.336Z"},{&q= uot;eventId":"f22d1b09210a4af78dfaaa846fc85296","event&= quot;:"$set","entityType":"user","entity= Id":"u0","properties":{"attr0":0,"a= ttr1":1,"attr2":0,"plan":1},"eventTime":= "2018-03-06T22:27:18.260Z","creationTime":"2018-03= -06T22:27:18.260Z"},{"eventId":"07ab0aacb53b48fda35283e= a66520613","event":"$set","entityType":&= quot;user","entityId":"u0","properties":= {"attr0":0,"attr1":1,"attr2":0,"plan&quo= t;:1},"eventTime":"2018-03-06T22:27:18.762Z","crea= tionTime":"2018-03-06T22:27:18.762Z"},{"eventId":&= quot;ed07830d82f8409ab69585319c046759","event":"$set&qu= ot;,"entityType":"user","entityId":"u0&q= uot;,"properties":{"attr0":0,"attr1":1,"= attr2":0,"plan":1},"eventTime":"2018-03-06T22= :27:20.149Z","creationTime":"2018-03-06T22:27:20.149Z&q= uot;},{"eventId":"085da152c76f40c286360d393d0afcc5",&qu= ot;event":"$set","entityType":"user",&qu= ot;entityId":"u0","properties":{"attr0":= 0,"attr1":1,"attr2":0,"plan":1},"eventTi= me":"2018-03-06T22:27:20.681Z","creationTime":&quo= t;2018-03-06T22:27:20.681Z"},{"eventId":"f2a070bf9f984e= 118f5ac224a2eb4a9c","event":"$set","entityTyp= e":"user","entityId":"u0","properti= es":{"attr0":0,"attr1":1,"attr2":0,"= ;plan":1},"eventTime":"2018-03-06T22:27:21.162Z",&= quot;creationTime":"2018-03-06T22:27:21.162Z"},{"eventI= d":"48d8721217974a12871eae59a5e94d58","event":&quo= t;$set","entityType":"user","entityId":&= quot;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&= quot;,"event":"$set","entityType":"user&= quot;,"entityId":"u0","properties":{"att= r0":0,"attr1":1,"attr2":0,"plan":1},&quo= t;eventTime":"2018-03-06T22:27:22.023Z","creationTime&q= uot;:"2018-03-06T22:27:22.023Z"},{"eventId":"a6fa9= afe16674d408b5f0155e33263f2","event":"$set","= entityType":"user","entityId":"u0","= ;properties":{"attr0":0,"attr1":1,"attr2"= ;:0,"plan":1},"eventTime":"2018-03-06T22:27:23.383= Z","creationTime":"2018-03-06T22:27:23.383Z"}]=C2=A0

Thanks
Praveen
--001a11442c487ce1be0566d3a187--