mhavey / mongomovie

MongoDB movie data model, ETL loader, and queries.
https://www.packtpub.com/books/content/mongo-goes-to-the-movies
15 stars 6 forks source link

I can't run this #1

Closed Marcel0024 closed 1 year ago

Marcel0024 commented 8 years ago

I don't understand the instructions. Sorry for my incompetence

mhavey commented 8 years ago

Let me help. Do you have an environment with MongoDB installed? Are you able to download the files from IMDB?

Sent from my iPhone

On Jun 5, 2016, at 7:57 AM, Marcel0024 notifications@github.com wrote:

I don't understand the instructions. Sorry for my incompetence

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Marcel0024 commented 8 years ago

Yes i downloaded all the files and placed them in imdb.

Java home should be pointed to a JRE,correct? So like this? JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_91\bin ETL_HOME=C:\Code\MongoMovies\mongomovie-master\lib CLASSPATH=$ ETL_HOME/imdbetl.jar:$ETL_HOME/log4j-1.2.17.jar:$ETL_HOME/mongo-java-driver-2.11.4.jar

Is that correct? Yes i have mongodb installed.

mhavey commented 8 years ago

From your note it looks like you are on a Windows platform but are trying to use one of the UNIX shell scripts. To run the ETL controller, use mongomovie/bin/etl/controller.cmd file. Edit the file to set your JAVA_HOME correctly, as shown below. Then open a command prompt, cd to the bin\etl directory and run controller.

setlocal

title controller set JAVA_HOME=c:\Program Files\Java\jre1.8.0_91 set ETL_HOME=....\lib

set CLASSPATH=%ETL_HOME%\imdbetl.jar;%ETL_HOME%\log4j-1.2.17.jar;%ETL_HOME%\mongo-java-driver-2.11.4.jar

"%JAVA_HOME%\bin\java" -Xms256m -Xmx1024m org.jude.bigdata.recroom.movies.etl.ETLController -props=controller.properties -clean=none -jobs=all -log4j=log4j.properties

pause

endlocal

On Sun, Jun 5, 2016 at 11:12 AM, Marcel0024 notifications@github.com wrote:

Yes i downloaded all the files and placed them in imdb.

Java home should be pointed to a JRE,correct? So like this? JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_91\bin ETL_HOME=C:\Code\MongoMovies\mongomovie-master\lib CLASSPATH=$

ETL_HOME/imdbetl.jar:$ETL_HOME/log4j-1.2.17.jar:$ETL_HOME/mongo-java-driver-2.11.4.jar

Is that correct? Yes i have mongodb installed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mhavey/mongomovie/issues/1#issuecomment-223818552, or mute the thread https://github.com/notifications/unsubscribe/AI5JQzmW7EbTlA4vGW_HmZjr4OuX59eBks5qIud7gaJpZM4IuVuH .

mhavey commented 8 years ago

I have not tested this carefully on a Windows platform, so please let me know how it goes and if you run into any issues.

On Mon, Jun 6, 2016 at 9:01 AM, Michael Havey mchavey@gmail.com wrote:

From your note it looks like you are on a Windows platform but are trying to use one of the UNIX shell scripts. To run the ETL controller, use mongomovie https://github.com/mhavey/mongomovie/bin https://github.com/mhavey/mongomovie/tree/master/bin/etl https://github.com/mhavey/mongomovie/tree/master/bin/etl/controller.cmd file. Edit the file to set your JAVA_HOME correctly, as shown below. Then open a command prompt, cd to the bin\etl directory and run controller.

setlocal

title controller set JAVA_HOME=c:\Program Files\Java\jre1.8.0_91 set ETL_HOME=....\lib

set CLASSPATH=%ETL_HOME%\imdbetl.jar;%ETL_HOME%\log4j-1.2.17.jar;%ETL_HOME%\mongo-java-driver-2.11.4.jar

"%JAVA_HOME%\bin\java" -Xms256m -Xmx1024m org.jude.bigdata.recroom.movies.etl.ETLController -props=controller.properties -clean=none -jobs=all -log4j=log4j.properties

