cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pma...@apache.org
Subject svn commit: r749477 - in /incubator/cassandra/trunk: build.xml src/org/apache/cassandra/service/StorageService.java src/org/apache/cassandra/test/DBTest.java src/org/apache/cassandra/test/TestRunner.java
Date Mon, 02 Mar 2009 23:34:21 GMT
Author: pmalik
Date: Mon Mar  2 23:34:21 2009
New Revision: 749477

URL: http://svn.apache.org/viewvc?rev=749477&view=rev
Log:
Add build script and make sure it works

Added:
    incubator/cassandra/trunk/build.xml
Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java
    incubator/cassandra/trunk/src/org/apache/cassandra/test/DBTest.java
    incubator/cassandra/trunk/src/org/apache/cassandra/test/TestRunner.java

Added: incubator/cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/build.xml?rev=749477&view=auto
==============================================================================
--- incubator/cassandra/trunk/build.xml (added)
+++ incubator/cassandra/trunk/build.xml Mon Mar  2 23:34:21 2009
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project basedir="." default="build" name="cassandra">
+    <property environment="env"/>
+    <property name="debuglevel" value="source,lines,vars"/>
+
+    <property name="basedir" value="."/>
+    <property name="build.src" value="${basedir}/src"/>
+    <property name="build.lib" value="${basedir}/lib"/>
+    <property name="build.dir" value="${basedir}/build"/>
+    <property name="build.classes" value="${build.dir}/classes"/>
+    <property name="final.name" value="cassandra"/>
+
+    <!-- 
+	 Add all the dependencies.
+    -->
+    <path id="cassandra.classpath">
+        <pathelement location="${build.classes}"/>
+        <pathelement location="${build.lib}/activation.jar"/>
+        <pathelement location="${build.lib}/antlr-runtime-3.0.1.jar"/>
+        <pathelement location="${build.lib}/hadoop-core.jar"/>
+        <pathelement location="${build.lib}/asm-all-2.2.1.jar"/>
+        <pathelement location="${build.lib}/azul-collections.jar"/>
+        <pathelement location="${build.lib}/bcel-5.2.jar"/>
+        <pathelement location="${build.lib}/commons-cli-1.1.jar"/>
+        <pathelement location="${build.lib}/commons-javaflow-1.0-SNAPSHOT.jar"/>
+        <pathelement location="${build.lib}/colt.jar"/>
+        <pathelement location="${build.lib}/libfb303.jar"/> 
+        <pathelement location="${build.lib}/commons-logging-1.0.4.jar"/>
+        <pathelement location="${build.lib}/FastInfoset.jar"/>
+        <pathelement location="${build.lib}/commons-math-1.1.jar"/>
+        <pathelement location="${build.lib}/flanagan.jar"/>
+        <pathelement location="${build.lib}/j2ee.jar"/>
+        <pathelement location="${build.lib}/groovy-1.5.6.jar"/>
+        <pathelement location="${build.lib}/groovy-engine.jar"/>
+        <pathelement location="${build.lib}/javacore.jar"/>
+        <pathelement location="${build.lib}/javolution.jar"/>
+        <pathelement location="${build.lib}/jaxb1-impl.jar"/>
+        <pathelement location="${build.lib}/jaxb-api.jar"/>
+        <pathelement location="${build.lib}/jaxb-impl.jar"/>
+        <pathelement location="${build.lib}/jaxb-xjc.jar"/>
+        <pathelement location="${build.lib}/jaxws-2_0.jar"/>
+        <pathelement location="${build.lib}/jaxws-api.jar"/>
+        <pathelement location="${build.lib}/jaxws-rt.jar"/>
+        <pathelement location="${build.lib}/jettison.jar"/>
+        <pathelement location="${build.lib}/jline-0.9.94.jar"/>
+        <pathelement location="${build.lib}/JSAP-2.1.jar"/>
+        <pathelement location="${build.lib}/jsr173_api.jar"/>
+        <pathelement location="${build.lib}/jsr181-api.jar"/>
+        <pathelement location="${build.lib}/jsr250-api.jar"/>
+        <pathelement location="${build.lib}/libthrift.jar"/>
+        <pathelement location="${build.lib}/log4j-1.2.8.jar"/>
+        <pathelement location="${build.lib}/lucene-core-2.2.0.jar"/>
+        <pathelement location="${build.lib}/messaging.jar"/>
+        <pathelement location="${build.lib}/mysql-connector-java-5.0.7-bin.jar"/>
+        <pathelement location="${build.lib}/sjsxp.jar"/>
+        <pathelement location="${build.lib}/xerces.jar"/>
+        <pathelement location="${build.lib}/xpp3.jar"/>
+        <pathelement location="${build.lib}/xstream.jar"/>
+        <pathelement location="${build.lib}/trove-2.0.2.jar"/>
+        <pathelement location="${build.lib}/zookeeper-3.0.0.jar"/>
+        <pathelement location="${build.lib}/pcj.jar"/>
+        <pathelement location="${build.lib}/"/>
+    </path>
+
+    <!--
+	Setup the output directories.
+    -->
+    <target name="init">
+        <mkdir dir="${build.classes}"/>
+    </target>
+    <target name="clean">
+        <delete dir="${build.classes}"/>
+    </target>
+    <target depends="clean" name="cleanall"/>
+
+
+
+    <!--
+       This generates the CLI grammar files from Cli.g
+    -->
+    <target name="gen-cli-grammar">
+      <echo>Building Grammar ${build.src}/org/apache/cassandra/infrastructure/cli/Cli.g
 ....</echo>
