mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ibrahim Yakti <iya...@souq.com>
Subject Re: How to start the factorize-movielens.sh from a PHP script ?
Date Mon, 14 Jan 2013 06:30:29 GMT
your php scripts run using apache user which most probably doesn't have
HADOOP_HOME, HADOOP_CONF_DIR, ...etc  variables defined, please try to
define them in the php script before making the call.

I hope it works.


--
Ibrahim


On Sun, Jan 13, 2013 at 11:38 PM, Sékine Coulibaly <scoulibaly@gmail.com>wrote:

> Hi there,
>
> I've been able to start locally the factorize-movielens script. What I'd
> like to do is basically create a PHP webservice able to start that very
> same script, and return the recommendations.
>
> I'm using Apache2, and I use PHP's shell_exec to start the script as
> follows :
>
>
> putenv("JAVA_HOME=" .'/usr/local/jvm/jdk1.7.0_05');
>  $output =
>
> shell_exec('/home/scoulibaly/Téléchargements/mahout-distribution-0.6/examples/bin/factorize-movielens-1M.sh
>
> /home/scoulibaly/Téléchargements/mahout-distribution-0.6/examples/bin/ratings.dat');
>  echo $output;
>
>
> Unfortunately the output I get is as follows :
>
> creating work directory at /tmp/mahout-work-www-data
>
> Converting ratings...
>
> MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
> no HADOOP_HOME set, running locally
> MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
> no HADOOP_HOME set, running locally
> MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
> no HADOOP_HOME set, running locally
> MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
> no HADOOP_HOME set, running locally
>
> RMSE is:
>
>
>
>
> Sample recommendations:
>
>
>
>
> removing work directory
>
>
> I know this is not strictly a Mahout issue, but if someone could point me a
> way to start Mahout jobs from a PHP script, I'd be very grateful !
>
> Thank you
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message