Hi,
I am following the instructions here: http://actionml.com/docs/pio_versions
to add the possibility to delete events that are too old to template other
than Universal recommender. I want to add it to ecommerce recommendation.
However it doesnt seem to work.
I have the PredicitonIO 097-aml and the template ecommerce-recommendation
from apache-incubator (0.4.0)
I have the following 3 errors:
[ERROR] [Console$] [error]
/home/aml/incubator-predictionio-template-ecom-recommender/src/main/scala/DataSource.scala:21:
not found: type SelfCleaningDataSource
[ERROR] [Console$] [error] with SelfCleaningDataSource {
[ERROR] [Console$] [error] ^
[ERROR] [Console$] [error]
/home/aml/incubator-predictionio-template-ecom-recommender/src/main/scala/DataSource.scala:26:
value eventWindow is not a member of
org.template.ecommercerecommendation.DataSourceParams
[ERROR] [Console$] [error] override def eventWindow = dsp.eventWindow
[ERROR] [Console$] [error] ^
[ERROR] [Console$] [error]
/home/aml/incubator-predictionio-template-ecom-recommender/src/main/scala/DataSource.scala:31:
not found: value cleanPersistedPEvents
[ERROR] [Console$] [error] cleanPersistedPEvents(sc)
[ERROR] [Console$] [error] ^
[ERROR] [Console$] [error] three errors found
The first is related to the fact that DataSourceParams has no object
declared, so I added it in the declaration of the object DataSourceParams
but which type should I give to it? Is it an Object? I dont know Scala, so
I am not sure how to modify the code to make it work. In engine.json it
refers to :
"datasource": {
"params" : {
"name": "some-name",
"appName": "autocleangites22",
"eventNames": ["view"],
"eventWindow": {
"duration": "3650 days",
"removeDuplicates": false,
"compressProperties": false
}
}
so the code accesses to eventWindow.duration.
The second error says that the interface (that would be called so in Java
at least) SelfCleaningDataSource is not found in PredictionIO. When I have
a look at the code I find the interface, under some annotation
@DeveloperApi:
@DeveloperApi
trait SelfCleaningDataSource {
and here too (for the method generating the third error):
@DeveloperApi
def cleanPersistedPEvents(sc: SparkContext): Unit ={
which makes me wonder whether there is a special way to compile the source
code so that the code under this annotation is to be added?
Thanks in advance for your help,
Bruno