incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject svn commit: r805255 - in /incubator/olio/workload/php/trunk/bin: fileloader2.sh schema.sql
Date Tue, 18 Aug 2009 02:08:53 GMT
Author: akara
Date: Tue Aug 18 02:08:53 2009
New Revision: 805255

URL: http://svn.apache.org/viewvc?rev=805255&view=rev
Log:
Issue OLIO-40: 
- Added userid field to PERSON schema.
- Added fileloader2.sh to invoke new file loader by hand.

Added:
    incubator/olio/workload/php/trunk/bin/fileloader2.sh   (with props)
Modified:
    incubator/olio/workload/php/trunk/bin/schema.sql

Added: incubator/olio/workload/php/trunk/bin/fileloader2.sh
URL: http://svn.apache.org/viewvc/incubator/olio/workload/php/trunk/bin/fileloader2.sh?rev=805255&view=auto
==============================================================================
--- incubator/olio/workload/php/trunk/bin/fileloader2.sh (added)
+++ incubator/olio/workload/php/trunk/bin/fileloader2.sh Tue Aug 18 02:08:53 2009
@@ -0,0 +1,61 @@
+#!/bin/sh
+##############################################################
+#  Copyright ?? 2008 Sun Microsystems, Inc. All rights reserved
+#
+#  Use is subject to license terms.
+#
+#  $Id: fileloader.sh,v 1.1.1.1 2008/09/29 22:33:07 sp208304 Exp $
+##############################################################
+
+#Script to run loader by hand
+
+if [ -z "$1" ] ; then
+    echo "Usage: $0 [concurrent users] <target directory>" >&2
+    exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+    echo "Please set JAVA_HOME and restart command" >&2
+    exit 1
+fi
+
+SCALE=$1
+
+TARGET=$PWD
+
+if [ -n "$2" ] ; then
+    TARGET=$2
+fi
+
+CONCURRENCY=128
+
+if [ -n "$3" ] ; then
+    CONCURRENCY=$3
+fi
+
+BINDIR=`dirname $0`
+
+# This script is in $FABAN_HOME/benchmarks/OlioDriver/bin
+# we need to go up 4 levels to get to $FABAN_HOME.
+if [ -n "$BINDIR" ]
+then
+    FABAN_HOME=`cd $BINDIR/../../.. > /dev/null 2>&1 && pwd`
+    BENCH_HOME=`cd $BINDIR/.. > /dev/null 2>&1 &&pwd`
+    export FABAN_HOME BENCH_HOME
+fi
+
+B=$BENCH_HOME/lib
+L=$FABAN_HOME/lib
+CLASSPATH=$B/OlioDriver.jar:$L/commons-httpclient-2.0.1.jar:\
+$L/fabancommon.jar:$L/commons-logging.jar:$L/fabandriver.jar:$L/fabanagents.jar
+export CLASSPATH
+
+$JAVA_HOME/bin/java -server org.apache.olio.workload.fsloader.FileLoader2 \
+    $BENCH_HOME/resources $TARGET $SCALE $CONCURRENCY
+
+EXIT_CODE=$?
+if [ "$EXIT_CODE" = 0 ] ; then
+    echo "File Load Successful"
+else
+    echo "ERROR: File loader exited with code ${EXIT_CODE}."
+fi

Propchange: incubator/olio/workload/php/trunk/bin/fileloader2.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/olio/workload/php/trunk/bin/schema.sql
URL: http://svn.apache.org/viewvc/incubator/olio/workload/php/trunk/bin/schema.sql?rev=805255&r1=805254&r2=805255&view=diff
==============================================================================
--- incubator/olio/workload/php/trunk/bin/schema.sql (original)
+++ incubator/olio/workload/php/trunk/bin/schema.sql Tue Aug 18 02:08:53 2009
@@ -17,6 +17,7 @@
 */
 
 create table PERSON(
+   userid INTEGER NOT NULL AUTO_INCREMENT,
    username VARCHAR(25) NOT NULL,
    password VARCHAR(25) NOT NULL,
    firstname VARCHAR(25) NOT NULL,
@@ -28,9 +29,11 @@
    summary VARCHAR(2500) NOT NULL,
    timezone VARCHAR(25) NOT NULL,
    ADDRESS_addressid INTEGER NOT NULL,
-   primary key (username)
+   primary key (userid)
 ) ENGINE=InnoDB;
 
+CREATE UNIQUE INDEX PERSON_USER_IDX on PERSON (username);
+
 CREATE TABLE PERSON_PERSON (
 Person_username VARCHAR(25) NOT NULL,
 friends_username VARCHAR(25) NOT NULL,



Mime
View raw message