+      <java classname="org.antlr.Tool"
+            classpath="${build.lib}/antlr-3.0.1.jar:${build.lib}/stringtemplate-3.0.jar:${build.lib}/antlr-2.7.7.jar"
+            fork="true">
+         <arg value="${build.src}/org/apache/cassandra/infrastructure/cli/Cli.g" />
+      </java>
+    </target>
+
+    <!--
+       This generates the CQL grammar files from Cql.g
+    -->
+    <target name="gen-cql-grammar">
+      <echo>Building Grammar ${build.src}/org/apache/cassandra/infrastructure/cql/compiler/parse/Cql.g
 ....</echo>
+      <java classname="org.antlr.Tool"
+            classpath="${build.lib}/antlr-3.0.1.jar:${build.lib}/stringtemplate-3.0.jar:${build.lib}/antlr-2.7.7.jar"
+            fork="true">
+         <arg value="${build.src}/org/apache/cassandra/infrastructure/cql/compiler/parse/Cql.g"
/>
+      </java>
+    </target>
+
+    <!--
+	The build target builds all the .class files
+    -->
+    <target depends="build-subprojects,build-project" name="build"/>
+    <target name="build-subprojects"/>
+    <target depends="init" name="build-project">
+        <echo message="${ant.project.name}: ${ant.file}"/>
+        <javac debug="true" debuglevel="${debuglevel}" destdir="${build.classes}">
+            <src path="${build.src}"/>
+            <classpath refid="cassandra.classpath"/>
+        </javac>
+    </target>
+
+    <!--
+	The jar target makes cassandra.jar output.
+    -->
+    <target name="jar" depends="build">
+    <jar jarfile="${build.dir}/${final.name}.jar"
+         basedir="${build.classes}">
+      <manifest>
+        <!-- <section name="org/apache/cassandra/infrastructure"> -->
+          <attribute name="Implementation-Title" value="Cassandra"/>
+          <attribute name="Implementation-Version" value="1.1"/>
+          <attribute name="Implementation-Vendor" value="Facebook"/>
+	        <attribute name="Premain-Class" value="org.apache.cassandra.infrastructure.continuations.CAgent"/>
+        <!-- </section> -->
+      </manifest>
+    </jar>
+  </target>
+
+
+</project>

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java?rev=749477&r1=749476&r2=749477&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/service/StorageService.java Mon Mar
 2 23:34:21 2009
@@ -70,11 +70,6 @@
 import org.apache.cassandra.locator.RackAwareStrategy;
 import org.apache.cassandra.locator.RackUnawareStrategy;
 import org.apache.cassandra.locator.TokenMetadata;
