Browse files

Make it easier to build the database client libraries:

 1) Add Makefile.download-db-libs, which downloads + unpacks all of the dependencies.
 2) Fix build.xml so that downloaded libraries don't break ant doc
 3) Add dbcompile-all target that builds all of the client libraries at once.
  • Loading branch information...
1 parent 2b38049 commit 626b3446101492774207e2bf7fa379ddeea6a6fa Russell Sears committed Nov 13, 2011
Showing with 80 additions and 1 deletion.
  1. +77 −0 Makefile.download-db-libs
  2. +3 −1 build.xml
View
77 Makefile.download-db-libs
@@ -0,0 +1,77 @@
+#
+# Running 'make -f Makefile.download-db-libs' will automatically download all
+# of the libraries needed to build the YCSB drivers.
+#
+CASSANDRA_5_DIR=db/cassandra-0.5/lib
+CASSANDRA_5_FILE=apache-cassandra-0.5.1-bin.tar.gz
+CASSANDRA_6_DIR=db/cassandra-0.6/lib
+CASSANDRA_6_FILE=apache-cassandra-0.6.13-bin.tar.gz
+CASSANDRA_7_DIR=db/cassandra-0.7/lib
+CASSANDRA_7_FILE=apache-cassandra-0.7.9-bin.tar.gz
+CASSANDRA_8_DIR=db/cassandra-0.8/lib
+CASSANDRA_8_FILE=apache-cassandra-0.8.7-bin.tar.gz
+HBASE_DIR=db/hbase/lib
+HBASE_FILE=hbase-0.90.4.tar.gz
+INFINISPAN_DIR=db/infinispan-5.0/lib
+INFINISPAN_FILE=infinispan-5.0.0.CR8-bin.zip
+MONGODB_DIR=db/mongodb/lib
+MONGODB_FILE=mongo-2.7.2.jar
+REDIS_DIR=db/redis/lib
+REDIS_FILE=jedis-2.0.0.jar
+VOLDEMORT_DIR=db/voldemort/lib
+VOLDEMORT_FILE=voldemort-0.90.1.tar.gz
+
+
+download-database-deps: $(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE) \
+ $(CASSANDRA_6_DIR)/$(CASSANDRA_6_FILE) \
+ $(CASSANDRA_7_DIR)/$(CASSANDRA_7_FILE) \
+ $(CASSANDRA_8_DIR)/$(CASSANDRA_8_FILE) \
+ $(HBASE_DIR)/$(HBASE_FILE) \
+ $(INFINISPAN_DIR)/$(INFINISPAN_FILE) \
+ $(MONGODB_DIR)/$(MONGODB_FILE) \
+ $(REDIS_DIR)/$(REDIS_FILE) \
+ $(VOLDEMORT_DIR)/$(VOLDEMORT_FILE) \
+
+$(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE) :
+ wget http://archive.apache.org/dist/cassandra/0.5.1/$(CASSANDRA_5_FILE)\
+ -O $(CASSANDRA_5_DIR)/$(CASSANDRA_5_FILE)
+ tar -C $(CASSANDRA_5_DIR) -zxf $(CASSANDRA_6_DIR)/$(CASSANDRA_5_FILE)
+
+$(CASSANDRA_6_DIR)/$(CASSANDRA_6_FILE) :
+ wget http://archive.apache.org/dist/cassandra/0.6.13/$(CASSANDRA_6_FILE)\
+ -O $(CASSANDRA_6_DIR)/$(CASSANDRA_6_FILE)
+ tar -C $(CASSANDRA_6_DIR) -zxf $(CASSANDRA_6_DIR)/$(CASSANDRA_6_FILE)
+
+$(CASSANDRA_7_DIR)/$(CASSANDRA_7_FILE) :
+ wget http://archive.apache.org/dist/cassandra/0.7.9/$(CASSANDRA_7_FILE)\
+ -O $(CASSANDRA_7_DIR)/$(CASSANDRA_7_FILE)
+ tar -C $(CASSANDRA_7_DIR) -zxf $(CASSANDRA_7_DIR)/$(CASSANDRA_7_FILE)
+
+$(CASSANDRA_8_DIR)/$(CASSANDRA_8_FILE) :
+ wget http://archive.apache.org/dist/cassandra/0.8.7/$(CASSANDRA_8_FILE)\
+ -O $(CASSANDRA_8_DIR)/$(CASSANDRA_8_FILE)
+ tar -C $(CASSANDRA_8_DIR) -zxf $(CASSANDRA_8_DIR)/$(CASSANDRA_8_FILE)
+
+$(HBASE_DIR)/$(HBASE_FILE) :
+ wget http://archive.apache.org/dist/hbase/hbase-0.90.4/$(HBASE_FILE)\
+ -O $(HBASE_DIR)/$(HBASE_FILE)
+ tar -C $(HBASE_DIR) -zxf $(HBASE_DIR)/$(HBASE_FILE)
+
+$(INFINISPAN_DIR)/$(INFINISPAN_FILE) :
+ wget http://iweb.dl.sourceforge.net/project/infinispan/infinispan/5.0.0.CR8/$(INFINISPAN_FILE)\
+ -O $(INFINISPAN_DIR)/$(INFINISPAN_FILE)
+ unzip -a $(INFINISPAN_DIR)/$(INFINISPAN_FILE) -d $(INFINISPAN_DIR)
+
+$(MONGODB_DIR)/$(MONGODB_FILE) :
+ wget https://github.com/downloads/mongodb/mongo-java-driver/$(MONGODB_FILE)\
+ -O $(MONGODB_DIR)/$(MONGODB_FILE)
+
+$(REDIS_DIR)/$(REDIS_FILE) :
+ wget https://github.com/downloads/xetorthio/jedis/$(REDIS_FILE)\
+ -O $(REDIS_DIR)/$(REDIS_FILE)
+
+$(VOLDEMORT_DIR)/$(VOLDEMORT_FILE) :
+ wget https://github.com/downloads/voldemort/voldemort/$(VOLDEMORT_FILE)\
+ -O $(VOLDEMORT_DIR)/$(VOLDEMORT_FILE)
+ tar -C $(VOLDEMORT_DIR) -zxf $(VOLDEMORT_DIR)/$(VOLDEMORT_FILE)
+
View
4 build.xml
@@ -15,6 +15,8 @@
</fileset>
</path>
+ <target name="dbcompile-all" depends="dbcompile-infinispan-5.0,dbcompile-cassandra-0.5,dbcompile-cassandra-0.6,dbcompile-cassandra-0.7,dbcompile-cassandra-0.8,dbcompile-hbase,dbcompile-mongodb,dbcompile-voldemort,dbcompile-jdbc,dbcompile-redis"/>
+
<target name="dbcompile-infinispan-5.0" depends="compile">
<property name="db.dir" value="db/infinispan-5.0" />
<antcall target="dbcompile" />
@@ -100,7 +102,7 @@
<javadoc destdir="${doc.dir}/javadoc" packagenames="com.yahoo.ycsb,com.yahoo.ycsb.workloads,com.yahoo.ycsb.db,com.yahoo.ycsb.generator,com.yahoo.ycsb.measurements">
<fileset dir="." defaultexcludes="yes">
<include name="src/**"/>
- <include name="db/**/src/**"/>
+ <include name="db/*/src/**"/>
</fileset>
</javadoc>
</target>

0 comments on commit 626b344

Please sign in to comment.