Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

Add support for running oltpbenchmark as an external executable cmd. #322

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions classpath.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

echo -ne "build"
for i in `ls lib/*.jar`; do
echo -ne "$OLTPBENCH_HOME./build"
for i in `ls $OLTPBENCH_HOME./lib/*.jar`; do
# IMPORTANT: Make sure that we do not include hsqldb v1
if [[ $i =~ .*hsqldb-1.* ]]; then
continue
Expand Down
4 changes: 2 additions & 2 deletions oltpbenchmark
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
java -Xmx8G -cp `./classpath.sh bin` -Dlog4j.configuration=log4j.properties com.oltpbenchmark.DBWorkload $@

# OLTPBENCH_HOME should be empty or end with "/"
java -Xmx8G -cp `$OLTPBENCH_HOME./classpath.sh bin` -Dlog4j.configuration=$OLTPBENCH_HOME./log4j.properties com.oltpbenchmark.DBWorkload $@
5 changes: 4 additions & 1 deletion src/com/oltpbenchmark/DBWorkload.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public static void main(String[] args) throws Exception {
CommandLineParser parser = new PosixParser();
XMLConfiguration pluginConfig=null;
try {
pluginConfig = new XMLConfiguration("config/plugin.xml");
String oltpbench_home = System.getenv("OLTPBENCH_HOME");
// OLTPBENCH_HOME should be empty or end with "/"
oltpbench_home = oltpbench_home == null ? "" : oltpbench_home + "/";
pluginConfig = new XMLConfiguration(oltpbench_home + "config/plugin.xml");
} catch (ConfigurationException e1) {
LOG.info("Plugin configuration file config/plugin.xml is missing");
e1.printStackTrace();
Expand Down