labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1425403 - in /labs/alike/trunk/demo: ./ README.txt build.xml
Date Sun, 23 Dec 2012 04:17:09 GMT
Author: koji
Date: Sun Dec 23 04:17:08 2012
New Revision: 1425403

URL: http://svn.apache.org/viewvc?rev=1425403&view=rev
Log:
change for hadoop distributed mode

Modified:
    labs/alike/trunk/demo/   (props changed)
    labs/alike/trunk/demo/README.txt
    labs/alike/trunk/demo/build.xml

Propchange: labs/alike/trunk/demo/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec 23 04:17:08 2012
@@ -8,3 +8,4 @@ output-clusters
 result-centroids.txt
 solr-demo-data.xml
 .input-vectors.crc
+hadoop-conf

Modified: labs/alike/trunk/demo/README.txt
URL: http://svn.apache.org/viewvc/labs/alike/trunk/demo/README.txt?rev=1425403&r1=1425402&r2=1425403&view=diff
==============================================================================
--- labs/alike/trunk/demo/README.txt (original)
+++ labs/alike/trunk/demo/README.txt Sun Dec 23 04:17:08 2012
@@ -15,31 +15,49 @@
 
 0. read ../README.txt and make sure you have "Prerequisites"
 
-1. change to this directory
+1. compile alike (in the parent directory of this directory)
+
+   $ ant
+
+2. change to this directory
 
    $ cd demo
 
-2. download ukbench image file
+3. download ukbench image file
 
    $ mkdir ukbench
    $ cd ukbench
    $ wget http://www.vis.uky.edu/~stewe/ukbench/ukbench.zip
 
-3. unzip the zip file
+4. unzip the zip file
 
    $ unzip ukbench.zip
 
-4. remove existing intermediate and result files of demo
+5. remove existing intermediate and result files of demo
 
    # go back to demo directory
    $ cd ..
    $ ant clean
 
-5. run extractor program
+6. run extractor program
 
    $ export PYTHONPATH=../src/python; python run_desc_extractor.py
 
-6. run clustering and vector quantization programs
+7. if you want to run mahout on hadoop distributed environment, do the following,
+   otherwise, go to 8.
+
+   (1) install Hadoop, set HADOOP_HOME environment variable
+   (2) copy $HADOOP_HOME/conf to demo/hadoop-conf
+       $ cp -R $HADOOP_HOME/conf hadoop-conf
+   (3) set JAVA_HOME and HADOOP_CLASSPATH in demo/hadoop-conf/hadoop-env.sh.
+       HADOOP_CLASSPATH should include all jar files in lib of parent directory
+       and demo/hadoop-conf directory
+   (4) set core-site.xml, hdfs-site.xml and mapred-site.xml appropriately in
+       demo/hadoop-conf directory
+   (5) set HADOOP_CONF_DIR environment variable to demo/hadoop-conf
+   (6) execute start-all.sh and hadoop namenode -format
+
+8. run clustering and vector quantization programs
 
    $ ant piv
    # kmeans may take tens of minutes
@@ -47,7 +65,7 @@
    $ ant clusterdump
    $ ant qv
 
-7. goto Solr site, download Solr 4.0 or superior and unzip
+9. goto Solr site, download Solr 4.0 or superior and unzip
 
    # Apache Solr web site and download apache-solr-4.0.0.tgz or superior
    http://lucene.apache.org/solr/
@@ -55,17 +73,17 @@
    # unzip
    $ tar xvzf apache-solr-4.0.0.tgz
 
-8. startup Solr server
+10. startup Solr server
 
    $ cd apache-solr-4.0.0/example
    $ java -Dsolr.solr.home=../../solrhome -jar start.jar
 
-9. index demo vector quantization data
+11. index demo vector quantization data
 
    $ ./post.sh solr-demo-data.xml
 
-10. startup demo web server
+12. startup demo web server
 
    $ python demoserver.py
 
-11. access to http://localhost:8080/ in your web browser and enjoy the demo!
+13. access to http://localhost:8080/ in your web browser and enjoy the demo!

Modified: labs/alike/trunk/demo/build.xml
URL: http://svn.apache.org/viewvc/labs/alike/trunk/demo/build.xml?rev=1425403&r1=1425402&r2=1425403&view=diff
==============================================================================
--- labs/alike/trunk/demo/build.xml (original)
+++ labs/alike/trunk/demo/build.xml Sun Dec 23 04:17:08 2012
@@ -22,30 +22,37 @@
 
     <import file="../build.xml"/>
 
-    <target name="piv" depends="alike-compile" description="run PrepareInputVectors">
+    <target name="check-hadoop">
+        <available file="demo/hadoop-conf" type="dir" property="hadoop.conf.dir" value="demo/hadoop-conf"/>
+    </target>
+
+    <target name="piv" depends="alike-compile, check-hadoop" description="run PrepareInputVectors">
         <java classname="org.apache.alike.PrepareInputVectors" dir="demo" fork="true">
             <jvmarg line="-Dfile.encoding=UTF-8"/>
             <arg line="demo-conf.xml"/>
             <classpath refid="common.path.lib"/>
             <classpath path="${cls.dir}"/>
+            <classpath path="${hadoop.conf.dir}"/>
         </java>
     </target>
 
-    <target name="kmeans" depends="alike-compile" description="run KMeansLauncher">
+    <target name="kmeans" depends="alike-compile, check-hadoop" description="run KMeansLauncher">
         <java classname="org.apache.alike.KMeansLauncher" dir="demo" fork="true">
             <jvmarg line="-Dfile.encoding=UTF-8"/>
             <arg line="demo-conf.xml"/>
             <classpath refid="common.path.lib"/>
             <classpath path="${cls.dir}"/>
+            <classpath path="${hadoop.conf.dir}"/>
         </java>
     </target>
 
-    <target name="clusterdump" depends="alike-compile" description="run ClusterDumperLauncher">
+    <target name="clusterdump" depends="alike-compile, check-hadoop" description="run
ClusterDumperLauncher">
         <java classname="org.apache.alike.ClusterDumperLauncher" dir="demo" fork="true">
             <jvmarg line="-Dfile.encoding=UTF-8"/>
             <arg line="demo-conf.xml"/>
             <classpath refid="common.path.lib"/>
             <classpath path="${cls.dir}"/>
+            <classpath path="${hadoop.conf.dir}"/>
         </java>
     </target>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message