labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1425429 - in /labs/alike/trunk: ./ build.properties build.xml demo/README.txt
Date Sun, 23 Dec 2012 07:32:33 GMT
Author: koji
Date: Sun Dec 23 07:32:33 2012
New Revision: 1425429

URL: http://svn.apache.org/viewvc?rev=1425429&view=rev
Log:
add an ant target for creating hadoop job package

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

Propchange: labs/alike/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec 23 07:32:33 2012
@@ -7,3 +7,4 @@ lib
 test-result
 test-classes
 api
+apache-alike-*.job

Modified: labs/alike/trunk/build.properties
URL: http://svn.apache.org/viewvc/labs/alike/trunk/build.properties?rev=1425429&r1=1425428&r2=1425429&view=diff
==============================================================================
--- labs/alike/trunk/build.properties (original)
+++ labs/alike/trunk/build.properties Sun Dec 23 07:32:33 2012
@@ -12,6 +12,7 @@ prettify.dir           = ${tools.dir}/pr
 samples.dir            = samples
 d3.js                  = d3.v2.min.js
 product.jar            = ${PRODUCT_NAME}-${PRODUCT_VERSION}.jar
+product.job            = ${PRODUCT_NAME}-${PRODUCT_VERSION}.job
 
 compile.encoding       = UTF-8
 compile.debug          = true

Modified: labs/alike/trunk/build.xml
URL: http://svn.apache.org/viewvc/labs/alike/trunk/build.xml?rev=1425429&r1=1425428&r2=1425429&view=diff
==============================================================================
--- labs/alike/trunk/build.xml (original)
+++ labs/alike/trunk/build.xml Sun Dec 23 07:32:33 2012
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project name="apache-alike" xmlns:ivy="antlib:org.apache.ivy.ant"
-         default="alike-compile" basedir=".">
+         default="alike-dist" basedir=".">
 
     <dirname property="mybase.dir" file="${ant.file.apache-alike}"/>
     <property file="${mybase.dir}/build.properties"/>
@@ -87,6 +87,13 @@
         </javadoc>
     </target>
 
+    <target name="alike-dist" depends="alike-compile" description="make a package for
distributed job on hadoop cluster">
+        <jar destfile="${product.job}">
+            <fileset dir="${cls.dir}"/>
+            <fileset dir="${lib.dir}"/>
+        </jar>
+    </target>
+
     <!-- ================================================================== -->
     <!-- = TEST ALIKE                                                     = -->
     <!-- ================================================================== -->

Modified: labs/alike/trunk/demo/README.txt
URL: http://svn.apache.org/viewvc/labs/alike/trunk/demo/README.txt?rev=1425429&r1=1425428&r2=1425429&view=diff
==============================================================================
--- labs/alike/trunk/demo/README.txt (original)
+++ labs/alike/trunk/demo/README.txt Sun Dec 23 07:32:33 2012
@@ -15,7 +15,7 @@
 
 0. read ../README.txt and make sure you have "Prerequisites"
 
-1. compile alike (in the parent directory of this directory)
+1. build alike (in the parent directory of this directory)
 
    $ ant
 
@@ -60,8 +60,16 @@
 8. run clustering and vector quantization programs
 
    $ ant piv
+
    # kmeans may take tens of minutes
-   $ ant kmeans
+   # choose (1) or (2)
+     # (1) run kmeans via ant...
+     $ ant kmeans
+     # (2) ...or run it via hadoop command
+     $ cd ..
+     $ hadoop jar apache-alike-0.1.job org.apache.alike.KMeansLauncher demo/demo-conf.xml
+     $ cd demo
+
    $ ant clusterdump
    $ ant qv
 



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


Mime
View raw message