Permalink
Browse files

Trying to clean up the TPCCLoader to make it look like the other ones

  • Loading branch information...
apavlo committed Dec 2, 2017
1 parent 51f9aa0 commit 4e5baa8008821fec1ff4dabaf4de78176ee661d8
Showing with 10 additions and 21 deletions.
  1. +10 −21 src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java
@@ -312,17 +312,6 @@ protected int loadStock(Connection conn, int w_id, int numItems) {
+ TPCCUtil.randomStr(len - startORIGINAL - 9);
}
stock.s_dist_01 = TPCCUtil.randomStr(24);
stock.s_dist_02 = TPCCUtil.randomStr(24);
stock.s_dist_03 = TPCCUtil.randomStr(24);
stock.s_dist_04 = TPCCUtil.randomStr(24);
stock.s_dist_05 = TPCCUtil.randomStr(24);
stock.s_dist_06 = TPCCUtil.randomStr(24);
stock.s_dist_07 = TPCCUtil.randomStr(24);
stock.s_dist_08 = TPCCUtil.randomStr(24);
stock.s_dist_09 = TPCCUtil.randomStr(24);
stock.s_dist_10 = TPCCUtil.randomStr(24);
k++;
int idx = 1;
stckPrepStmt.setLong(idx++, stock.s_w_id);
@@ -332,16 +321,16 @@ protected int loadStock(Connection conn, int w_id, int numItems) {
stckPrepStmt.setLong(idx++, stock.s_order_cnt);
stckPrepStmt.setLong(idx++, stock.s_remote_cnt);
stckPrepStmt.setString(idx++, stock.s_data);
stckPrepStmt.setString(idx++, stock.s_dist_01);
stckPrepStmt.setString(idx++, stock.s_dist_02);
stckPrepStmt.setString(idx++, stock.s_dist_03);
stckPrepStmt.setString(idx++, stock.s_dist_04);
stckPrepStmt.setString(idx++, stock.s_dist_05);
stckPrepStmt.setString(idx++, stock.s_dist_06);
stckPrepStmt.setString(idx++, stock.s_dist_07);
stckPrepStmt.setString(idx++, stock.s_dist_08);
stckPrepStmt.setString(idx++, stock.s_dist_09);
stckPrepStmt.setString(idx++, stock.s_dist_10);
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.setString(idx++, TPCCUtil.randomStr(24));
stckPrepStmt.addBatch();
if ((k % TPCCConfig.configCommitCount) == 0) {
stckPrepStmt.executeBatch();

0 comments on commit 4e5baa8

Please sign in to comment.