@Test public void testTransaction() { try { System.out.println("**********"); int testSize = 100; for(int a = 0; a<testSize; a++) { Query q = w.generateTransaction(); System.out.println(q.toString()); } System.out.println("**********"); } catch(Exception e) { e.printStackTrace(); } }
@Override public Query generateTransaction() { String nextOp = _operationGen.nextString(); if(nextOp.equals(CONST_QUERY_INSERT)) { return generateInsertTransaction(); } else if(nextOp.equals(CONST_QUERY_READ)) { return generateReadTransaction(); } else if(nextOp.equals(CONST_QUERY_DELETE)) { return generateDeleteTransaction(); } else { return generateUpdateTransaction(); } }
CoreWorkload implements Workload { @Override public Query generateTransaction() { String nextOp = _operationGen.nextString(); if(nextOp.equals(CONST_QUERY_INSERT)) { return generateInsertTransaction(); } else if(nextOp.equals(CONST_QUERY_READ)) { return generateReadTransaction(); } else if(nextOp.equals(CONST_QUERY_DELETE)) { return generateDeleteTransaction(); } else { return generateUpdateTransaction(); } } }
CoreWorkload implements Workload { @Override public Query generateTransaction() { String nextOp = _operationGen.nextString(); if(nextOp.equals(CONST_QUERY_INSERT)) { return generateInsertTransaction(); } else if(nextOp.equals(CONST_QUERY_READ)) { return generateReadTransaction(); } else if(nextOp.equals(CONST_QUERY_DELETE)) { return generateDeleteTransaction(); } else { return generateUpdateTransaction(); } }  }
CoreWorkload implements Workload { @Override public Query generateTransaction() { String nextOp = _operationGen.nextString(); if(nextOp.equals(CONST_QUERY_INSERT)) { return generateInsertTransaction(); } else if(nextOp.equals(CONST_QUERY_READ)) { return generateReadTransaction(); } else if(nextOp.equals(CONST_QUERY_DELETE)) { return generateDeleteTransaction(); } else { return generateUpdateTransaction(); } }  int getRowsResponsible(); @Override WorkloadResult init(int myId, int numberOfWorkers, Map<String, String> workPlanProperties, Map<String, String> jobProperties); @Override Query generateInsertLoad(); @Override Query generateTransaction(); @Override WorkloadResult close(); }
CoreWorkload implements Workload { @Override public Query generateTransaction() { String nextOp = _operationGen.nextString(); if(nextOp.equals(CONST_QUERY_INSERT)) { return generateInsertTransaction(); } else if(nextOp.equals(CONST_QUERY_READ)) { return generateReadTransaction(); } else if(nextOp.equals(CONST_QUERY_DELETE)) { return generateDeleteTransaction(); } else { return generateUpdateTransaction(); } }  int getRowsResponsible(); @Override WorkloadResult init(int myId, int numberOfWorkers, Map<String, String> workPlanProperties, Map<String, String> jobProperties); @Override Query generateInsertLoad(); @Override Query generateTransaction(); @Override WorkloadResult close(); static final String FLAG_JOB_INSERT_RATE; static final String FLAG_JOB_READ_RATE; static final String FLAG_JOB_DELETE_RATE; static final String FLAG_JOB_UPDATE_RATE; static final String FLAG_JOB_QUERY_DISTRIBUTION; static final String FLAG_JOB_HOTSPOT_SETFRAC; static final String FLAG_JOB_HOTSPOT_OPNFRAC; static final String FLAG_JOB_VALUE_SIZE_DISTRIBUTION; static final String FLAG_JOB_VALUE_SIZE; static final String FLAG_JOB_VALUE_SIZE_MIN; static final String CONST_QUERY_INSERT; static final String CONST_QUERY_READ; static final String CONST_QUERY_DELETE; static final String CONST_QUERY_UPDATE; static final String CONST_DIST_UNIFORM; static final String CONST_DIST_ZIPFIAN; static final String CONST_DIST_LATEST; static final String CONST_DIST_HOTSPOT; static final String CONST_DIST_CONSTANT; }