lewismc commented on a change in pull request #179: GORA-532: Apache Gora 
Benchmark initial pull request for review and comments
URL: https://github.com/apache/gora/pull/179#discussion_r310845256
 
 

 ##########
 File path: gora-benchmark/runWorkloads.sh
 ##########
 @@ -0,0 +1,119 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#Check if number of commanline arguments is right
+threadcount=15
+if [ $# -ne 3 ]
+then
+    echo "Error: Usage: $0 hbase|mongodb gora|ycsb workloadfile"
+    exit;
+fi
+#Log output file
+outputfile="$3-$2-$1.log"
+insertfactor=5000000
+if [ $2 = "ycsb" ]
+then
+   table="usertable"
+elif [ $2 == "gora" ]
+then
+   table="users"
+fi
+
+if [ $1 = "hbase" ] 
+then
+   #Read operation
+   echo -e "Disabling Users Table" | tee -a $outputfile
+   echo -e "disable '$table'" | hbase shell -n
+   echo -e "Dropping Users Table" | tee -a $outputfile
+   echo -e "drop '$table'" | hbase shell -n
+   echo -e "Creating Users table with 200 regions: 200 Regions is recommended 
by YCSB" | tee -a $outputfile
+   echo -e "create '$table', 'info', {SPLITS => (1..200).map {|i| 
\"user#{1000+i*(9999-1000)/200}\"}}" | hbase shell -n
+    if [ $2 = "gora" ]
+   then
+     ./gora-bench.sh load -threads 15 -s -p fieldcount=20 -p 
recordcount=$insertfactor -p operationcount=$i -P workloads/workloada
+   elif [ $2 = "ycsb" ]
+   then
+      ../../ycsb/bin/ycsb.sh load hbase20 -p columnfamily=info -threads 15 -s 
-p fieldcount=20 -p recordcount=$insertfactor -p operationcount=$i -P 
workloads/workloada
+   fi
+for i in {100000..5000000..100000}
+do
+   #Insert only workload, uncomment this block of code. I will improve this 
later.
+   #echo -e "Disabling Users Table" | tee -a $outputfile
 
 Review comment:
   Remove code not being used

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to