-import org.apache.cassandra.mapreduce.JobTracker;
-import org.apache.cassandra.mapreduce.MapAssignmentVerbHandler;
-import org.apache.cassandra.mapreduce.MapCompletionVerbHandler;
-import org.apache.cassandra.mapreduce.ReduceAssignmentVerbHandler;
-import org.apache.cassandra.mapreduce.TaskTracker;
 import org.apache.cassandra.net.CompactEndPointSerializationHelper;
 import org.apache.cassandra.net.EndPoint;
 import org.apache.cassandra.net.IVerbHandler;
@@ -337,10 +332,6 @@
         MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.dataFileVerbHandler_,
new DataFileVerbHandler() );
         MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.mbrshipCleanerVerbHandler_,
new MembershipCleanerVerbHandler() );
         MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.bsMetadataVerbHandler_,
new BootstrapMetadataVerbHandler() );        
-        MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.jobConfigurationVerbHandler_,
new JobTracker.JobConfigurationVerbHandler());
-        MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.mapAssignmentVerbHandler_,
new MapAssignmentVerbHandler() );
-        MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.reduceAssignmentVerbHandler_,
new ReduceAssignmentVerbHandler() );
-        MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.mapCompletionVerbHandler_,
new MapCompletionVerbHandler() );
         MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.calloutDeployVerbHandler_,
new CalloutDeployVerbHandler() );
         MessagingService.getMessagingInstance().registerVerbHandlers(StorageService.touchVerbHandler_,
new TouchVerbHandler());
         
@@ -517,12 +508,12 @@
         // match (e.g. somehost.vip vs somehost.vip.domain.com)
         if ( DatabaseDescriptor.getJobTrackerAddress().equals( StorageService.tcpAddr_.getHost()
) ) 
         {
-            JobTracker.instance().start();
-            TaskTracker.instance().start();
+//            JobTracker.instance().start();
+//            TaskTracker.instance().start();
         }
         else
         {
-            TaskTracker.instance().start();
+//            TaskTracker.instance().start();
         }
     }
     

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/test/DBTest.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/test/DBTest.java?rev=749477&r1=749476&r2=749477&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/test/DBTest.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/test/DBTest.java Mon Mar  2 23:34:21
2009
@@ -38,7 +38,6 @@
 import org.apache.cassandra.io.IFileWriter;
 import org.apache.cassandra.io.SSTable;
 import org.apache.cassandra.io.SequenceFile;
-import org.apache.cassandra.mapreduce.SequentialScanner;
 import org.apache.cassandra.net.EndPoint;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.BloomFilter;
@@ -113,13 +112,14 @@
     
     private static void doSequentialScannerTest() throws Throwable
     {
-        SequentialScanner scanner = new SequentialScanner("Mailbox");
+/*        SequentialScanner scanner = new SequentialScanner("Mailbox");
         while ( scanner.hasNext() )
         {
             Row row = scanner.next();  
             System.out.println( row.getColumnFamily("Test") );
             System.out.println( row.getColumnFamily("Test2") );
         }
+        */
     }
     
     public static void doTest()

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/test/TestRunner.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/test/TestRunner.java?rev=749477&r1=749476&r2=749477&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/test/TestRunner.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/test/TestRunner.java Mon Mar  2 23:34:21
2009
@@ -69,7 +69,6 @@
 import org.apache.cassandra.io.DataOutputBuffer;
 import org.apache.cassandra.io.IFileWriter;
 import org.apache.cassandra.io.SequenceFile;
-import org.apache.cassandra.mapreduce.SequentialScanner;
 import org.apache.cassandra.net.EndPoint;
 import org.apache.cassandra.net.IVerbHandler;
 import org.apache.cassandra.net.Message;
@@ -257,7 +256,7 @@
     
     public void run()
     {        
-        try
+/*        try
         {            
             SequentialScanner scanner = new SequentialScanner("Mailbox");            
             
@@ -271,6 +270,7 @@
         {
             ex.printStackTrace();
         }        
+        */
     }
 }
 



Mime
View raw message