pause

endlocal

On Sun, Jun 5, 2016 at 11:12 AM, Marcel0024 notifications@github.com wrote:

Yes i downloaded all the files and placed them in imdb.

Java home should be pointed to a JRE,correct? So like this? JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_91\bin ETL_HOME=C:\Code\MongoMovies\mongomovie-master\lib CLASSPATH=$

ETL_HOME/imdbetl.jar:$ETL_HOME/log4j-1.2.17.jar:$ETL_HOME/mongo-java-driver-2.11.4.jar

Is that correct? Yes i have mongodb installed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mhavey/mongomovie/issues/1#issuecomment-223818552, or mute the thread https://github.com/notifications/unsubscribe/AI5JQzmW7EbTlA4vGW_HmZjr4OuX59eBks5qIud7gaJpZM4IuVuH .

mhavey commented 8 years ago

A few more changes for Windows:

  1. Before running ETL job, edit mongomovie/bin/etl/controller.properties. Set IMDBPath with backslashes, as shown. Also edit MongoHost and MongoPort if necessary. MongoHost=localhost MongoPort=27017 MongoDB=movies IMDBPath=....\imdb
  2. Once ETL job is complete, if you want to run the queries in the mongo shell, open a command prompt and cd to the mongomovie/src/queries folder. Then run the mongo shell:
\bin\mongo --shell mongoqueries.js On Mon, Jun 6, 2016 at 9:01 AM, Michael Havey mchavey@gmail.com wrote: > I have not tested this carefully on a Windows platform, so please let me > know how it goes and if you run into any issues. > > On Mon, Jun 6, 2016 at 9:01 AM, Michael Havey mchavey@gmail.com wrote: > > > From your note it looks like you are on a Windows platform but are trying > > to use one of the UNIX shell scripts. To run the ETL controller, use > > mongomovie https://github.com/mhavey/mongomovie/bin > > https://github.com/mhavey/mongomovie/tree/master/bin/etl > > https://github.com/mhavey/mongomovie/tree/master/bin/etl/controller.cmd > > file. Edit the file to set your JAVA_HOME correctly, as shown below. Then > > open a command prompt, cd to the bin\etl directory and run controller. > > > > setlocal > > > > title controller > > set JAVA_HOME=c:\Program Files\Java\jre1.8.0_91 > > set ETL_HOME=....\lib > > > > set > > CLASSPATH=%ETL_HOME%\imdbetl.jar;%ETL_HOME%\log4j-1.2.17.jar;%ETL_HOME%\mongo-java-driver-2.11.4.jar > > > > "%JAVA_HOME%\bin\java" -Xms256m -Xmx1024m > > org.jude.bigdata.recroom.movies.etl.ETLController > > -props=controller.properties -clean=none -jobs=all -log4j=log4j.properties > > > > pause > > > > endlocal > > > > On Sun, Jun 5, 2016 at 11:12 AM, Marcel0024 notifications@github.com > > wrote: > > > > > Yes i downloaded all the files and placed them in imdb. > > > > > > Java home should be pointed to a JRE,correct? > > > So like this? > > > JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_91\bin > > > ETL_HOME=C:\Code\MongoMovies\mongomovie-master\lib > > > CLASSPATH=$ > > > > > > ETL_HOME/imdbetl.jar:$ETL_HOME/log4j-1.2.17.jar:$ETL_HOME/mongo-java-driver-2.11.4.jar > > > > > > Is that correct? > > > Yes i have mongodb installed. > > > > > > — > > > You are receiving this because you commented. > > > Reply to this email directly, view it on GitHub > > > https://github.com/mhavey/mongomovie/issues/1#issuecomment-223818552, > > > or mute the thread > > > https://github.com/notifications/unsubscribe/AI5JQzmW7EbTlA4vGW_HmZjr4OuX59eBks5qIud7gaJpZM4IuVuH > > > .