[ 
https://issues.apache.org/jira/browse/MAHOUT-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lina Hovanessian updated MAHOUT-1772:
-------------------------------------
    Description: 
I am trying to implement a recommender using Mahout. To create the DataModel I 
am using FileDataModel type. After creating the Recommender object , I want to 
save the model for later usage , just like what we have in Spark models.
FileDataModel is implementing and inheriting Serializable classes , so this 
means that it can be Serialized. However  when I try to write it the "" 
exception is thrown.
The root cause of this exception is "private final Splitter delimiterPattern;" 
variable of FileDataModel class. It is a non-serializable third party class 
which is not marked as a transient field as a result of which we get the 
exception mentioned above.
As a workaround , I created my own "MyFileDataModel" which is an exact copy of 
"FileDataModel" class but the "delimiterPattern" variable is marked as 
transient and it works perfectly. It would be better to mark the field as 
transient in the original class.

  was:
I am trying to implement a recommender using Mahout. To create the DataModel I 
am using FileDataModel type. After creating the Recommender object , I want to 
save the model for later usage , just like what we have in Spark models.
FileDataModel in implementing and inheriting Serializable classes , so this 
means that it can be Serialized. However  when I try to write it the "" 
exception is thrown.
The root cause of this exception is "private final Splitter delimiterPattern;" 
variable of FileDataModel class. It is a non-serializable third party class 
which is not marked as a transient field as a result of which we get the 
exception mentioned above.
As a workaround , I created my own "MyFileDataModel" which is an exact copy of 
"FileDataModel" class but the "delimiterPattern" variable is marked as 
transient and it works perfectly. It would be better to mark the field as 
transient in the original class.


> delimiterPattern instance variable of FileDataModel should be marked as a 
> Transient field
> -----------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-1772
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1772
>             Project: Mahout
>          Issue Type: Bug
>          Components: Collaborative Filtering
>    Affects Versions: 0.11.0
>            Reporter: Lina Hovanessian
>              Labels: easyfix, easytest
>
> I am trying to implement a recommender using Mahout. To create the DataModel 
> I am using FileDataModel type. After creating the Recommender object , I want 
> to save the model for later usage , just like what we have in Spark models.
> FileDataModel is implementing and inheriting Serializable classes , so this 
> means that it can be Serialized. However  when I try to write it the "" 
> exception is thrown.
> The root cause of this exception is "private final Splitter 
> delimiterPattern;" variable of FileDataModel class. It is a non-serializable 
> third party class which is not marked as a transient field as a result of 
> which we get the exception mentioned above.
> As a workaround , I created my own "MyFileDataModel" which is an exact copy 
> of "FileDataModel" class but the "delimiterPattern" variable is marked as 
> transient and it works perfectly. It would be better to mark the field as 
> transient in the original class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to