Permalink
Browse files

Moved db specific code and configs into new IDE friendly directory st…

…ructure
  • Loading branch information...
1 parent e62af2c commit 9ddb8a5da4d4da3d676df426cb8d7521e431f3da @johanoskarsson johanoskarsson committed with brianfrankcooper May 3, 2010
View
@@ -0,0 +1,7 @@
+build
+.classpath
+.project
+.settings
+db/cassandra-0.5/lib
+db/cassandra-0.6/lib
+db/hbase/lib
View
@@ -3,56 +3,51 @@
<property name="src.dir" value="src"/>
<property name="doc.dir" value="doc"/>
- <property name="dbsrc.dir" value="${src.dir}/com/yahoo/ycsb/db"/>
- <property name="cassandralib.dir" value="${dbsrc.dir}/cassandralib"/>
- <property name="hbaselib.dir" value="${dbsrc.dir}/hbaselib"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
-
- <path id="cassandraclasspath">
- <fileset dir="${cassandralib.dir}" includes="**/*.jar"/>
- <fileset file="build/ycsb.jar"/>
- </path>
-
- <path id="hbaseclasspath">
- <fileset dir="${hbaselib.dir}" includes="**/*.jar"/>
- <fileset file="build/ycsb.jar"/>
- </path>
-
-
- <target name="compile">
- <mkdir dir="${classes.dir}"/>
- <javac srcdir="${src.dir}" destdir="${classes.dir}" excludes="com/yahoo/ycsb/db/**" deprecation="on">
- <compilerarg value="-Xlint:unchecked"/>
- </javac>
- <antcall target="makejar"/>
+ <target name="dbcompile-cassandra-0.5" depends="compile">
+ <property name="db.dir" value="db/cassandra-0.5"/>
+ <antcall target="dbcompile"/>
</target>
-
-
- <target name="dbcompile-cassandra">
+
+ <target name="dbcompile-cassandra-0.6" depends="compile">
+ <property name="db.dir" value="db/cassandra-0.6"/>
+ <antcall target="dbcompile"/>
+ </target>
+
+ <target name="dbcompile-hbase" depends="compile">
+ <property name="db.dir" value="db/hbase"/>
+ <antcall target="dbcompile"/>
+ </target>
+
+ <target name="compile">
<mkdir dir="${classes.dir}"/>
- <javac includes="CassandraClient.java" srcdir="${dbsrc.dir}" destdir="${classes.dir}" classpathref="cassandraclasspath" deprecation="on">
+ <javac srcdir="${src.dir}" destdir="${classes.dir}" excludes="com/yahoo/ycsb/db/**" deprecation="on">
<compilerarg value="-Xlint:unchecked"/>
</javac>
<antcall target="makejar"/>
</target>
- <target name="dbcompile-hbase">
- <mkdir dir="${classes.dir}"/>
- <javac includes="HBaseClient.java" srcdir="${dbsrc.dir}" destdir="${classes.dir}" classpathref="hbaseclasspath" deprecation="on">
+ <target name="dbcompile">
+ <path id="dbclasspath">
+ <fileset dir="${db.dir}/lib" includes="**/*.jar"/>
+ <fileset file="build/ycsb.jar"/>
+ </path>
+
+ <mkdir dir="${classes.dir}"/>
+ <javac srcdir="${db.dir}/src" destdir="${classes.dir}" classpathref="dbclasspath" deprecation="on">
<compilerarg value="-Xlint:unchecked"/>
</javac>
<antcall target="makejar"/>
</target>
<target name ="makejar" description="Create a jar for the YCSB project">
-
- <jar jarfile="build/ycsb.jar" includes="**/*.class" basedir="${classes.dir}"/>
-
- </target>
+ <jar jarfile="build/ycsb.jar" includes="**/*.class" basedir="${classes.dir}"/>
+ </target>
+
<target name="clean">
<delete includeemptydirs="true">
<fileset dir="build" includes="**/*"/>
@@ -36,7 +36,7 @@
/**
* XXXX if we do replication, fix the consistency levels
*/
-public class CassandraClient extends DB
+public class CassandraClient6 extends DB
{
static Random random=new Random();
public static final int Ok=0;
@@ -422,7 +422,7 @@ public int delete(String table, String key)
public static void main(String[] args)
{
- CassandraClient cli=new CassandraClient();
+ CassandraClient6 cli=new CassandraClient6();
Properties props=new Properties();
File renamed without changes.
@@ -1 +0,0 @@
-This directory should contain jars for building and running Cassandra

0 comments on commit 9ddb8a5

Please sign in to comment.