Moved db specific code and configs into new IDE friendly directory structure

This commit is contained in:
Johan Oskarsson 2010-05-03 12:52:18 +02:00
Родитель e62af2cff4
Коммит 2fd7a05605
8 изменённых файлов: 35 добавлений и 34 удалений

7
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,7 @@
build
.classpath
.project
.settings
db/cassandra-0.5/lib
db/cassandra-0.6/lib
db/hbase/lib

Просмотреть файл

@ -3,25 +3,25 @@
<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"/>
<target name="dbcompile-cassandra-0.5" depends="compile">
<property name="db.dir" value="db/cassandra-0.5"/>
<antcall target="dbcompile"/>
</target>
<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="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}"/>
@ -31,28 +31,23 @@
<antcall target="makejar"/>
</target>
<target name="dbcompile">
<path id="dbclasspath">
<fileset dir="${db.dir}/lib" includes="**/*.jar"/>
<fileset file="build/ycsb.jar"/>
</path>
<target name="dbcompile-cassandra">
<mkdir dir="${classes.dir}"/>
<javac includes="CassandraClient.java" srcdir="${dbsrc.dir}" destdir="${classes.dir}" classpathref="cassandraclasspath" 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">
<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>
<target name="clean">
<delete includeemptydirs="true">
<fileset dir="build" includes="**/*"/>

Просмотреть файл

@ -36,7 +36,7 @@ import org.apache.cassandra.thrift.*;
/**
* 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 class CassandraClient extends DB
public static void main(String[] args)
{
CassandraClient cli=new CassandraClient();
CassandraClient6 cli=new CassandraClient6();
Properties props=new Properties();

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -1 +0,0 @@
This directory should contain jars for building and running Cassandra