diff --git a/src/main/java/org/ldbcouncil/finbench/driver/Operation.java b/src/main/java/org/ldbcouncil/finbench/driver/Operation.java index 0e1ae34e..d601a1b5 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/Operation.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/Operation.java @@ -11,7 +11,6 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead4; @@ -41,7 +40,6 @@ @JsonSubTypes.Type(ComplexRead10.class), @JsonSubTypes.Type(ComplexRead11.class), @JsonSubTypes.Type(ComplexRead12.class), - @JsonSubTypes.Type(ComplexRead13.class), }) public abstract class Operation { private static final TemporalUtil temporalutil = new TemporalUtil(); diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchSimpleReadGenerator.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchSimpleReadGenerator.java index 9458d192..2c396c9f 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchSimpleReadGenerator.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchSimpleReadGenerator.java @@ -25,10 +25,8 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead1; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11Result; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13Result; +import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12Result; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead1Result; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2Result; @@ -54,15 +52,11 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead5Result; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead6; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead6Result; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead7; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead8; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write1; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write12; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write13; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write14; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write15; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write4; @@ -102,7 +96,7 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, this.bufferReplenishFun = bufferReplenishFun; int maxReadOperationType = - Ordering.natural().max(ComplexRead13.TYPE, SimpleRead8.TYPE) + 1; + Ordering.natural().max(ComplexRead12.TYPE, SimpleRead6.TYPE) + 1; this.interleavesAsMilli = new long[maxReadOperationType]; for (Integer longReadOperationType : longReadInterleaves.keySet()) { this.interleavesAsMilli[longReadOperationType] = @@ -120,12 +114,8 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, Math.round(Math.ceil(compressionRatio * updateInterleaveAsMilli)); this.interleavesAsMilli[SimpleRead6.TYPE] = Math.round(Math.ceil(compressionRatio * updateInterleaveAsMilli)); - this.interleavesAsMilli[SimpleRead7.TYPE] = - Math.round(Math.ceil(compressionRatio * updateInterleaveAsMilli)); - this.interleavesAsMilli[SimpleRead8.TYPE] = - Math.round(Math.ceil(compressionRatio * updateInterleaveAsMilli)); - int maxOperationType = Ordering.natural().max(ComplexRead13.TYPE, SimpleRead8.TYPE, + int maxOperationType = Ordering.natural().max(ComplexRead12.TYPE, SimpleRead6.TYPE, ReadWrite3.TYPE) + 1; this.simpleQueryFactories = new LdbcSimpleQueryFactory[maxOperationType]; this.probabilityDegradationFactors = new double[maxOperationType]; @@ -156,10 +146,6 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, enabledSimpleReadOperationTypes.contains(SimpleRead5.class); enabledSimpleReads[SimpleRead6.TYPE] = enabledSimpleReadOperationTypes.contains(SimpleRead6.class); - enabledSimpleReads[SimpleRead7.TYPE] = - enabledSimpleReadOperationTypes.contains(SimpleRead7.class); - enabledSimpleReads[SimpleRead8.TYPE] = - enabledSimpleReadOperationTypes.contains(SimpleRead8.class); /* MAPPING @@ -184,10 +170,6 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, new LdbcSimpleQuery5Factory(scheduledStartTimePolicy); baseSimpleReadFactories[SimpleRead6.TYPE] = new LdbcSimpleQuery6Factory(scheduledStartTimePolicy); - baseSimpleReadFactories[SimpleRead7.TYPE] = - new LdbcSimpleQuery7Factory(scheduledStartTimePolicy); - baseSimpleReadFactories[SimpleRead8.TYPE] = - new LdbcSimpleQuery8Factory(scheduledStartTimePolicy); /* FACTORIES @@ -222,15 +204,6 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, simpleQueryFactories[SimpleRead6.TYPE] = new ErrorFactory(SimpleRead6.class); } - if (!enabledSimpleReads[SimpleRead7.TYPE]) { - simpleQueryFactories[SimpleRead7.TYPE] = - new ErrorFactory(SimpleRead7.class); - } - if (!enabledSimpleReads[SimpleRead8.TYPE]) { - simpleQueryFactories[SimpleRead8.TYPE] = - new ErrorFactory(SimpleRead8.class); - } - /* (FIRST_PERSON,FIRST_PERSON_INDEX) = ... (FIRST_MESSAGE,FIRST_MESSAGE_INDEX) = ... @@ -302,7 +275,6 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, simpleQueryFactories[ComplexRead10.TYPE] = randomFirstQuery; simpleQueryFactories[ComplexRead11.TYPE] = randomFirstQuery; simpleQueryFactories[ComplexRead12.TYPE] = randomFirstQuery; - simpleQueryFactories[ComplexRead13.TYPE] = randomFirstQuery; simpleQueryFactories[Write1.TYPE] = new NoOpFactory(); simpleQueryFactories[Write2.TYPE] = new NoOpFactory(); @@ -317,8 +289,6 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, simpleQueryFactories[Write11.TYPE] = new NoOpFactory(); simpleQueryFactories[Write12.TYPE] = new NoOpFactory(); simpleQueryFactories[Write13.TYPE] = new NoOpFactory(); - simpleQueryFactories[Write14.TYPE] = new NoOpFactory(); - simpleQueryFactories[Write15.TYPE] = new NoOpFactory(); simpleQueryFactories[ReadWrite1.TYPE] = new NoOpFactory(); simpleQueryFactories[ReadWrite2.TYPE] = new NoOpFactory(); @@ -330,8 +300,6 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, simpleQueryFactories[SimpleRead4.TYPE] = null; simpleQueryFactories[SimpleRead5.TYPE] = null; simpleQueryFactories[SimpleRead6.TYPE] = null; - simpleQueryFactories[SimpleRead7.TYPE] = null; - simpleQueryFactories[SimpleRead8.TYPE] = null; /* FACTORIES @@ -381,26 +349,6 @@ public LdbcFinBenchSimpleReadGenerator(double initialProbability, } } } - for (int i = SimpleRead7.TYPE; i <= SimpleRead7.TYPE; i++) { - if (enabledSimpleReads[i] && null == simpleQueryFactories[i]) { - int index = indexOfNextEnabled(enabledSimpleReads, i); - if (index > lastPersonQueryIndex) { - simpleQueryFactories[i] = firstCompanyQuery; - } else { - simpleQueryFactories[i] = baseSimpleReadFactories[index]; - } - } - } - for (int i = SimpleRead8.TYPE; i <= SimpleRead8.TYPE; i++) { - if (enabledSimpleReads[i] && null == simpleQueryFactories[i]) { - int index = indexOfNextEnabled(enabledSimpleReads, i); - if (index > lastCompanyQueryIndex) { - simpleQueryFactories[i] = firstAccountQuery; - } else { - simpleQueryFactories[i] = baseSimpleReadFactories[index]; - } - } - } } static Queue synchronizedCircularQueueBuffer(int bufferSize) { @@ -600,7 +548,7 @@ public void clear() { } private int indexOfNextEnabled(boolean[] enabledSimpleReads, int simpleReadType) { - for (int i = simpleReadType + 1; i <= SimpleRead8.TYPE; i++) { + for (int i = simpleReadType + 1; i <= SimpleRead6.TYPE; i++) { if (enabledSimpleReads[i]) { return i; } @@ -664,7 +612,11 @@ private Tuple2 firstPersonQueryOrNoOp( double minProbability, double maxProbability, ScheduledStartTimePolicy scheduledStartTimePolicy) { - if (enabledSimpleReadOperationTypes.contains(SimpleRead7.class)) { + return Tuple.tuple2( + Integer.MAX_VALUE, + new NoOpFactory() + ); + /*if (enabledSimpleReadOperationTypes.contains(SimpleRead7.class)) { return Tuple.tuple2( SimpleRead7.TYPE, new CoinTossingFactory(randomFactory.newRandom(), @@ -675,7 +627,7 @@ private Tuple2 firstPersonQueryOrNoOp( Integer.MAX_VALUE, new NoOpFactory() ); - } + }*/ } private Tuple2 firstCompanyQueryOrNoOp( @@ -684,7 +636,11 @@ private Tuple2 firstCompanyQueryOrNoOp( double minProbability, double maxProbability, ScheduledStartTimePolicy scheduledStartTimePolicy) { - if (enabledSimpleReadOperationTypes.contains(SimpleRead8.class)) { + return Tuple.tuple2( + Integer.MAX_VALUE, + new NoOpFactory() + ); + /*if (enabledSimpleReadOperationTypes.contains(SimpleRead8.class)) { return Tuple.tuple2( SimpleRead8.TYPE, new CoinTossingFactory(randomFactory.newRandom(), @@ -695,7 +651,7 @@ private Tuple2 firstCompanyQueryOrNoOp( Integer.MAX_VALUE, new NoOpFactory() ); - } + }*/ } private int lastAccountQueryIndex(Set> enabledSimpleReadOperationTypes) { @@ -717,19 +673,21 @@ private int lastAccountQueryIndex(Set> enabledSimpleR } private int lastPersonQueryIndex(Set> enabledSimpleReadOperationTypes) { - if (enabledSimpleReadOperationTypes.contains(SimpleRead7.class)) { + return Integer.MAX_VALUE; + /*if (enabledSimpleReadOperationTypes.contains(SimpleRead7.class)) { return SimpleRead7.TYPE; } else { return Integer.MAX_VALUE; - } + }*/ } private int lastCompanyQueryIndex(Set> enabledSimpleReadOperationTypes) { - if (enabledSimpleReadOperationTypes.contains(SimpleRead8.class)) { + return Integer.MAX_VALUE; + /*if (enabledSimpleReadOperationTypes.contains(SimpleRead8.class)) { return SimpleRead8.TYPE; } else { return Integer.MAX_VALUE; - } + }*/ } private LdbcSimpleQueryFactory selectRandomFirstSimpleQuery( @@ -896,25 +854,14 @@ public void replenish(Operation operation, Object result) { } break; } - case ComplexRead11.TYPE: { - List typedResults = (List) result; - for (ComplexRead11Result complexRead11Result : typedResults) { - if ("Company".equals(complexRead11Result.getType())) { - companyIdBuffer.add(complexRead11Result.getId()); - } else if ("Person".equals(complexRead11Result.getType())) { - personIdBuffer.add(complexRead11Result.getId()); - } - } - break; - } - case ComplexRead13.TYPE: { - List typedResults = (List) result; - ComplexRead13 complexRead13 = (ComplexRead13) operation; - for (ComplexRead13Result complexRead13Result : typedResults) { - accountIdBuffer.add(new Tuple4<>(complexRead13Result.getCompAccountId(), + case ComplexRead12.TYPE: { + List typedResults = (List) result; + ComplexRead12 complexRead12 = (ComplexRead12) operation; + for (ComplexRead12Result complexRead12Result : typedResults) { + accountIdBuffer.add(new Tuple4<>(complexRead12Result.getCompAccountId(), THRESHOLD, - complexRead13.getStartTime(), - complexRead13.getEndTime())); + complexRead12.getStartTime(), + complexRead12.getEndTime())); } break; } @@ -1453,118 +1400,6 @@ public String describe() { } } - private class LdbcSimpleQuery7Factory implements LdbcSimpleQueryFactory { - private final ScheduledStartTimeFactory scheduledStartTimeFactory; - - private LdbcSimpleQuery7Factory(ScheduledStartTimePolicy scheduledStartTimePolicy) { - switch (scheduledStartTimePolicy) { - case ESTIMATED: { - this.scheduledStartTimeFactory = new EstimatedScheduledStartTimeFactory(); - break; - } - case PREVIOUS_OPERATION_ACTUAL_FINISH_TIME: { - this.scheduledStartTimeFactory = new PreviousOperationActualFinishTimeFactory(); - break; - } - case PREVIOUS_OPERATION_SCHEDULED_START_TIME: { - this.scheduledStartTimeFactory = new PreviousOperationScheduledStartTimeFactory(); - break; - } - default: { - throw new RuntimeException(format("Unexpected value, should be one of %s but was %s", - Arrays.toString(ScheduledStartTimePolicy.values()), - scheduledStartTimePolicy.name())); - } - } - } - - @Override - public Operation create( - Queue> accountIdBuffer, - Queue personIdBuffer, - Queue companyIdBuffer, - Operation previousOperation, - long previousOperationActualStartTimeAsMilli, - long previousOperationRunDurationAsNano, - double state) { - Long id = personIdBuffer.poll(); - if (null == id) { - return null; - } else { - Operation operation = new SimpleRead7(id); - operation.setScheduledStartTimeAsMilli( - scheduledStartTimeFactory.nextScheduledStartTime( - previousOperation, - previousOperationActualStartTimeAsMilli, - previousOperationRunDurationAsNano - ) - ); - return operation; - } - } - - @Override - public String describe() { - return getClass().getSimpleName(); - } - } - - private class LdbcSimpleQuery8Factory implements LdbcSimpleQueryFactory { - private final ScheduledStartTimeFactory scheduledStartTimeFactory; - - private LdbcSimpleQuery8Factory(ScheduledStartTimePolicy scheduledStartTimePolicy) { - switch (scheduledStartTimePolicy) { - case ESTIMATED: { - this.scheduledStartTimeFactory = new EstimatedScheduledStartTimeFactory(); - break; - } - case PREVIOUS_OPERATION_ACTUAL_FINISH_TIME: { - this.scheduledStartTimeFactory = new PreviousOperationActualFinishTimeFactory(); - break; - } - case PREVIOUS_OPERATION_SCHEDULED_START_TIME: { - this.scheduledStartTimeFactory = new PreviousOperationScheduledStartTimeFactory(); - break; - } - default: { - throw new RuntimeException(format("Unexpected value, should be one of %s but was %s", - Arrays.toString(ScheduledStartTimePolicy.values()), - scheduledStartTimePolicy.name())); - } - } - } - - @Override - public Operation create( - Queue> accountIdBuffer, - Queue personIdBuffer, - Queue companyIdBuffer, - Operation previousOperation, - long previousOperationActualStartTimeAsMilli, - long previousOperationRunDurationAsNano, - double state) { - Long id = companyIdBuffer.poll(); - if (null == id) { - return null; - } else { - Operation operation = new SimpleRead8(id); - operation.setScheduledStartTimeAsMilli( - scheduledStartTimeFactory.nextScheduledStartTime( - previousOperation, - previousOperationActualStartTimeAsMilli, - previousOperationRunDurationAsNano - ) - ); - return operation; - } - } - - @Override - public String describe() { - return getClass().getSimpleName(); - } - } - private class EstimatedScheduledStartTimeFactory implements ScheduledStartTimeFactory { @Override public long nextScheduledStartTime(Operation previousOperation, long actualStartTimeAsMilli, diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkload.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkload.java index ea45a96b..a68bcd8a 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkload.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkload.java @@ -47,7 +47,6 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead4; @@ -291,9 +290,6 @@ public void onInit(Map params) throws WorkloadException { longReadInterleavesAsMilli.put(ComplexRead12.TYPE, Long.parseLong( params.get(LdbcFinBenchTransactionWorkloadConfiguration.COMPLEX_READ_OPERATION_12_INTERLEAVE_KEY) .trim())); - longReadInterleavesAsMilli.put(ComplexRead13.TYPE, Long.parseLong( - params.get(LdbcFinBenchTransactionWorkloadConfiguration.COMPLEX_READ_OPERATION_13_INTERLEAVE_KEY) - .trim())); } catch (NumberFormatException e) { throw new WorkloadException("Unable to parse one of the read operation interleave values", e); diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkloadConfiguration.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkloadConfiguration.java index 8ca95cbc..5f61d714 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkloadConfiguration.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcFinBenchTransactionWorkloadConfiguration.java @@ -24,7 +24,6 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead4; @@ -42,15 +41,11 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead4; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead5; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead6; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead7; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead8; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write1; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write12; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write13; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write14; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write15; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write4; @@ -122,8 +117,6 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { LDBC_FINBENCH_TRANSACTION_PARAM_NAME_PREFIX + ComplexRead11.class.getSimpleName() + INTERLEAVE_SUFFIX; public static final String COMPLEX_READ_OPERATION_12_INTERLEAVE_KEY = LDBC_FINBENCH_TRANSACTION_PARAM_NAME_PREFIX + ComplexRead12.class.getSimpleName() + INTERLEAVE_SUFFIX; - public static final String COMPLEX_READ_OPERATION_13_INTERLEAVE_KEY = - LDBC_FINBENCH_TRANSACTION_PARAM_NAME_PREFIX + ComplexRead13.class.getSimpleName() + INTERLEAVE_SUFFIX; public static final List COMPLEX_READ_OPERATION_INTERLEAVE_KEYS = Lists.newArrayList( COMPLEX_READ_OPERATION_1_INTERLEAVE_KEY, COMPLEX_READ_OPERATION_2_INTERLEAVE_KEY, @@ -136,8 +129,7 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { COMPLEX_READ_OPERATION_9_INTERLEAVE_KEY, COMPLEX_READ_OPERATION_10_INTERLEAVE_KEY, COMPLEX_READ_OPERATION_11_INTERLEAVE_KEY, - COMPLEX_READ_OPERATION_12_INTERLEAVE_KEY, - COMPLEX_READ_OPERATION_13_INTERLEAVE_KEY); + COMPLEX_READ_OPERATION_12_INTERLEAVE_KEY); public static final Map OPERATION_TYPE_TO_INTERLEAVE_KEY_MAPPING = typeToInterleaveKeyMapping(); /* * Operation frequency @@ -167,8 +159,6 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { LDBC_FINBENCH_TRANSACTION_PARAM_NAME_PREFIX + ComplexRead11.class.getSimpleName() + FREQUENCY_SUFFIX; public static final String COMPLEX_READ_OPERATION_12_FREQUENCY_KEY = LDBC_FINBENCH_TRANSACTION_PARAM_NAME_PREFIX + ComplexRead12.class.getSimpleName() + FREQUENCY_SUFFIX; - public static final String COMPLEX_READ_OPERATION_13_FREQUENCY_KEY = - LDBC_FINBENCH_TRANSACTION_PARAM_NAME_PREFIX + ComplexRead13.class.getSimpleName() + FREQUENCY_SUFFIX; public static final List COMPLEX_READ_OPERATION_FREQUENCY_KEYS = Lists.newArrayList( COMPLEX_READ_OPERATION_1_FREQUENCY_KEY, COMPLEX_READ_OPERATION_2_FREQUENCY_KEY, @@ -181,8 +171,7 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { COMPLEX_READ_OPERATION_9_FREQUENCY_KEY, COMPLEX_READ_OPERATION_10_FREQUENCY_KEY, COMPLEX_READ_OPERATION_11_FREQUENCY_KEY, - COMPLEX_READ_OPERATION_12_FREQUENCY_KEY, - COMPLEX_READ_OPERATION_13_FREQUENCY_KEY + COMPLEX_READ_OPERATION_12_FREQUENCY_KEY ); // Default value in case there is no update stream public static final String DEFAULT_UPDATE_INTERLEAVE = "1"; @@ -202,7 +191,6 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { public static final String COMPLEX_READ_OPERATION_10_ENABLE_KEY = asEnableKey(ComplexRead10.class); public static final String COMPLEX_READ_OPERATION_11_ENABLE_KEY = asEnableKey(ComplexRead11.class); public static final String COMPLEX_READ_OPERATION_12_ENABLE_KEY = asEnableKey(ComplexRead12.class); - public static final String COMPLEX_READ_OPERATION_13_ENABLE_KEY = asEnableKey(ComplexRead13.class); public static final List COMPLEX_READ_OPERATION_ENABLE_KEYS = Lists.newArrayList( COMPLEX_READ_OPERATION_1_ENABLE_KEY, COMPLEX_READ_OPERATION_2_ENABLE_KEY, @@ -215,8 +203,7 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { COMPLEX_READ_OPERATION_9_ENABLE_KEY, COMPLEX_READ_OPERATION_10_ENABLE_KEY, COMPLEX_READ_OPERATION_11_ENABLE_KEY, - COMPLEX_READ_OPERATION_12_ENABLE_KEY, - COMPLEX_READ_OPERATION_13_ENABLE_KEY + COMPLEX_READ_OPERATION_12_ENABLE_KEY ); public static final String SIMPLE_READ_OPERATION_1_ENABLE_KEY = asEnableKey(SimpleRead1.class); public static final String SIMPLE_READ_OPERATION_2_ENABLE_KEY = asEnableKey(SimpleRead2.class); @@ -224,17 +211,13 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { public static final String SIMPLE_READ_OPERATION_4_ENABLE_KEY = asEnableKey(SimpleRead4.class); public static final String SIMPLE_READ_OPERATION_5_ENABLE_KEY = asEnableKey(SimpleRead5.class); public static final String SIMPLE_READ_OPERATION_6_ENABLE_KEY = asEnableKey(SimpleRead6.class); - public static final String SIMPLE_READ_OPERATION_7_ENABLE_KEY = asEnableKey(SimpleRead7.class); - public static final String SIMPLE_READ_OPERATION_8_ENABLE_KEY = asEnableKey(SimpleRead8.class); public static final List SIMPLE_READ_OPERATION_ENABLE_KEYS = Lists.newArrayList( SIMPLE_READ_OPERATION_1_ENABLE_KEY, SIMPLE_READ_OPERATION_2_ENABLE_KEY, SIMPLE_READ_OPERATION_3_ENABLE_KEY, SIMPLE_READ_OPERATION_4_ENABLE_KEY, SIMPLE_READ_OPERATION_5_ENABLE_KEY, - SIMPLE_READ_OPERATION_6_ENABLE_KEY, - SIMPLE_READ_OPERATION_7_ENABLE_KEY, - SIMPLE_READ_OPERATION_8_ENABLE_KEY + SIMPLE_READ_OPERATION_6_ENABLE_KEY ); public static final String WRITE_OPERATION_1_ENABLE_KEY = asEnableKey(Write1.class); public static final String WRITE_OPERATION_2_ENABLE_KEY = asEnableKey(Write2.class); @@ -249,7 +232,6 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { public static final String WRITE_OPERATION_11_ENABLE_KEY = asEnableKey(Write11.class); public static final String WRITE_OPERATION_12_ENABLE_KEY = asEnableKey(Write12.class); public static final String WRITE_OPERATION_13_ENABLE_KEY = asEnableKey(Write13.class); - public static final String WRITE_OPERATION_14_ENABLE_KEY = asEnableKey(Write14.class); public static final List WRITE_OPERATION_ENABLE_KEYS = Lists.newArrayList( WRITE_OPERATION_1_ENABLE_KEY, WRITE_OPERATION_2_ENABLE_KEY, @@ -263,8 +245,7 @@ public abstract class LdbcFinBenchTransactionWorkloadConfiguration { WRITE_OPERATION_10_ENABLE_KEY, WRITE_OPERATION_11_ENABLE_KEY, WRITE_OPERATION_12_ENABLE_KEY, - WRITE_OPERATION_13_ENABLE_KEY, - WRITE_OPERATION_14_ENABLE_KEY + WRITE_OPERATION_13_ENABLE_KEY ); /* * Read Operation Parameters @@ -303,7 +284,6 @@ private static Map typeToOperationParameterFilename() { mapping.put(ComplexRead10.TYPE, COMPLEX_READ_OPERATION_10_PARAMS_FILENAME); mapping.put(ComplexRead11.TYPE, COMPLEX_READ_OPERATION_11_PARAMS_FILENAME); mapping.put(ComplexRead12.TYPE, COMPLEX_READ_OPERATION_12_PARAMS_FILENAME); - mapping.put(ComplexRead13.TYPE, COMPLEX_READ_OPERATION_13_PARAMS_FILENAME); return mapping; } @@ -321,7 +301,6 @@ private static Map typeToInterleaveKeyMapping() { mapping.put(ComplexRead10.TYPE, COMPLEX_READ_OPERATION_10_INTERLEAVE_KEY); mapping.put(ComplexRead11.TYPE, COMPLEX_READ_OPERATION_11_INTERLEAVE_KEY); mapping.put(ComplexRead12.TYPE, COMPLEX_READ_OPERATION_12_INTERLEAVE_KEY); - mapping.put(ComplexRead13.TYPE, COMPLEX_READ_OPERATION_13_INTERLEAVE_KEY); return mapping; } @@ -368,9 +347,6 @@ public static Map convertFrequenciesToInterleaves(Map params) { COMPLEX_READ_OPERATION_9_ENABLE_KEY, COMPLEX_READ_OPERATION_10_ENABLE_KEY, COMPLEX_READ_OPERATION_11_ENABLE_KEY, - COMPLEX_READ_OPERATION_12_ENABLE_KEY, - COMPLEX_READ_OPERATION_13_ENABLE_KEY).stream().anyMatch(key -> isSet(params, key)); + COMPLEX_READ_OPERATION_12_ENABLE_KEY).stream().anyMatch(key -> isSet(params, key)); } public static boolean hasWrites(Map params) { @@ -452,7 +427,6 @@ public static Map withoutSimpleReads(Map origina params.put(SIMPLE_READ_OPERATION_4_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_5_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_6_ENABLE_KEY, "false"); - params.put(SIMPLE_READ_OPERATION_7_ENABLE_KEY, "false"); return ConsoleAndFileDriverConfiguration.convertComplexKeysToSimpleKeys(params); } @@ -485,14 +459,12 @@ public static Map withoutLongReads(Map originalP params.put(COMPLEX_READ_OPERATION_10_ENABLE_KEY, "false"); params.put(COMPLEX_READ_OPERATION_11_ENABLE_KEY, "false"); params.put(COMPLEX_READ_OPERATION_12_ENABLE_KEY, "false"); - params.put(COMPLEX_READ_OPERATION_13_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_1_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_2_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_3_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_4_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_5_ENABLE_KEY, "false"); params.put(SIMPLE_READ_OPERATION_6_ENABLE_KEY, "false"); - params.put(SIMPLE_READ_OPERATION_7_ENABLE_KEY, "false"); return ConsoleAndFileDriverConfiguration.convertComplexKeysToSimpleKeys(params); } @@ -510,15 +482,12 @@ public static Map> operationTypeToClassMappi operationTypeToClassMapping.put(ComplexRead10.TYPE, ComplexRead10.class); operationTypeToClassMapping.put(ComplexRead11.TYPE, ComplexRead11.class); operationTypeToClassMapping.put(ComplexRead12.TYPE, ComplexRead12.class); - operationTypeToClassMapping.put(ComplexRead13.TYPE, ComplexRead13.class); operationTypeToClassMapping.put(SimpleRead1.TYPE, SimpleRead1.class); operationTypeToClassMapping.put(SimpleRead2.TYPE, SimpleRead2.class); operationTypeToClassMapping.put(SimpleRead3.TYPE, SimpleRead3.class); operationTypeToClassMapping.put(SimpleRead4.TYPE, SimpleRead4.class); operationTypeToClassMapping.put(SimpleRead5.TYPE, SimpleRead5.class); operationTypeToClassMapping.put(SimpleRead6.TYPE, SimpleRead6.class); - operationTypeToClassMapping.put(SimpleRead7.TYPE, SimpleRead7.class); - operationTypeToClassMapping.put(SimpleRead8.TYPE, SimpleRead8.class); operationTypeToClassMapping.put(Write1.TYPE, Write1.class); operationTypeToClassMapping.put(Write2.TYPE, Write2.class); operationTypeToClassMapping.put(Write3.TYPE, Write3.class); @@ -532,7 +501,6 @@ public static Map> operationTypeToClassMappi operationTypeToClassMapping.put(Write11.TYPE, Write11.class); operationTypeToClassMapping.put(Write12.TYPE, Write12.class); operationTypeToClassMapping.put(Write13.TYPE, Write13.class); - operationTypeToClassMapping.put(Write14.TYPE, Write14.class); return operationTypeToClassMapping; } @@ -593,8 +561,6 @@ public static Map, String> getUpdateStreamClassToPath classToFileNameMapping.put(Write11.class, INSERTS_DIRECTORY + "/Person.parquet"); classToFileNameMapping.put(Write12.class, INSERTS_DIRECTORY + "/Person.parquet"); classToFileNameMapping.put(Write13.class, INSERTS_DIRECTORY + "/Person.parquet"); - classToFileNameMapping.put(Write14.class, INSERTS_DIRECTORY + "/Person.parquet"); - classToFileNameMapping.put(Write15.class, INSERTS_DIRECTORY + "/Person.parquet"); classToFileNameMapping.put(ReadWrite1.class, INSERTS_DIRECTORY + "/Person.parquet"); classToFileNameMapping.put(ReadWrite2.class, INSERTS_DIRECTORY + "/Person.parquet"); classToFileNameMapping.put(ReadWrite3.class, INSERTS_DIRECTORY + "/Person.parquet"); @@ -619,8 +585,6 @@ public static Map, String> getUpdateStreamClassToDate classToDateColumnNameMapping.put(Write11.class, INSERTS_DATE_COLUMN); classToDateColumnNameMapping.put(Write12.class, INSERTS_DATE_COLUMN); classToDateColumnNameMapping.put(Write13.class, INSERTS_DATE_COLUMN); - classToDateColumnNameMapping.put(Write14.class, INSERTS_DATE_COLUMN); - classToDateColumnNameMapping.put(Write15.class, INSERTS_DATE_COLUMN); classToDateColumnNameMapping.put(ReadWrite1.class, INSERTS_DATE_COLUMN); classToDateColumnNameMapping.put(ReadWrite2.class, INSERTS_DATE_COLUMN); classToDateColumnNameMapping.put(ReadWrite3.class, INSERTS_DATE_COLUMN); diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcOperation.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcOperation.java index bd90cb66..be6ca3f1 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcOperation.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/LdbcOperation.java @@ -10,7 +10,6 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead4; @@ -28,15 +27,11 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead4; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead5; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead6; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead7; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead8; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write1; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write12; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write13; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write14; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write15; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write4; @@ -66,15 +61,12 @@ @JsonSubTypes.Type(ComplexRead10.class), @JsonSubTypes.Type(ComplexRead11.class), @JsonSubTypes.Type(ComplexRead12.class), - @JsonSubTypes.Type(ComplexRead13.class), @JsonSubTypes.Type(SimpleRead1.class), @JsonSubTypes.Type(SimpleRead2.class), @JsonSubTypes.Type(SimpleRead3.class), @JsonSubTypes.Type(SimpleRead4.class), @JsonSubTypes.Type(SimpleRead5.class), @JsonSubTypes.Type(SimpleRead6.class), - @JsonSubTypes.Type(SimpleRead7.class), - @JsonSubTypes.Type(SimpleRead8.class), @JsonSubTypes.Type(Write1.class), @JsonSubTypes.Type(Write2.class), @JsonSubTypes.Type(Write3.class), @@ -88,8 +80,6 @@ @JsonSubTypes.Type(Write11.class), @JsonSubTypes.Type(Write12.class), @JsonSubTypes.Type(Write13.class), - @JsonSubTypes.Type(Write14.class), - @JsonSubTypes.Type(Write15.class), @JsonSubTypes.Type(ReadWrite1.class), @JsonSubTypes.Type(ReadWrite2.class), @JsonSubTypes.Type(ReadWrite3.class) diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/QueryEventStreamReader.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/QueryEventStreamReader.java index 8385f9b0..b7d9dc01 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/QueryEventStreamReader.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/QueryEventStreamReader.java @@ -17,7 +17,6 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead4; @@ -49,7 +48,6 @@ public static Map> getDecoders() { decoders.put(ComplexRead10.TYPE, new ComplexRead10Decoder()); decoders.put(ComplexRead11.TYPE, new ComplexRead11Decoder()); decoders.put(ComplexRead12.TYPE, new ComplexRead12Decoder()); - decoders.put(ComplexRead13.TYPE, new ComplexRead13Decoder()); return decoders; } @@ -357,19 +355,15 @@ public Operation decodeEvent(ResultSet rs) throws WorkloadException { try { long id = rs.getLong(1); long threshold = rs.getLong(2); - float lowerbound = rs.getLong(3); - float upperbound = rs.getLong(4); - Date startTime = new Date(rs.getLong(5)); - Date endTime = new Date(rs.getLong(6)); - int truncationLimit = rs.getInt(7); - TruncationOrder truncationOrder = TruncationOrder.valueOf(rs.getString(8)); + Date startTime = new Date(rs.getLong(3)); + Date endTime = new Date(rs.getLong(4)); + int truncationLimit = rs.getInt(5); + TruncationOrder truncationOrder = TruncationOrder.valueOf(rs.getString(6)); long dependencyTimeStamp = 0; long expiryTimeStamp = Long.MAX_VALUE; Operation query = new ComplexRead9( id, threshold, - lowerbound, - upperbound, startTime, endTime, truncationLimit, @@ -421,32 +415,6 @@ public static class ComplexRead11Decoder implements EventDecoder { * @throws WorkloadException when an error occurs reading the resultSet */ @Override - public Operation decodeEvent(ResultSet rs) throws WorkloadException { - try { - long id = rs.getLong(1); - int k = rs.getInt(2); - long dependencyTimeStamp = 0; - long expiryTimeStamp = Long.MAX_VALUE; - Operation query = new ComplexRead11( - id, - k - ); - query.setDependencyTimeStamp(dependencyTimeStamp); - query.setExpiryTimeStamp(expiryTimeStamp); - return query; - } catch (SQLException e) { - throw new WorkloadException(format("Error while decoding ResultSet for ComplexRead11: %s", e)); - } - } - } - - public static class ComplexRead12Decoder implements EventDecoder { - /** - * @param rs ResultSet object containing the row to decode - * @return ComplexRead12 Object - * @throws WorkloadException when an error occurs reading the resultSet - */ - @Override public Operation decodeEvent(ResultSet rs) throws WorkloadException { try { long id = rs.getLong(1); @@ -456,7 +424,7 @@ public Operation decodeEvent(ResultSet rs) throws WorkloadException { TruncationOrder truncationOrder = TruncationOrder.valueOf(rs.getString(5)); long dependencyTimeStamp = 0; long expiryTimeStamp = Long.MAX_VALUE; - Operation query = new ComplexRead12( + Operation query = new ComplexRead11( id, startTime, endTime, @@ -467,15 +435,15 @@ public Operation decodeEvent(ResultSet rs) throws WorkloadException { query.setExpiryTimeStamp(expiryTimeStamp); return query; } catch (SQLException e) { - throw new WorkloadException(format("Error while decoding ResultSet for ComplexRead12: %s", e)); + throw new WorkloadException(format("Error while decoding ResultSet for ComplexRead11: %s", e)); } } } - public static class ComplexRead13Decoder implements EventDecoder { + public static class ComplexRead12Decoder implements EventDecoder { /** * @param rs ResultSet object containing the row to decode - * @return ComplexRead13 Object + * @return ComplexRead12 Object * @throws WorkloadException when an error occurs reading the resultSet */ @Override @@ -488,7 +456,7 @@ public Operation decodeEvent(ResultSet rs) throws WorkloadException { TruncationOrder truncationOrder = TruncationOrder.valueOf(rs.getString(5)); long dependencyTimeStamp = 0; long expiryTimeStamp = Long.MAX_VALUE; - Operation query = new ComplexRead13( + Operation query = new ComplexRead12( id, startTime, endTime, @@ -499,7 +467,7 @@ public Operation decodeEvent(ResultSet rs) throws WorkloadException { query.setExpiryTimeStamp(expiryTimeStamp); return query; } catch (SQLException e) { - throw new WorkloadException(format("Error while decoding ResultSet for ComplexRead13: %s", e)); + throw new WorkloadException(format("Error while decoding ResultSet for ComplexRead12: %s", e)); } } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/UpdateEventStreamReader.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/UpdateEventStreamReader.java index b82c5b42..39c8b21e 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/UpdateEventStreamReader.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/UpdateEventStreamReader.java @@ -20,8 +20,6 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write12; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write13; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write14; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write15; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write4; @@ -68,8 +66,6 @@ public static Map, EventDecoder> getDecode decoders.put(Write11.class, new EventDecoderWrite11()); decoders.put(Write12.class, new EventDecoderWrite12()); decoders.put(Write13.class, new EventDecoderWrite13()); - decoders.put(Write14.class, new EventDecoderWrite14()); - decoders.put(Write15.class, new EventDecoderWrite15()); decoders.put(ReadWrite1.class, new EventDecoderReadWrite1()); decoders.put(ReadWrite2.class, new EventDecoderReadWrite2()); decoders.put(ReadWrite3.class, new EventDecoderReadWrite3()); @@ -380,67 +376,27 @@ public static class EventDecoderWrite12 implements EventStreamReader.EventDecode * @throws WorkloadException when an error occurs reading the resultSet */ @Override - public Operation decodeEvent(ResultSet rs) throws WorkloadException { - try { - long mediumId = rs.getLong(1); - - Operation operation = new Write12( - mediumId); - return operation; - } catch (SQLException e) { - throw new WorkloadException(format("Error while decoding ResultSet for Write12: %s", e)); - } - } - } - - public static class EventDecoderWrite13 implements EventStreamReader.EventDecoder { - /** - * @param rs ResultSet object containing the row to decode - * @return Write13 Object - * @throws WorkloadException when an error occurs reading the resultSet - */ - @Override public Operation decodeEvent(ResultSet rs) throws WorkloadException { try { long pid1 = rs.getLong(1); long pid2 = rs.getLong(2); Date currentTime = new Date(rs.getTimestamp(3).getTime()); - Operation operation = new Write13( + Operation operation = new Write12( pid1, pid2, currentTime); return operation; } catch (SQLException e) { - throw new WorkloadException(format("Error while decoding ResultSet for Write13: %s", e)); - } - } - } - - public static class EventDecoderWrite14 implements EventStreamReader.EventDecoder { - /** - * @param rs ResultSet object containing the row to decode - * @return Write14 Object - * @throws WorkloadException when an error occurs reading the resultSet - */ - @Override - public Operation decodeEvent(ResultSet rs) throws WorkloadException { - try { - long id = rs.getLong(1); - - Operation operation = new Write14( - id); - return operation; - } catch (SQLException e) { - throw new WorkloadException(format("Error while decoding ResultSet for Write14: %s", e)); + throw new WorkloadException(format("Error while decoding ResultSet for Write12: %s", e)); } } } - public static class EventDecoderWrite15 implements EventStreamReader.EventDecoder { + public static class EventDecoderWrite13 implements EventStreamReader.EventDecoder { /** * @param rs ResultSet object containing the row to decode - * @return Write15 Object + * @return Write13 Object * @throws WorkloadException when an error occurs reading the resultSet */ @Override @@ -448,16 +404,15 @@ public Operation decodeEvent(ResultSet rs) throws WorkloadException { try { long id = rs.getLong(1); - Operation operation = new Write15( + Operation operation = new Write13( id); return operation; } catch (SQLException e) { - throw new WorkloadException(format("Error while decoding ResultSet for Write15: %s", e)); + throw new WorkloadException(format("Error while decoding ResultSet for Write13: %s", e)); } } } - public static class EventDecoderReadWrite1 implements EventStreamReader.EventDecoder { /** * @param rs ResultSet object containing the row to decode diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead1.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead1.java index afc83c02..93ed3984 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead1.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead1.java @@ -2,10 +2,10 @@ /* * Transaction workload complex read query 1: * -- Blocked medium related accounts -- - * Given an Account and a specified time window between start_time and end_time, find all the Account that is signed - * in by a blocked Medium and has fund transfered via edge1 by at most 3 steps. -Note that all timestamps in the transfer trace are in ascending order. Return the id of the account, -the distance from the account to given one, the id and type of the related medium + * Given an Account and a specified time window between startTime and endTime, find all the Account +that is signed in by a blocked Medium and has fund transferred via edge1 by at most 3 steps. Note +that all timestamps in the transfer trace must be in ascending order. Return the id of the account, +the distance from the account to given one, the id and type of the related medium. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead10.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead10.java index 1634c3fe..4ef291d0 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead10.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead10.java @@ -2,9 +2,9 @@ /* * Transaction workload complex read query 10: * -- Similarity of investor relationship -- - * Given two Persons and a specified time window between start_time and end_time, find all the -Companies the two Persons invest. Return the jaccard similarity between the two companies set. -Note that there is no truncation in this case. + * Given two Persons and a specified time window between startTime and endTime, find all the Companies the two + * Persons invest in. Return the Jaccard similarity between the two companies set. +Return 0 if there is no edges found connecting to any of these two persons. */ import com.fasterxml.jackson.annotation.JsonProperty; @@ -20,32 +20,32 @@ public class ComplexRead10 extends Operation> { public static final int TYPE = 10; - public static final String ID1 = "id1"; - public static final String ID2 = "id2"; + public static final String PID1 = "pid1"; + public static final String PID2 = "pid2"; public static final String START_TIME = "startTime"; public static final String END_TIME = "endTime"; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private final long id1; - private final long id2; + private final long pid1; + private final long pid2; private final Date startTime; private final Date endTime; - public ComplexRead10(@JsonProperty(ID1) long id1, - @JsonProperty(ID2) long id2, + public ComplexRead10(@JsonProperty(PID1) long pid1, + @JsonProperty(PID2) long pid2, @JsonProperty(START_TIME) Date startTime, @JsonProperty(END_TIME) Date endTime) { - this.id1 = id1; - this.id2 = id2; + this.pid1 = pid1; + this.pid2 = pid2; this.startTime = startTime; this.endTime = endTime; } - public long getId1() { - return id1; + public long getPid1() { + return pid1; } - public long getId2() { - return id2; + public long getPid2() { + return pid2; } public Date getStartTime() { @@ -64,8 +64,8 @@ public int type() { @Override public Map parameterMap() { return ImmutableMap.builder() - .put(ID1, id1) - .put(ID2, id2) + .put(PID1, pid1) + .put(PID2, pid2) .put(START_TIME, startTime) .put(END_TIME, endTime) .build(); @@ -85,24 +85,24 @@ public boolean equals(Object o) { return false; } ComplexRead10 that = (ComplexRead10) o; - return id1 == that.id1 - && id2 == that.id2 + return pid1 == that.pid1 + && pid2 == that.pid2 && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime); } @Override public int hashCode() { - return Objects.hash(id1, id2, startTime, endTime); + return Objects.hash(pid1, pid2, startTime, endTime); } @Override public String toString() { return "ComplexRead10{" - + "id1=" - + id1 - + ", id2=" - + id2 + + "pid1=" + + pid1 + + ", pid2=" + + pid2 + ", startTime=" + startTime + ", endTime=" diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11.java index 4ed4c435..3e002cdb 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11.java @@ -1,10 +1,10 @@ package org.ldbcouncil.finbench.driver.workloads.transaction.queries; /* * Transaction workload complex read query 11: - * -- Final share analysis in investor relationship -- - * Given a Company, find all the Companies and Persons the Company invests by at most k steps. Then -calculate the final share ratio of the investors to the given company groupby the investor in descending order. -* Final share ratio means the final shareholding ratio of each investor in the company. + * -- Guarantee Chain Detection -- + * Given a Person and a specified time window between startTime and endTime, find all the persons +in the guarantee chain until end and their loans applied. Return the sum of loan amount and the +count of distinct loans. */ import com.fasterxml.jackson.annotation.JsonProperty; @@ -12,31 +12,57 @@ import com.google.common.collect.ImmutableMap; import java.io.IOException; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.Objects; import org.ldbcouncil.finbench.driver.Operation; +import org.ldbcouncil.finbench.driver.truncation.TruncationOrder; public class ComplexRead11 extends Operation> { public static final int TYPE = 11; public static final String ID = "id"; - public static final String K = "k"; + public static final String START_TIME = "startTime"; + public static final String END_TIME = "endTime"; + public static final String TRUNCATION_LIMIT = "truncationLimit"; + public static final String TRUNCATION_ORDER = "truncationOrder"; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private final long id; - private final int k; + private final Date startTime; + private final Date endTime; + private final int truncationLimit; + private final TruncationOrder truncationOrder; public ComplexRead11(@JsonProperty(ID) long id, - @JsonProperty(K) int k) { + @JsonProperty(START_TIME) Date startTime, + @JsonProperty(END_TIME) Date endTime, + @JsonProperty(TRUNCATION_LIMIT) int truncationLimit, + @JsonProperty(TRUNCATION_ORDER) TruncationOrder truncationOrder) { this.id = id; - this.k = k; + this.startTime = startTime; + this.endTime = endTime; + this.truncationLimit = truncationLimit; + this.truncationOrder = truncationOrder; } public long getId() { return id; } - public int getK() { - return k; + public Date getStartTime() { + return startTime; + } + + public Date getEndTime() { + return endTime; + } + + public int getTruncationLimit() { + return truncationLimit; + } + + public TruncationOrder getTruncationOrder() { + return truncationOrder; } @Override @@ -48,7 +74,10 @@ public int type() { public Map parameterMap() { return ImmutableMap.builder() .put(ID, id) - .put(K, k) + .put(START_TIME, startTime) + .put(END_TIME, endTime) + .put(TRUNCATION_LIMIT, truncationLimit) + .put(TRUNCATION_ORDER, truncationOrder) .build(); } @@ -67,12 +96,15 @@ public boolean equals(Object o) { } ComplexRead11 that = (ComplexRead11) o; return id == that.id - && k == that.k; + && Objects.equals(startTime, that.startTime) + && Objects.equals(endTime, that.endTime) + && truncationLimit == that.truncationLimit + && truncationOrder == that.truncationOrder; } @Override public int hashCode() { - return Objects.hash(id, k); + return Objects.hash(id, startTime, endTime, truncationLimit, truncationOrder); } @Override @@ -80,8 +112,14 @@ public String toString() { return "ComplexRead11{" + "id=" + id - + ", k=" - + k + + ", startTime=" + + startTime + + ", endTime=" + + endTime + + ", truncationLimit=" + + truncationLimit + + ", truncationOrder=" + + truncationOrder + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11Result.java index 04c997cd..9e4ba3a0 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11Result.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead11Result.java @@ -4,31 +4,23 @@ import java.util.Objects; public class ComplexRead11Result { - public static final String ID = "id"; - public static final String TYPE = "type"; - public static final String RATIO = "ratio"; - private final long id; - private final String type; - private final float ratio; - - public ComplexRead11Result(@JsonProperty(ID) long id, - @JsonProperty(TYPE) String type, - @JsonProperty(RATIO) float ratio) { - this.id = id; - this.type = type; - this.ratio = ratio; - } - - public long getId() { - return id; + public static final String SUM_LOAN_AMOUNT = "sumLoanAmount"; + public static final String NUM_LOANS = "numLoans"; + private final long sumLoanAmount; + private final int numLoans; + + public ComplexRead11Result(@JsonProperty(SUM_LOAN_AMOUNT) long sumLoanAmount, + @JsonProperty(NUM_LOANS) int numLoans) { + this.sumLoanAmount = sumLoanAmount; + this.numLoans = numLoans; } - public String getType() { - return type; + public long getSumLoanAmount() { + return sumLoanAmount; } - public float getRatio() { - return ratio; + public int getNumLoans() { + return numLoans; } @Override @@ -40,25 +32,22 @@ public boolean equals(Object o) { return false; } ComplexRead11Result that = (ComplexRead11Result) o; - return id == that.id - && Objects.equals(type, that.type) - && ratio == that.ratio; + return sumLoanAmount == that.sumLoanAmount + && numLoans == that.numLoans; } @Override public int hashCode() { - return Objects.hash(id, type, ratio); + return Objects.hash(sumLoanAmount, numLoans); } @Override public String toString() { return "ComplexRead11Result{" - + "id=" - + id - + ", type=" - + type - + ", ratio=" - + ratio + + "sumLoanAmount=" + + sumLoanAmount + + ", numLoans=" + + numLoans + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12.java index 8c80f22c..ff759f0b 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12.java @@ -1,10 +1,10 @@ package org.ldbcouncil.finbench.driver.workloads.transaction.queries; /* * Transaction workload complex read query 12: - * -- Guarantee Chain Detection -- - * Given a Person and a specified time window between start_time and end_time, find all the persons -in the guarantee chain until end and their loans applied. Return the sum of loan amount and the -count of distinct loans. + * -- Transfer to company amount statistics -- + * Given a Person and a specified time window between startTime and endTime, find all the company +accounts that s/he has transferred to. Return the ids of the companies’ accounts and the sum of +their transfer amount in descending order. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12Result.java index 604dfebd..08dbbe35 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12Result.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead12Result.java @@ -4,23 +4,23 @@ import java.util.Objects; public class ComplexRead12Result { - public static final String SUM_LOAN_AMOUNT = "sumLoanAmount"; - public static final String NUM_LOANS = "numLoans"; - private final long sumLoanAmount; - private final int numLoans; - - public ComplexRead12Result(@JsonProperty(SUM_LOAN_AMOUNT) long sumLoanAmount, - @JsonProperty(NUM_LOANS) int numLoans) { - this.sumLoanAmount = sumLoanAmount; - this.numLoans = numLoans; + public static final String COMP_ACCOUNT_ID = "compAccountId"; + public static final String SUM_EDGE2_AMOUNT = "sumEdge2Amount"; + private final long compAccountId; + private final long sumEdge2Amount; + + public ComplexRead12Result(@JsonProperty(COMP_ACCOUNT_ID) long compAccountId, + @JsonProperty(SUM_EDGE2_AMOUNT) long sumEdge2Amount) { + this.compAccountId = compAccountId; + this.sumEdge2Amount = sumEdge2Amount; } - public long getSumLoanAmount() { - return sumLoanAmount; + public long getCompAccountId() { + return compAccountId; } - public int getNumLoans() { - return numLoans; + public long getSumEdge2Amount() { + return sumEdge2Amount; } @Override @@ -32,22 +32,22 @@ public boolean equals(Object o) { return false; } ComplexRead12Result that = (ComplexRead12Result) o; - return sumLoanAmount == that.sumLoanAmount - && numLoans == that.numLoans; + return compAccountId == that.compAccountId + && sumEdge2Amount == that.sumEdge2Amount; } @Override public int hashCode() { - return Objects.hash(sumLoanAmount, numLoans); + return Objects.hash(compAccountId, sumEdge2Amount); } @Override public String toString() { return "ComplexRead12Result{" - + "sumLoanAmount=" - + sumLoanAmount - + ", numLoans=" - + numLoans + + "compAccountId=" + + compAccountId + + ", sumEdge2Amount=" + + sumEdge2Amount + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead13.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead13.java deleted file mode 100644 index ef695d90..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead13.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; -/* - * Transaction workload complex read query 13: - * -- Transfer to company amount statistics -- - * Given a Person and a specified time window between start_time and end_time, find all the company -accounts that s/he has transferred to. Return the ids of the companies’ accounts and the sum of -their transfer amount in descending order. - */ - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.collect.ImmutableMap; -import java.io.IOException; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import org.ldbcouncil.finbench.driver.Operation; -import org.ldbcouncil.finbench.driver.truncation.TruncationOrder; - -public class ComplexRead13 extends Operation> { - public static final int TYPE = 13; - public static final String ID = "id"; - public static final String START_TIME = "startTime"; - public static final String END_TIME = "endTime"; - public static final String TRUNCATION_LIMIT = "truncationLimit"; - public static final String TRUNCATION_ORDER = "truncationOrder"; - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private final long id; - private final Date startTime; - private final Date endTime; - private final int truncationLimit; - private final TruncationOrder truncationOrder; - - public ComplexRead13(@JsonProperty(ID) long id, - @JsonProperty(START_TIME) Date startTime, - @JsonProperty(END_TIME) Date endTime, - @JsonProperty(TRUNCATION_LIMIT) int truncationLimit, - @JsonProperty(TRUNCATION_ORDER) TruncationOrder truncationOrder) { - this.id = id; - this.startTime = startTime; - this.endTime = endTime; - this.truncationLimit = truncationLimit; - this.truncationOrder = truncationOrder; - } - - public long getId() { - return id; - } - - public Date getStartTime() { - return startTime; - } - - public Date getEndTime() { - return endTime; - } - - public int getTruncationLimit() { - return truncationLimit; - } - - public TruncationOrder getTruncationOrder() { - return truncationOrder; - } - - @Override - public int type() { - return TYPE; - } - - @Override - public Map parameterMap() { - return ImmutableMap.builder() - .put(ID, id) - .put(START_TIME, startTime) - .put(END_TIME, endTime) - .put(TRUNCATION_LIMIT, truncationLimit) - .put(TRUNCATION_ORDER, truncationOrder) - .build(); - } - - @Override - public List deserializeResult(String serializedOperationResult) throws IOException { - return Arrays.asList(OBJECT_MAPPER.readValue(serializedOperationResult, ComplexRead13Result[].class)); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ComplexRead13 that = (ComplexRead13) o; - return id == that.id - && Objects.equals(startTime, that.startTime) - && Objects.equals(endTime, that.endTime) - && truncationLimit == that.truncationLimit - && truncationOrder == that.truncationOrder; - } - - @Override - public int hashCode() { - return Objects.hash(id, startTime, endTime, truncationLimit, truncationOrder); - } - - @Override - public String toString() { - return "ComplexRead13{" - + "id=" - + id - + ", startTime=" - + startTime - + ", endTime=" - + endTime - + ", truncationLimit=" - + truncationLimit - + ", truncationOrder=" - + truncationOrder - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead13Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead13Result.java deleted file mode 100644 index 74e7f72c..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead13Result.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; - -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -public class ComplexRead13Result { - public static final String COMP_ACCOUNT_ID = "compAccountId"; - public static final String SUM_EDGE2_AMOUNT = "sumEdge2Amount"; - private final long compAccountId; - private final long sumEdge2Amount; - - public ComplexRead13Result(@JsonProperty(COMP_ACCOUNT_ID) long compAccountId, - @JsonProperty(SUM_EDGE2_AMOUNT) long sumEdge2Amount) { - this.compAccountId = compAccountId; - this.sumEdge2Amount = sumEdge2Amount; - } - - public long getCompAccountId() { - return compAccountId; - } - - public long getSumEdge2Amount() { - return sumEdge2Amount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ComplexRead13Result that = (ComplexRead13Result) o; - return compAccountId == that.compAccountId - && sumEdge2Amount == that.sumEdge2Amount; - } - - @Override - public int hashCode() { - return Objects.hash(compAccountId, sumEdge2Amount); - } - - @Override - public String toString() { - return "ComplexRead13Result{" - + "compAccountId=" - + compAccountId - + ", sumEdge2Amount=" - + sumEdge2Amount - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead2.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead2.java index 8c9b1188..a5646f2d 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead2.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead2.java @@ -2,9 +2,9 @@ /* * Transaction workload complex read query 2: * -- Fund gathered from the accounts applying loans -- - * Given a Person and a specified time window between start_time and end_time, find an Account -owned by the Person which has fund transferred from other Accounts by at most 3 steps(edge2) which -has fund deposited from a loan. The timestamps of in transfer trace(edge2) are in ascending order + * Given a Person and a specified time window between startTime and endTime, find an Account owned +by the Person which has fund transferred from other Accounts by at most 3 steps (edge2) which has +fund deposited from a loan. The timestamps of in transfer trace (edge2) must be in ascending order from the upstream to downstream. Return the sum of distinct loan amount, the sum of distinct loan balance and the count of distinct loans. */ diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead3.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead3.java index 38d58ac9..89e50dfa 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead3.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead3.java @@ -2,9 +2,10 @@ /* * Transaction workload complex read query 3: * -- Shortest transfer path -- - * Given two accounts and a specified time window between start_time and end_time, find the length + * Given two accounts and a specified time window between startTime and endTime, find the length of shortest path between these two accounts by the transfer relationships. Note that all the edges -in the path should be in the time window and of type transfer. If there is no path found, return -1. +in the path should be in the time window and of type transfer. Return 0 if src and dst are directly +connected. Return -1 if there is no path found. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead4.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead4.java index 342544b4..b5556c26 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead4.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead4.java @@ -2,10 +2,12 @@ /* * Transaction workload complex read query 4: * -- Three accounts in a transfer cycle -- - * Given two accounts and a specified time window between start_time and end_time, find the sum -and max of transfers (edge2 and edge3) of them via another account(otherN) in a specific time -range between start_time and end_time. Return the id of the other account, the sum and max of -the transfer amount (edge2 and edge3). Return all -1 if there is no transfers found. + * Given two accounts src and dst, and a specified time window between startTime and endTime, +(1) check whether src transferred money to dst in the given time window (edge1) +(2) find all other accounts (other1, . . . , otherN) which received money from dst (edge2) and +transferred money to src (edge3) in a specific time. +For each of these other accounts, return the id of the account, the sum and max of the transfer +amount (edge2 and edge3). */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5.java index 1c46747b..6f9f0092 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5.java @@ -2,11 +2,11 @@ /* * Transaction workload complex read query 5: * -- Exact Account Transfer Trace -- - * Given a Person and a specified time window between start_time and end_time, find the transfer -trace from the account(src) owned by the Person to another account(dst) by at most 3 steps. Note -that the trace(edge2) are in ascending order in terms of timestamp. Return all traces. + * Given a Person and a specified time window between startTime and endTime, find the transfer trace +from the account (src) owned by the Person to another account (dst) by at most 3 steps. Note that +the trace (edge2) must be ascending order of their timestamps. Return all the transfer traces. Note: Multiple edges of from the same src to the same dst should be seen as identical path. And -the result does not include the recurring account in cycles. +the resulting paths shall not include recurring accounts (cycles in the trace are not allowed). */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5Result.java index 056fc945..0f225d76 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5Result.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead5Result.java @@ -5,15 +5,15 @@ import org.ldbcouncil.finbench.driver.result.Path; public class ComplexRead5Result { - public static final String PATHS = "paths"; - private final Path paths; + public static final String PATH = "path"; + private final Path path; - public ComplexRead5Result(@JsonProperty(PATHS) Path paths) { - this.paths = paths; + public ComplexRead5Result(@JsonProperty(PATH) Path path) { + this.path = path; } - public Path getPaths() { - return paths; + public Path getPath() { + return path; } @Override @@ -25,19 +25,19 @@ public boolean equals(Object o) { return false; } ComplexRead5Result that = (ComplexRead5Result) o; - return paths == that.paths; + return path == that.path; } @Override public int hashCode() { - return Objects.hash(paths); + return Objects.hash(path); } @Override public String toString() { return "ComplexRead5Result{" - + "paths=" - + paths + + "path=" + + path + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead6.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead6.java index e66a4fd4..d3d48900 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead6.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead6.java @@ -2,11 +2,11 @@ /* * Transaction workload complex read query 6: * -- Withdrawal after Many-to-One transfer -- - * Given an account of type card and a specified time window between start_time and end_time, find -all the connected accounts(mid) via withdrawal(edge2) satisfying, (1)More than 3 transfer-ins(edge1) -from other accounts(src) whose amount exceeds threshold1. (2) The amount of withdrawal(edge2) + * Given an account of type card and a specified time window between startTime and endTime, find all +the connected accounts (mid) via withdrawal (edge2) satisfying, (1) More than 3 transfer-ins (edge1) +from other accounts (src) whose amount exceeds threshold1. (2) The amount of withdrawal (edge2) exceeds threshold2. Return the sum of transfer amount from src to mid, the amount from mid to -dstCard groupby mid. +dstCard grouped by mid. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead7.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead7.java index fbc91648..a8797fbf 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead7.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead7.java @@ -2,11 +2,10 @@ /* * Transaction workload complex read query 7: * -- Fast-in and Fast-out -- - * Given an Account and a specified time window between start_time and end_time, find all the -transfer-in(edge1) and transfer-out(edge2) whose amount exceeds threshold. Return the count of src -and dst accounts and the ratio of transfer-in amount over transfer-out amount. The fast-in and fashout -* means a tight window between start_time and end_time. Return the ratio as -1 if there is no -edge2. + * Given an Account and a specified time window between startTime and endTime, find all the transferin (edge1) + * and transfer-out (edge2) whose amount exceeds threshold. Return the count of src and +dst accounts and the ratio of transfer-in amount over transfer-out amount. The fast-in and fash-out +means a tight window between startTime and endTime. Return the ratio as -1 if there is no edge2. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8.java index 035574c2..2dde19fb 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8.java @@ -2,12 +2,12 @@ /* * Transaction workload complex read query 8: * -- Transfer trace after loan applied -- - * Given a Loan and a specified time window between start_time and end_time, trace the fund transfer + * Given a Loan and a specified time window between startTime and endTime, trace the fund transfer or withdraw by at most 3 steps from the account the Loan deposits. Note that the transfer paths of -edge1, edge2, edge3 and edge4 are in a specific time range between start_time and end_time. Amount -of each transfers or withdrawals between the account and the upstream account should exceed -a specified threshold of the upstream transfer. Return all the accounts’ id in the downstream of -loan, their final ratio and their distanceFromLoan. +edge1, edge2, edge3 and edge4 are in a specific time range between startTime and endTime. Amount +of each transfers or withdrawals between the account and the upstream account should exceed a +specified threshold of the upstream transfer. Return all the accounts’ id in the downstream of loan +with the final ratio and distanceFromLoan. Note: Upstream means the last edge in the trace. */ diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8Result.java index 20af0922..94ae3f2a 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8Result.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead8Result.java @@ -6,17 +6,17 @@ public class ComplexRead8Result { public static final String DST_ID = "dstId"; public static final String RATIO = "ratio"; - public static final String DISTANCE_FROM_LOAN = "distanceFromLoan"; + public static final String MIN_DISTANCE_FROM_LOAN = "minDistanceFromLoan"; private final long dstId; private final float ratio; - private final int distanceFromLoan; + private final int minDistanceFromLoan; public ComplexRead8Result(@JsonProperty(DST_ID) long dstId, @JsonProperty(RATIO) float ratio, - @JsonProperty(DISTANCE_FROM_LOAN) int distanceFromLoan) { + @JsonProperty(MIN_DISTANCE_FROM_LOAN) int minDistanceFromLoan) { this.dstId = dstId; this.ratio = ratio; - this.distanceFromLoan = distanceFromLoan; + this.minDistanceFromLoan = minDistanceFromLoan; } public long getDstId() { @@ -27,8 +27,8 @@ public float getRatio() { return ratio; } - public int getDistanceFromLoan() { - return distanceFromLoan; + public int getMinDistanceFromLoan() { + return minDistanceFromLoan; } @Override @@ -42,12 +42,12 @@ public boolean equals(Object o) { ComplexRead8Result that = (ComplexRead8Result) o; return dstId == that.dstId && ratio == that.ratio - && distanceFromLoan == that.distanceFromLoan; + && minDistanceFromLoan == that.minDistanceFromLoan; } @Override public int hashCode() { - return Objects.hash(dstId, ratio, distanceFromLoan); + return Objects.hash(dstId, ratio, minDistanceFromLoan); } @Override @@ -57,8 +57,8 @@ public String toString() { + dstId + ", ratio=" + ratio - + ", distanceFromLoan=" - + distanceFromLoan + + ", minDistanceFromLoan=" + + minDistanceFromLoan + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9.java index ca44c1d9..1e602c83 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9.java @@ -2,11 +2,11 @@ /* * Transaction workload complex read query 9: * -- Money laundering with loan involved -- - * Given an account, a bound of transfer amount and a specified time window between start_time -and end_time, find the despoit and repay edge between the account and a loan, the transfers-in and -transfers-out. Then calculate the amount ratio of deposit over repay(sum of edge1 over sum of edge2), -the amount ratio of transfers-in over transfers-out(sum of edge3 over sum of edge4), the amount ratio -of deposit over transfers-out(sum of edge1 over sum of edge4 ). Return the ratios. + * Given an account, a bound of transfer amount and a specified time window between startTime +and endTime, find the deposit and repay edge between the account and a loan, the transfers-in and +transfers-out. Return ratioRepay (sum of edge1 over sum of edge2), ratioDeposit (sum of edge1 over +sum of edge4), ratioTransfer (sum of edge3 over sum of edge4). Return -1 for ratioRepay if there is +no edge2 found. Return -1 for ratioDeposit and ratioTransfer if there is no edge4 found. */ import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,8 +25,6 @@ public class ComplexRead9 extends Operation> { public static final int TYPE = 9; public static final String ID = "id"; public static final String THRESHOLD = "threshold"; - public static final String LOWER_BOUND = "lowerBound"; - public static final String UPPER_BOUND = "upperBound"; public static final String START_TIME = "startTime"; public static final String END_TIME = "endTime"; public static final String TRUNCATION_LIMIT = "truncationLimit"; @@ -34,8 +32,6 @@ public class ComplexRead9 extends Operation> { private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private final long id; private final long threshold; - private final float lowerBound; - private final float upperBound; private final Date startTime; private final Date endTime; private final int truncationLimit; @@ -43,16 +39,12 @@ public class ComplexRead9 extends Operation> { public ComplexRead9(@JsonProperty(ID) long id, @JsonProperty(THRESHOLD) long threshold, - @JsonProperty(LOWER_BOUND) float lowerBound, - @JsonProperty(UPPER_BOUND) float upperBound, @JsonProperty(START_TIME) Date startTime, @JsonProperty(END_TIME) Date endTime, @JsonProperty(TRUNCATION_LIMIT) int truncationLimit, @JsonProperty(TRUNCATION_ORDER) TruncationOrder truncationOrder) { this.id = id; this.threshold = threshold; - this.lowerBound = lowerBound; - this.upperBound = upperBound; this.startTime = startTime; this.endTime = endTime; this.truncationLimit = truncationLimit; @@ -67,14 +59,6 @@ public long getThreshold() { return threshold; } - public float getLowerBound() { - return lowerBound; - } - - public float getUpperBound() { - return upperBound; - } - public Date getStartTime() { return startTime; } @@ -101,8 +85,6 @@ public Map parameterMap() { return ImmutableMap.builder() .put(ID, id) .put(THRESHOLD, threshold) - .put(LOWER_BOUND, lowerBound) - .put(UPPER_BOUND, upperBound) .put(START_TIME, startTime) .put(END_TIME, endTime) .put(TRUNCATION_LIMIT, truncationLimit) @@ -126,8 +108,6 @@ public boolean equals(Object o) { ComplexRead9 that = (ComplexRead9) o; return id == that.id && threshold == that.threshold - && lowerBound == that.lowerBound - && upperBound == that.upperBound && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime) && truncationLimit == that.truncationLimit @@ -136,8 +116,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, threshold, lowerBound, upperBound, startTime, - endTime, truncationLimit, truncationOrder); + return Objects.hash(id, threshold, startTime, endTime, + truncationLimit, truncationOrder); } @Override @@ -147,10 +127,6 @@ public String toString() { + id + ", threshold=" + threshold - + ", lowerBound=" - + lowerBound - + ", upperBound=" - + upperBound + ", startTime=" + startTime + ", endTime=" diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9Result.java index 121e95cf..1e2ea03d 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9Result.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ComplexRead9Result.java @@ -5,30 +5,30 @@ public class ComplexRead9Result { public static final String RATIO_REPAY = "ratioRepay"; - public static final String RATIO_OUT = "ratioOut"; - public static final String RATIO_IN = "ratioIn"; + public static final String RATIO_DEPOSIT = "ratioDeposit"; + public static final String RATIO_TRANSFER = "ratioTransfer"; private final float ratioRepay; - private final float ratioOut; - private final float ratioIn; + private final float ratioDeposit; + private final float ratioTransfer; public ComplexRead9Result(@JsonProperty(RATIO_REPAY) float ratioRepay, - @JsonProperty(RATIO_OUT) float ratioOut, - @JsonProperty(RATIO_IN) float ratioIn) { + @JsonProperty(RATIO_DEPOSIT) float ratioDeposit, + @JsonProperty(RATIO_TRANSFER) float ratioTransfer) { this.ratioRepay = ratioRepay; - this.ratioOut = ratioOut; - this.ratioIn = ratioIn; + this.ratioDeposit = ratioDeposit; + this.ratioTransfer = ratioTransfer; } public float getRatioRepay() { return ratioRepay; } - public float getRatioOut() { - return ratioOut; + public float getRatioDeposit() { + return ratioDeposit; } - public float getRatioIn() { - return ratioIn; + public float getRatioTransfer() { + return ratioTransfer; } @Override @@ -41,13 +41,13 @@ public boolean equals(Object o) { } ComplexRead9Result that = (ComplexRead9Result) o; return ratioRepay == that.ratioRepay - && ratioOut == that.ratioOut - && ratioIn == that.ratioIn; + && ratioDeposit == that.ratioDeposit + && ratioTransfer == that.ratioTransfer; } @Override public int hashCode() { - return Objects.hash(ratioRepay, ratioOut, ratioIn); + return Objects.hash(ratioRepay, ratioDeposit, ratioTransfer); } @Override @@ -55,10 +55,10 @@ public String toString() { return "ComplexRead9Result{" + "ratioRepay=" + ratioRepay - + ", ratioOut=" - + ratioOut - + ", ratioIn=" - + ratioIn + + ", ratioDeposit=" + + ratioDeposit + + ", ratioTransfer=" + + ratioTransfer + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite1.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite1.java index 86f4b048..e480edc6 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite1.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite1.java @@ -6,7 +6,7 @@ • In the very beginning, read the blocked status of related accounts. The transaction aborts if one of them is blocked. Move to the next step if none is blocked. • Add a transfer edge inside the transaction. -• Detect if a new transfer cycle formed(which means there is no edges existing between the +• Detect if a new transfer cycle formed (which means there are no edges existing between the related accounts before). Transaction aborts if formed, and then mark the related accounts as blocked in another transaction. Otherwise the transaction commits. */ @@ -23,27 +23,27 @@ public class ReadWrite1 extends Operation { public static final int TYPE = 10001; public static final String SRC_ID = "srcId"; public static final String DST_ID = "dstId"; - public static final String CURRENT_TIME = "currentTime"; - public static final String AMT = "amt"; + public static final String TIME = "time"; + public static final String AMOUNT = "amount"; public static final String START_TIME = "startTime"; public static final String END_TIME = "endTime"; private final long srcId; private final long dstId; - private final Date currentTime; - private final long amt; + private final Date time; + private final long amount; private final Date startTime; private final Date endTime; public ReadWrite1(@JsonProperty(SRC_ID) long srcId, @JsonProperty(DST_ID) long dstId, - @JsonProperty(CURRENT_TIME) Date currentTime, - @JsonProperty(AMT) long amt, + @JsonProperty(TIME) Date time, + @JsonProperty(AMOUNT) long amount, @JsonProperty(START_TIME) Date startTime, @JsonProperty(END_TIME) Date endTime) { this.srcId = srcId; this.dstId = dstId; - this.currentTime = currentTime; - this.amt = amt; + this.time = time; + this.amount = amount; this.startTime = startTime; this.endTime = endTime; } @@ -56,12 +56,12 @@ public long getDstId() { return dstId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } - public long getAmt() { - return amt; + public long getAmount() { + return amount; } public Date getStartTime() { @@ -82,8 +82,8 @@ public Map parameterMap() { return ImmutableMap.builder() .put(SRC_ID, srcId) .put(DST_ID, dstId) - .put(CURRENT_TIME, currentTime) - .put(AMT, amt) + .put(TIME, time) + .put(AMOUNT, amount) .put(START_TIME, startTime) .put(END_TIME, endTime) .build(); @@ -105,15 +105,15 @@ public boolean equals(Object o) { ReadWrite1 that = (ReadWrite1) o; return srcId == that.srcId && dstId == that.dstId - && Objects.equals(currentTime, that.currentTime) - && amt == that.amt + && Objects.equals(time, that.time) + && amount == that.amount && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime); } @Override public int hashCode() { - return Objects.hash(srcId, dstId, currentTime, amt, startTime, endTime); + return Objects.hash(srcId, dstId, time, amount, startTime, endTime); } @Override @@ -123,10 +123,10 @@ public String toString() { + srcId + ", dstId=" + dstId - + ", currentTime=" - + currentTime - + ", amt=" - + amt + + ", time=" + + time + + ", amount=" + + amount + ", startTime=" + startTime + ", endTime=" diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite2.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite2.java index 16a9e33f..5477a9e8 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite2.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite2.java @@ -23,30 +23,30 @@ public class ReadWrite2 extends Operation { public static final int TYPE = 10002; public static final String SRC_ID = "srcId"; public static final String DST_ID = "dstId"; - public static final String CURRENT_TIME = "currentTime"; - public static final String AMT = "amt"; + public static final String TIME = "time"; + public static final String AMOUNT = "amount"; public static final String THRESHOLD = "threshold"; public static final String START_TIME = "startTime"; public static final String END_TIME = "endTime"; private final long srcId; private final long dstId; - private final Date currentTime; - private final long amt; + private final Date time; + private final long amount; private final long threshold; private final Date startTime; private final Date endTime; public ReadWrite2(@JsonProperty(SRC_ID) long srcId, @JsonProperty(DST_ID) long dstId, - @JsonProperty(CURRENT_TIME) Date currentTime, - @JsonProperty(AMT) long amt, + @JsonProperty(TIME) Date time, + @JsonProperty(AMOUNT) long amount, @JsonProperty(THRESHOLD) long threshold, @JsonProperty(START_TIME) Date startTime, @JsonProperty(END_TIME) Date endTime) { this.srcId = srcId; this.dstId = dstId; - this.currentTime = currentTime; - this.amt = amt; + this.time = time; + this.amount = amount; this.threshold = threshold; this.startTime = startTime; this.endTime = endTime; @@ -60,12 +60,12 @@ public long getDstId() { return dstId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } - public long getAmt() { - return amt; + public long getAmount() { + return amount; } public long getThreshold() { @@ -90,8 +90,8 @@ public Map parameterMap() { return ImmutableMap.builder() .put(SRC_ID, srcId) .put(DST_ID, dstId) - .put(CURRENT_TIME, currentTime) - .put(AMT, amt) + .put(TIME, time) + .put(AMOUNT, amount) .put(THRESHOLD, threshold) .put(START_TIME, startTime) .put(END_TIME, endTime) @@ -114,8 +114,8 @@ public boolean equals(Object o) { ReadWrite2 that = (ReadWrite2) o; return srcId == that.srcId && dstId == that.dstId - && Objects.equals(currentTime, that.currentTime) - && amt == that.amt + && Objects.equals(time, that.time) + && amount == that.amount && threshold == that.threshold && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime); @@ -123,7 +123,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(srcId, dstId, currentTime, amt, threshold, startTime, endTime); + return Objects.hash(srcId, dstId, time, amount, threshold, startTime, endTime); } @Override @@ -133,10 +133,10 @@ public String toString() { + srcId + ", dstId=" + dstId - + ", currentTime=" - + currentTime - + ", amt=" - + amt + + ", time=" + + time + + ", amount=" + + amount + ", threshold=" + threshold + ", startTime=" diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite3.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite3.java index 5d8958da..180cba36 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite3.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/ReadWrite3.java @@ -24,26 +24,26 @@ public class ReadWrite3 extends Operation { public static final int TYPE = 10003; public static final String SRC_ID = "srcId"; public static final String DST_ID = "dstId"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; public static final String THRESHOLD = "threshold"; public static final String START_TIME = "startTime"; public static final String END_TIME = "endTime"; private final long srcId; private final long dstId; - private final Date currentTime; + private final Date time; private final long threshold; private final Date startTime; private final Date endTime; public ReadWrite3(@JsonProperty(SRC_ID) long srcId, @JsonProperty(DST_ID) long dstId, - @JsonProperty(CURRENT_TIME) Date currentTime, + @JsonProperty(TIME) Date time, @JsonProperty(THRESHOLD) long threshold, @JsonProperty(START_TIME) Date startTime, @JsonProperty(END_TIME) Date endTime) { this.srcId = srcId; this.dstId = dstId; - this.currentTime = currentTime; + this.time = time; this.threshold = threshold; this.startTime = startTime; this.endTime = endTime; @@ -57,8 +57,8 @@ public long getDstId() { return dstId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } public long getThreshold() { @@ -83,7 +83,7 @@ public Map parameterMap() { return ImmutableMap.builder() .put(SRC_ID, srcId) .put(DST_ID, dstId) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .put(THRESHOLD, threshold) .put(START_TIME, startTime) .put(END_TIME, endTime) @@ -106,7 +106,7 @@ public boolean equals(Object o) { ReadWrite3 that = (ReadWrite3) o; return srcId == that.srcId && dstId == that.dstId - && Objects.equals(currentTime, that.currentTime) + && Objects.equals(time, that.time) && threshold == that.threshold && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime); @@ -114,7 +114,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(srcId, dstId, currentTime, threshold, startTime, endTime); + return Objects.hash(srcId, dstId, time, threshold, startTime, endTime); } @Override @@ -124,8 +124,8 @@ public String toString() { + srcId + ", dstId=" + dstId - + ", currentTime=" - + currentTime + + ", time=" + + time + ", threshold=" + threshold + ", startTime=" diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead2.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead2.java index a53ecf95..a9b2ca2f 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead2.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead2.java @@ -3,8 +3,9 @@ * Transaction workload simple read query 2: * -- Transfer-ins and transfer-outs -- * Given an account, find the sum and max of fund amount in transfer-ins and transfer-outs between -them in a specific time range between start_time and end_time. Return the sum and max of -amount. +them in a specific time range between startTime and endTime. Return the sum and max of amount. +For edge1 and edge2, return -1 for the max (maxEdge1Amount and maxEdge2Amount) if there is no +transfer. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead3.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead3.java index 733a111a..6f295c02 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead3.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead3.java @@ -3,7 +3,8 @@ * Transaction workload simple read query 3: * -- Many-to-one blocked account monitoring -- * Given an Account, find the ratio of transfer-ins from blocked Accounts in all itstransfer-ins in a specific -time range between start_time and end_time. Return the ratio. +time range between startTime and endTime. Return the ratio. Return -1 if there is no transfer-ins to +the given account. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead4.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead4.java index 067f041e..770ac36c 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead4.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead4.java @@ -2,8 +2,8 @@ /* * Transaction workload simple read query 4: * -- Account transfer-outs over threshold -- - * Given an account(src), find all the transfer-outs(edge) from the src to a dst where the amount -exceeds threshold in a specific time range between start_time and end_time. Return the count of + * Given an account (src), find all the transfer-outs (edge) from the src to a dst where the amount +exceeds threshold in a specific time range between startTime and endTime. Return the count of transfer-outs and the amount sum. */ diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead5.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead5.java index 3370b2ec..a626f9cc 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead5.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead5.java @@ -2,9 +2,9 @@ /* * Transaction workload simple read query 5: * -- Account transfer-ins over threshold -- - * Given an account(dst), find all the transfer-ins(edge) from the src to a dst where the amount exceeds -threshold in a specific time range between start_time and end_time. Return the count of transfer-ins -and the amount sum. + * Given an account (dst), find all the transfer-ins (edge) from the src to a dst where the amount +exceeds threshold in a specific time range between startTime and endTime. Return the count of +transfer-ins and the amount sum. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead6.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead6.java index 09649267..45f2168a 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead6.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead6.java @@ -2,8 +2,8 @@ /* * Transaction workload simple read query 6: * -- Accounts with the same transfer sources of exact account -- - * Given an Account(account), find all the blocked Accounts(dstAccounts) that connect to a common -account(midAccount) with the given Account(account). Return all the accounts’ id. + * Given an Account (account), find all the blocked Accounts (dstAccounts) that connect to a common +account (midAccount) with the given Account (account). Return all the accounts’ id. */ import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead7.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead7.java deleted file mode 100644 index b264986f..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead7.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; -/* - * Transaction workload simple read query 7: - * -- Companies invested by the person -- - * Given a person, find all the Companies that the person invest. - */ - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.collect.ImmutableMap; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import org.ldbcouncil.finbench.driver.Operation; - -public class SimpleRead7 extends Operation> { - public static final int TYPE = 107; - public static final String ID = "id"; - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private final long id; - - public SimpleRead7(@JsonProperty(ID) long id) { - this.id = id; - } - - public long getId() { - return id; - } - - @Override - public int type() { - return TYPE; - } - - @Override - public Map parameterMap() { - return ImmutableMap.builder() - .put(ID, id) - .build(); - } - - @Override - public List deserializeResult(String serializedOperationResult) throws IOException { - return Arrays.asList(OBJECT_MAPPER.readValue(serializedOperationResult, SimpleRead7Result[].class)); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SimpleRead7 that = (SimpleRead7) o; - return id == that.id; - } - - @Override - public int hashCode() { - return Objects.hash(id); - } - - @Override - public String toString() { - return "SimpleRead7{" - + "id=" - + id - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead7Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead7Result.java deleted file mode 100644 index bb3bebce..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead7Result.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; - -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -public class SimpleRead7Result { - public static final String COMP = "comp"; - private final long comp; - - public SimpleRead7Result(@JsonProperty(COMP) long comp) { - this.comp = comp; - } - - public long getComp() { - return comp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SimpleRead7Result that = (SimpleRead7Result) o; - return comp == that.comp; - } - - @Override - public int hashCode() { - return Objects.hash(comp); - } - - @Override - public String toString() { - return "SimpleRead7Result{" - + "comp=" - + comp - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead8.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead8.java deleted file mode 100644 index e7462557..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead8.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; -/* - * Transaction workload simple read query 8: - * -- Company-related information -- - * Given a Company, find all the related nodes. - */ - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.collect.ImmutableMap; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import org.ldbcouncil.finbench.driver.Operation; - -public class SimpleRead8 extends Operation> { - public static final int TYPE = 108; - public static final String ID = "id"; - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private final long id; - - public SimpleRead8(@JsonProperty(ID) long id) { - this.id = id; - } - - public long getId() { - return id; - } - - @Override - public int type() { - return TYPE; - } - - @Override - public Map parameterMap() { - return ImmutableMap.builder() - .put(ID, id) - .build(); - } - - @Override - public List deserializeResult(String serializedOperationResult) throws IOException { - return Arrays.asList(OBJECT_MAPPER.readValue(serializedOperationResult, SimpleRead8Result[].class)); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SimpleRead8 that = (SimpleRead8) o; - return id == that.id; - } - - @Override - public int hashCode() { - return Objects.hash(id); - } - - @Override - public String toString() { - return "SimpleRead8{" - + "id=" - + id - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead8Result.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead8Result.java deleted file mode 100644 index 0237b6fa..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/SimpleRead8Result.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; - -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -public class SimpleRead8Result { - public static final String ACC_ID = "accId"; - public static final String P1_ID = "p1Id"; - public static final String P2_ID = "p2Id"; - public static final String COM_ID = "comId"; - public static final String LOAN_ID = "loanId"; - private final long accId; - private final long p1Id; - private final long p2Id; - private final long comId; - private final long loanId; - - public SimpleRead8Result(@JsonProperty(ACC_ID) long accId, - @JsonProperty(P1_ID) long p1Id, - @JsonProperty(P2_ID) long p2Id, - @JsonProperty(COM_ID) long comId, - @JsonProperty(LOAN_ID) long loanId) { - this.accId = accId; - this.p1Id = p1Id; - this.p2Id = p2Id; - this.comId = comId; - this.loanId = loanId; - } - - public long getAccId() { - return accId; - } - - public long getP1Id() { - return p1Id; - } - - public long getP2Id() { - return p2Id; - } - - public long getComId() { - return comId; - } - - public long getLoanId() { - return loanId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SimpleRead8Result that = (SimpleRead8Result) o; - return accId == that.accId - && p1Id == that.p1Id - && p2Id == that.p2Id - && comId == that.comId - && loanId == that.loanId; - } - - @Override - public int hashCode() { - return Objects.hash(accId, p1Id, p2Id, comId, loanId); - } - - @Override - public String toString() { - return "SimpleRead8Result{" - + "accId=" - + accId - + ", p1Id=" - + p1Id - + ", p2Id=" - + p2Id - + ", comId=" - + comId - + ", loanId=" - + loanId - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write1.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write1.java index 4374b7a1..4ea59758 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write1.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write1.java @@ -18,26 +18,26 @@ public class Write1 extends Operation { public static final String PERSON_ID = "personId"; public static final String PERSON_NAME = "personName"; public static final String ACCOUNT_ID = "accountId"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; public static final String ACCOUNT_BLOCKED = "accountBlocked"; public static final String ACCOUNT_TYPE = "accountType"; private final long personId; private final String personName; private final long accountId; - private final Date currentTime; + private final Date time; private final boolean accountBlocked; private final String accountType; public Write1(@JsonProperty(PERSON_ID) long personId, @JsonProperty(PERSON_NAME) String personName, @JsonProperty(ACCOUNT_ID) long accountId, - @JsonProperty(CURRENT_TIME) Date currentTime, + @JsonProperty(TIME) Date time, @JsonProperty(ACCOUNT_BLOCKED) boolean accountBlocked, @JsonProperty(ACCOUNT_TYPE) String accountType) { this.personId = personId; this.personName = personName; this.accountId = accountId; - this.currentTime = currentTime; + this.time = time; this.accountBlocked = accountBlocked; this.accountType = accountType; } @@ -54,8 +54,8 @@ public long getAccountId() { return accountId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } public boolean getAccountBlocked() { @@ -77,7 +77,7 @@ public Map parameterMap() { .put(PERSON_ID, personId) .put(PERSON_NAME, personName) .put(ACCOUNT_ID, accountId) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .put(ACCOUNT_BLOCKED, accountBlocked) .put(ACCOUNT_TYPE, accountType) .build(); @@ -100,14 +100,14 @@ public boolean equals(Object o) { return personId == that.personId && Objects.equals(personName, that.personName) && accountId == that.accountId - && Objects.equals(currentTime, that.currentTime) + && Objects.equals(time, that.time) && accountBlocked == that.accountBlocked && Objects.equals(accountType, that.accountType); } @Override public int hashCode() { - return Objects.hash(personId, personName, accountId, currentTime, accountBlocked, accountType); + return Objects.hash(personId, personName, accountId, time, accountBlocked, accountType); } @Override @@ -119,8 +119,8 @@ public String toString() { + personName + ", accountId=" + accountId - + ", currentTime=" - + currentTime + + ", time=" + + time + ", accountBlocked=" + accountBlocked + ", accountType=" diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write12.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write12.java index 262dfc6b..50748764 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write12.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write12.java @@ -1,12 +1,13 @@ package org.ldbcouncil.finbench.driver.workloads.transaction.queries; /* * Transaction workload write query 12: - * -- Block a medium of high risk -- - * Set an existed medium’s isBlocked to True. + * -- Add guarantee between persons -- + * Add a guarantee edge from an existed person node to another existed person node. */ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; +import java.util.Date; import java.util.Map; import java.util.Objects; import org.ldbcouncil.finbench.driver.Operation; @@ -14,15 +15,31 @@ public class Write12 extends Operation { public static final int TYPE = 1012; - public static final String MEDIUM_ID = "mediumId"; - private final long mediumId; + public static final String PID1 = "pid1"; + public static final String PID2 = "pid2"; + public static final String TIME = "time"; + private final long pid1; + private final long pid2; + private final Date time; - public Write12(@JsonProperty(MEDIUM_ID) long mediumId) { - this.mediumId = mediumId; + public Write12(@JsonProperty(PID1) long pid1, + @JsonProperty(PID2) long pid2, + @JsonProperty(TIME) Date time) { + this.pid1 = pid1; + this.pid2 = pid2; + this.time = time; } - public long getMediumId() { - return mediumId; + public long getPid1() { + return pid1; + } + + public long getPid2() { + return pid2; + } + + public Date getTime() { + return time; } @Override @@ -33,7 +50,9 @@ public int type() { @Override public Map parameterMap() { return ImmutableMap.builder() - .put(MEDIUM_ID, mediumId) + .put(PID1, pid1) + .put(PID2, pid2) + .put(TIME, time) .build(); } @@ -51,19 +70,25 @@ public boolean equals(Object o) { return false; } Write12 that = (Write12) o; - return mediumId == that.mediumId; + return pid1 == that.pid1 + && pid2 == that.pid2 + && Objects.equals(time, that.time); } @Override public int hashCode() { - return Objects.hash(mediumId); + return Objects.hash(pid1, pid2, time); } @Override public String toString() { return "Write12{" - + "mediumId=" - + mediumId + + "pid1=" + + pid1 + + ", pid2=" + + pid2 + + ", time=" + + time + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write13.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write13.java index 71562634..1761a5a6 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write13.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write13.java @@ -1,13 +1,13 @@ package org.ldbcouncil.finbench.driver.workloads.transaction.queries; /* * Transaction workload write query 13: - * -- Add guarantee between persons -- - * Add a guarantee edge from an existed person node to another existed person node. + * -- Remove an account -- + * Given an id, remove the account, and remove the related edges including own, transfer, withdraw, +repay, deposit, signIn. Remove the connected Loan vertex in cascade. */ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; -import java.util.Date; import java.util.Map; import java.util.Objects; import org.ldbcouncil.finbench.driver.Operation; @@ -15,31 +15,15 @@ public class Write13 extends Operation { public static final int TYPE = 1013; - public static final String PID1 = "pid1"; - public static final String PID2 = "pid2"; - public static final String CURRENT_TIME = "currentTime"; - private final long pid1; - private final long pid2; - private final Date currentTime; + public static final String ID = "id"; + private final long id; - public Write13(@JsonProperty(PID1) long pid1, - @JsonProperty(PID2) long pid2, - @JsonProperty(CURRENT_TIME) Date currentTime) { - this.pid1 = pid1; - this.pid2 = pid2; - this.currentTime = currentTime; + public Write13(@JsonProperty(ID) long id) { + this.id = id; } - public long getPid1() { - return pid1; - } - - public long getPid2() { - return pid2; - } - - public Date getCurrentTime() { - return currentTime; + public long getId() { + return id; } @Override @@ -50,9 +34,7 @@ public int type() { @Override public Map parameterMap() { return ImmutableMap.builder() - .put(PID1, pid1) - .put(PID2, pid2) - .put(CURRENT_TIME, currentTime) + .put(ID, id) .build(); } @@ -70,25 +52,19 @@ public boolean equals(Object o) { return false; } Write13 that = (Write13) o; - return pid1 == that.pid1 - && pid2 == that.pid2 - && Objects.equals(currentTime, that.currentTime); + return id == that.id; } @Override public int hashCode() { - return Objects.hash(pid1, pid2, currentTime); + return Objects.hash(id); } @Override public String toString() { return "Write13{" - + "pid1=" - + pid1 - + ", pid2=" - + pid2 - + ", currentTime=" - + currentTime + + "id=" + + id + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write14.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write14.java deleted file mode 100644 index 54d05217..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write14.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; -/* - * Transaction workload write query 14: - * -- Remove an account -- - * Given an id, remove the account, and remove the related edges including own, transfer, withdraw, -repay, deposit, signIn. Remove the connected Loan vertex in cascade. - */ - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.collect.ImmutableMap; -import java.util.Map; -import java.util.Objects; -import org.ldbcouncil.finbench.driver.Operation; -import org.ldbcouncil.finbench.driver.workloads.transaction.LdbcNoResult; - -public class Write14 extends Operation { - public static final int TYPE = 1014; - public static final String ID = "id"; - private final long id; - - public Write14(@JsonProperty(ID) long id) { - this.id = id; - } - - public long getId() { - return id; - } - - @Override - public int type() { - return TYPE; - } - - @Override - public Map parameterMap() { - return ImmutableMap.builder() - .put(ID, id) - .build(); - } - - @Override - public LdbcNoResult deserializeResult(String serializedResults) { - return LdbcNoResult.INSTANCE; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Write14 that = (Write14) o; - return id == that.id; - } - - @Override - public int hashCode() { - return Objects.hash(id); - } - - @Override - public String toString() { - return "Write14{" - + "id=" - + id - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write15.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write15.java deleted file mode 100644 index 912a7ce6..00000000 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write15.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.ldbcouncil.finbench.driver.workloads.transaction.queries; -/* - * Transaction workload write query 15: - * -- Remove a loan -- - * Given an id, remove a loan, and remove the repay, deposit and apply edges. - */ - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.collect.ImmutableMap; -import java.util.Map; -import java.util.Objects; -import org.ldbcouncil.finbench.driver.Operation; -import org.ldbcouncil.finbench.driver.workloads.transaction.LdbcNoResult; - -public class Write15 extends Operation { - public static final int TYPE = 1015; - public static final String ID = "id"; - private final long id; - - public Write15(@JsonProperty(ID) long id) { - this.id = id; - } - - public long getId() { - return id; - } - - @Override - public int type() { - return TYPE; - } - - @Override - public Map parameterMap() { - return ImmutableMap.builder() - .put(ID, id) - .build(); - } - - @Override - public LdbcNoResult deserializeResult(String serializedResults) { - return LdbcNoResult.INSTANCE; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Write15 that = (Write15) o; - return id == that.id; - } - - @Override - public int hashCode() { - return Objects.hash(id); - } - - @Override - public String toString() { - return "Write15{" - + "id=" - + id - + '}'; - } -} - diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write2.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write2.java index 51b9f2e2..45b1ccf3 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write2.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write2.java @@ -18,26 +18,26 @@ public class Write2 extends Operation { public static final String COMPANY_ID = "companyId"; public static final String COMPANY_NAME = "companyName"; public static final String ACCOUNT_ID = "accountId"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; public static final String ACCOUNT_BLOCKED = "accountBlocked"; public static final String ACCOUNT_TYPE = "accountType"; private final long companyId; private final String companyName; private final long accountId; - private final Date currentTime; + private final Date time; private final boolean accountBlocked; private final String accountType; public Write2(@JsonProperty(COMPANY_ID) long companyId, @JsonProperty(COMPANY_NAME) String companyName, @JsonProperty(ACCOUNT_ID) long accountId, - @JsonProperty(CURRENT_TIME) Date currentTime, + @JsonProperty(TIME) Date time, @JsonProperty(ACCOUNT_BLOCKED) boolean accountBlocked, @JsonProperty(ACCOUNT_TYPE) String accountType) { this.companyId = companyId; this.companyName = companyName; this.accountId = accountId; - this.currentTime = currentTime; + this.time = time; this.accountBlocked = accountBlocked; this.accountType = accountType; } @@ -54,8 +54,8 @@ public long getAccountId() { return accountId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } public boolean getAccountBlocked() { @@ -77,7 +77,7 @@ public Map parameterMap() { .put(COMPANY_ID, companyId) .put(COMPANY_NAME, companyName) .put(ACCOUNT_ID, accountId) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .put(ACCOUNT_BLOCKED, accountBlocked) .put(ACCOUNT_TYPE, accountType) .build(); @@ -100,14 +100,14 @@ public boolean equals(Object o) { return companyId == that.companyId && Objects.equals(companyName, that.companyName) && accountId == that.accountId - && Objects.equals(currentTime, that.currentTime) + && Objects.equals(time, that.time) && accountBlocked == that.accountBlocked && Objects.equals(accountType, that.accountType); } @Override public int hashCode() { - return Objects.hash(companyId, companyName, accountId, currentTime, accountBlocked, accountType); + return Objects.hash(companyId, companyName, accountId, time, accountBlocked, accountType); } @Override @@ -119,8 +119,8 @@ public String toString() { + companyName + ", accountId=" + accountId - + ", currentTime=" - + currentTime + + ", time=" + + time + ", accountBlocked=" + accountBlocked + ", accountType=" diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write3.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write3.java index 9c3bb254..843657db 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write3.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write3.java @@ -17,20 +17,20 @@ public class Write3 extends Operation { public static final int TYPE = 1003; public static final String SRC_ID = "srcId"; public static final String DST_ID = "dstId"; - public static final String TIMESTAMP = "timestamp"; + public static final String TIME = "time"; public static final String AMOUNT = "amount"; private final long srcId; private final long dstId; - private final Date timestamp; + private final Date time; private final long amount; public Write3(@JsonProperty(SRC_ID) long srcId, @JsonProperty(DST_ID) long dstId, - @JsonProperty(TIMESTAMP) Date timestamp, + @JsonProperty(TIME) Date time, @JsonProperty(AMOUNT) long amount) { this.srcId = srcId; this.dstId = dstId; - this.timestamp = timestamp; + this.time = time; this.amount = amount; } @@ -42,8 +42,8 @@ public long getDstId() { return dstId; } - public Date getTimestamp() { - return timestamp; + public Date getTime() { + return time; } public long getAmount() { @@ -60,7 +60,7 @@ public Map parameterMap() { return ImmutableMap.builder() .put(SRC_ID, srcId) .put(DST_ID, dstId) - .put(TIMESTAMP, timestamp) + .put(TIME, time) .put(AMOUNT, amount) .build(); } @@ -81,13 +81,13 @@ public boolean equals(Object o) { Write3 that = (Write3) o; return srcId == that.srcId && dstId == that.dstId - && Objects.equals(timestamp, that.timestamp) + && Objects.equals(time, that.time) && amount == that.amount; } @Override public int hashCode() { - return Objects.hash(srcId, dstId, timestamp, amount); + return Objects.hash(srcId, dstId, time, amount); } @Override @@ -97,8 +97,8 @@ public String toString() { + srcId + ", dstId=" + dstId - + ", timestamp=" - + timestamp + + ", time=" + + time + ", amount=" + amount + '}'; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write4.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write4.java index a53ff4d3..e4885aec 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write4.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write4.java @@ -18,20 +18,20 @@ public class Write4 extends Operation { public static final int TYPE = 1004; public static final String SRC_ID = "srcId"; public static final String DST_ID = "dstId"; - public static final String TIMESTAMP = "timestamp"; + public static final String TIME = "time"; public static final String AMOUNT = "amount"; private final long srcId; private final long dstId; - private final Date timestamp; + private final Date time; private final long amount; public Write4(@JsonProperty(SRC_ID) long srcId, @JsonProperty(DST_ID) long dstId, - @JsonProperty(TIMESTAMP) Date timestamp, + @JsonProperty(TIME) Date time, @JsonProperty(AMOUNT) long amount) { this.srcId = srcId; this.dstId = dstId; - this.timestamp = timestamp; + this.time = time; this.amount = amount; } @@ -43,8 +43,8 @@ public long getDstId() { return dstId; } - public Date getTimestamp() { - return timestamp; + public Date getTime() { + return time; } public long getAmount() { @@ -61,7 +61,7 @@ public Map parameterMap() { return ImmutableMap.builder() .put(SRC_ID, srcId) .put(DST_ID, dstId) - .put(TIMESTAMP, timestamp) + .put(TIME, time) .put(AMOUNT, amount) .build(); } @@ -82,13 +82,13 @@ public boolean equals(Object o) { Write4 that = (Write4) o; return srcId == that.srcId && dstId == that.dstId - && Objects.equals(timestamp, that.timestamp) + && Objects.equals(time, that.time) && amount == that.amount; } @Override public int hashCode() { - return Objects.hash(srcId, dstId, timestamp, amount); + return Objects.hash(srcId, dstId, time, amount); } @Override @@ -98,8 +98,8 @@ public String toString() { + srcId + ", dstId=" + dstId - + ", timestamp=" - + timestamp + + ", time=" + + time + ", amount=" + amount + '}'; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write5.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write5.java index deb9baad..db2da08a 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write5.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write5.java @@ -16,38 +16,38 @@ public class Write5 extends Operation { public static final int TYPE = 1005; public static final String PERSON_ID = "personId"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; public static final String LOAN_ID = "loanId"; - public static final String LOAN_AMOUNT = "loanAmount"; + public static final String AMOUNT = "amount"; private final long personId; - private final Date currentTime; + private final Date time; private final long loanId; - private final long loanAmount; + private final long amount; public Write5(@JsonProperty(PERSON_ID) long personId, - @JsonProperty(CURRENT_TIME) Date currentTime, + @JsonProperty(TIME) Date time, @JsonProperty(LOAN_ID) long loanId, - @JsonProperty(LOAN_AMOUNT) long loanAmount) { + @JsonProperty(AMOUNT) long amount) { this.personId = personId; - this.currentTime = currentTime; + this.time = time; this.loanId = loanId; - this.loanAmount = loanAmount; + this.amount = amount; } public long getPersonId() { return personId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } public long getLoanId() { return loanId; } - public long getLoanAmount() { - return loanAmount; + public long getAmount() { + return amount; } @Override @@ -59,9 +59,9 @@ public int type() { public Map parameterMap() { return ImmutableMap.builder() .put(PERSON_ID, personId) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .put(LOAN_ID, loanId) - .put(LOAN_AMOUNT, loanAmount) + .put(AMOUNT, amount) .build(); } @@ -80,14 +80,14 @@ public boolean equals(Object o) { } Write5 that = (Write5) o; return personId == that.personId - && Objects.equals(currentTime, that.currentTime) + && Objects.equals(time, that.time) && loanId == that.loanId - && loanAmount == that.loanAmount; + && amount == that.amount; } @Override public int hashCode() { - return Objects.hash(personId, currentTime, loanId, loanAmount); + return Objects.hash(personId, time, loanId, amount); } @Override @@ -95,12 +95,12 @@ public String toString() { return "Write5{" + "personId=" + personId - + ", currentTime=" - + currentTime + + ", time=" + + time + ", loanId=" + loanId - + ", loanAmount=" - + loanAmount + + ", amount=" + + amount + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write6.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write6.java index 21ba66f9..0da4fa3d 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write6.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write6.java @@ -16,38 +16,38 @@ public class Write6 extends Operation { public static final int TYPE = 1006; public static final String COMPANY_ID = "companyId"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; public static final String LOAN_ID = "loanId"; - public static final String LOAN_AMOUNT = "loanAmount"; + public static final String AMOUNT = "amount"; private final long companyId; - private final Date currentTime; + private final Date time; private final long loanId; - private final long loanAmount; + private final long amount; public Write6(@JsonProperty(COMPANY_ID) long companyId, - @JsonProperty(CURRENT_TIME) Date currentTime, + @JsonProperty(TIME) Date time, @JsonProperty(LOAN_ID) long loanId, - @JsonProperty(LOAN_AMOUNT) long loanAmount) { + @JsonProperty(AMOUNT) long amount) { this.companyId = companyId; - this.currentTime = currentTime; + this.time = time; this.loanId = loanId; - this.loanAmount = loanAmount; + this.amount = amount; } public long getCompanyId() { return companyId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } public long getLoanId() { return loanId; } - public long getLoanAmount() { - return loanAmount; + public long getAmount() { + return amount; } @Override @@ -59,9 +59,9 @@ public int type() { public Map parameterMap() { return ImmutableMap.builder() .put(COMPANY_ID, companyId) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .put(LOAN_ID, loanId) - .put(LOAN_AMOUNT, loanAmount) + .put(AMOUNT, amount) .build(); } @@ -80,14 +80,14 @@ public boolean equals(Object o) { } Write6 that = (Write6) o; return companyId == that.companyId - && Objects.equals(currentTime, that.currentTime) + && Objects.equals(time, that.time) && loanId == that.loanId - && loanAmount == that.loanAmount; + && amount == that.amount; } @Override public int hashCode() { - return Objects.hash(companyId, currentTime, loanId, loanAmount); + return Objects.hash(companyId, time, loanId, amount); } @Override @@ -95,12 +95,12 @@ public String toString() { return "Write6{" + "companyId=" + companyId - + ", currentTime=" - + currentTime + + ", time=" + + time + ", loanId=" + loanId - + ", loanAmount=" - + loanAmount + + ", amount=" + + amount + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write7.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write7.java index 873a9e46..cd0d6e49 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write7.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write7.java @@ -18,20 +18,20 @@ public class Write7 extends Operation { public static final String ACCOUNT_ID = "accountId"; public static final String MEDIUM_ID = "mediumId"; public static final String MEDIUM_BLOCKED = "mediumBlocked"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; private final long accountId; private final long mediumId; private final boolean mediumBlocked; - private final Date currentTime; + private final Date time; public Write7(@JsonProperty(ACCOUNT_ID) long accountId, @JsonProperty(MEDIUM_ID) long mediumId, @JsonProperty(MEDIUM_BLOCKED) boolean mediumBlocked, - @JsonProperty(CURRENT_TIME) Date currentTime) { + @JsonProperty(TIME) Date time) { this.accountId = accountId; this.mediumId = mediumId; this.mediumBlocked = mediumBlocked; - this.currentTime = currentTime; + this.time = time; } public long getAccountId() { @@ -46,8 +46,8 @@ public boolean getMediumBlocked() { return mediumBlocked; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } @Override @@ -61,7 +61,7 @@ public Map parameterMap() { .put(ACCOUNT_ID, accountId) .put(MEDIUM_ID, mediumId) .put(MEDIUM_BLOCKED, mediumBlocked) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .build(); } @@ -82,12 +82,12 @@ public boolean equals(Object o) { return accountId == that.accountId && mediumId == that.mediumId && mediumBlocked == that.mediumBlocked - && Objects.equals(currentTime, that.currentTime); + && Objects.equals(time, that.time); } @Override public int hashCode() { - return Objects.hash(accountId, mediumId, mediumBlocked, currentTime); + return Objects.hash(accountId, mediumId, mediumBlocked, time); } @Override @@ -99,8 +99,8 @@ public String toString() { + mediumId + ", mediumBlocked=" + mediumBlocked - + ", currentTime=" - + currentTime + + ", time=" + + time + '}'; } } diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write8.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write8.java index 80aca209..368a3ba6 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write8.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write8.java @@ -18,20 +18,20 @@ public class Write8 extends Operation { public static final int TYPE = 1008; public static final String ACCOUNT_ID = "accountId"; public static final String LOAN_ID = "loanId"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; public static final String AMOUNT = "amount"; private final long accountId; private final long loanId; - private final Date currentTime; + private final Date time; private final long amount; public Write8(@JsonProperty(ACCOUNT_ID) long accountId, @JsonProperty(LOAN_ID) long loanId, - @JsonProperty(CURRENT_TIME) Date currentTime, + @JsonProperty(TIME) Date time, @JsonProperty(AMOUNT) long amount) { this.accountId = accountId; this.loanId = loanId; - this.currentTime = currentTime; + this.time = time; this.amount = amount; } @@ -43,8 +43,8 @@ public long getLoanId() { return loanId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } public long getAmount() { @@ -61,7 +61,7 @@ public Map parameterMap() { return ImmutableMap.builder() .put(ACCOUNT_ID, accountId) .put(LOAN_ID, loanId) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .put(AMOUNT, amount) .build(); } @@ -82,13 +82,13 @@ public boolean equals(Object o) { Write8 that = (Write8) o; return accountId == that.accountId && loanId == that.loanId - && Objects.equals(currentTime, that.currentTime) + && Objects.equals(time, that.time) && amount == that.amount; } @Override public int hashCode() { - return Objects.hash(accountId, loanId, currentTime, amount); + return Objects.hash(accountId, loanId, time, amount); } @Override @@ -98,8 +98,8 @@ public String toString() { + accountId + ", loanId=" + loanId - + ", currentTime=" - + currentTime + + ", time=" + + time + ", amount=" + amount + '}'; diff --git a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write9.java b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write9.java index 1b3cce39..47e52ddb 100644 --- a/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write9.java +++ b/src/main/java/org/ldbcouncil/finbench/driver/workloads/transaction/queries/Write9.java @@ -17,20 +17,20 @@ public class Write9 extends Operation { public static final int TYPE = 1009; public static final String ACCOUNT_ID = "accountId"; public static final String LOAN_ID = "loanId"; - public static final String CURRENT_TIME = "currentTime"; + public static final String TIME = "time"; public static final String AMOUNT = "amount"; private final long accountId; private final long loanId; - private final Date currentTime; + private final Date time; private final long amount; public Write9(@JsonProperty(ACCOUNT_ID) long accountId, @JsonProperty(LOAN_ID) long loanId, - @JsonProperty(CURRENT_TIME) Date currentTime, + @JsonProperty(TIME) Date time, @JsonProperty(AMOUNT) long amount) { this.accountId = accountId; this.loanId = loanId; - this.currentTime = currentTime; + this.time = time; this.amount = amount; } @@ -42,8 +42,8 @@ public long getLoanId() { return loanId; } - public Date getCurrentTime() { - return currentTime; + public Date getTime() { + return time; } public long getAmount() { @@ -60,7 +60,7 @@ public Map parameterMap() { return ImmutableMap.builder() .put(ACCOUNT_ID, accountId) .put(LOAN_ID, loanId) - .put(CURRENT_TIME, currentTime) + .put(TIME, time) .put(AMOUNT, amount) .build(); } @@ -81,13 +81,13 @@ public boolean equals(Object o) { Write9 that = (Write9) o; return accountId == that.accountId && loanId == that.loanId - && Objects.equals(currentTime, that.currentTime) + && Objects.equals(time, that.time) && amount == that.amount; } @Override public int hashCode() { - return Objects.hash(accountId, loanId, currentTime, amount); + return Objects.hash(accountId, loanId, time, amount); } @Override @@ -97,8 +97,8 @@ public String toString() { + accountId + ", loanId=" + loanId - + ", currentTime=" - + currentTime + + ", time=" + + time + ", amount=" + amount + '}'; diff --git a/src/main/java/org/ldbcouncil/finbench/impls/dummy/DummyDb.java b/src/main/java/org/ldbcouncil/finbench/impls/dummy/DummyDb.java index 32fa7035..4703ab3b 100644 --- a/src/main/java/org/ldbcouncil/finbench/impls/dummy/DummyDb.java +++ b/src/main/java/org/ldbcouncil/finbench/impls/dummy/DummyDb.java @@ -18,7 +18,6 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead12; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead13; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead1Result; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.ComplexRead3; @@ -38,15 +37,11 @@ import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead4; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead5; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead6; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead7; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.SimpleRead8; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write1; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write10; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write11; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write12; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write13; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write14; -import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write15; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write2; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write3; import org.ldbcouncil.finbench.driver.workloads.transaction.queries.Write4; @@ -76,7 +71,6 @@ protected void onInit(Map map, LoggingService loggingService) th registerOperationHandler(ComplexRead10.class, ComplexRead10Handler.class); registerOperationHandler(ComplexRead11.class, ComplexRead11Handler.class); registerOperationHandler(ComplexRead12.class, ComplexRead12Handler.class); - registerOperationHandler(ComplexRead13.class, ComplexRead13Handler.class); // simple reads registerOperationHandler(SimpleRead1.class, SimpleRead1Handler.class); @@ -85,8 +79,6 @@ protected void onInit(Map map, LoggingService loggingService) th registerOperationHandler(SimpleRead4.class, SimpleRead4Handler.class); registerOperationHandler(SimpleRead5.class, SimpleRead5Handler.class); registerOperationHandler(SimpleRead6.class, SimpleRead6Handler.class); - registerOperationHandler(SimpleRead7.class, SimpleRead7Handler.class); - registerOperationHandler(SimpleRead8.class, SimpleRead8Handler.class); // writes registerOperationHandler(Write1.class, Write1Handler.class); @@ -102,8 +94,6 @@ protected void onInit(Map map, LoggingService loggingService) th registerOperationHandler(Write11.class, Write11Handler.class); registerOperationHandler(Write12.class, Write12Handler.class); registerOperationHandler(Write13.class, Write13Handler.class); - registerOperationHandler(Write14.class, Write14Handler.class); - registerOperationHandler(Write15.class, Write15Handler.class); // read-writes registerOperationHandler(ReadWrite1.class, ReadWrite1Handler.class); @@ -240,14 +230,6 @@ public void executeOperation(ComplexRead12 cr12, DummyDbConnectionState dummyDbC } } - public static class ComplexRead13Handler implements OperationHandler { - @Override - public void executeOperation(ComplexRead13 cr13, DummyDbConnectionState dummyDbConnectionState, - ResultReporter resultReporter) throws DbException { - DummyDb.logger.info(cr13.toString()); - } - } - public static class SimpleRead1Handler implements OperationHandler { @Override public void executeOperation(SimpleRead1 sr1, DummyDbConnectionState dummyDbConnectionState, @@ -304,24 +286,6 @@ public void executeOperation(SimpleRead6 sr6, DummyDbConnectionState dummyDbConn } } - public static class SimpleRead7Handler implements OperationHandler { - @Override - public void executeOperation(SimpleRead7 sr7, DummyDbConnectionState dummyDbConnectionState, - ResultReporter resultReporter) throws DbException { - DummyDb.logger.info(sr7.toString()); - resultReporter.report(0, Collections.EMPTY_LIST, sr7); - } - } - - public static class SimpleRead8Handler implements OperationHandler { - @Override - public void executeOperation(SimpleRead8 sr8, DummyDbConnectionState dummyDbConnectionState, - ResultReporter resultReporter) throws DbException { - DummyDb.logger.info(sr8.toString()); - resultReporter.report(0, Collections.EMPTY_LIST, sr8); - } - } - public static class Write1Handler implements OperationHandler { @Override public void executeOperation(Write1 w1, DummyDbConnectionState dummyDbConnectionState, @@ -426,22 +390,6 @@ public void executeOperation(Write13 w13, DummyDbConnectionState dummyDbConnecti } } - public static class Write14Handler implements OperationHandler { - @Override - public void executeOperation(Write14 w14, DummyDbConnectionState dummyDbConnectionState, - ResultReporter resultReporter) throws DbException { - DummyDb.logger.info(w14.toString()); - } - } - - public static class Write15Handler implements OperationHandler { - @Override - public void executeOperation(Write15 w15, DummyDbConnectionState dummyDbConnectionState, - ResultReporter resultReporter) throws DbException { - DummyDb.logger.info(w15.toString()); - } - } - public static class ReadWrite1Handler implements OperationHandler { @Override public void executeOperation(ReadWrite1 rw1, DummyDbConnectionState dummyDbConnectionState, diff --git a/src/test/java/org/ldbcouncil/finbench/driver/workloads/transaction/TransactionUpdateEventStreamReaderTest.java b/src/test/java/org/ldbcouncil/finbench/driver/workloads/transaction/TransactionUpdateEventStreamReaderTest.java index d1c32866..b7a1aea8 100644 --- a/src/test/java/org/ldbcouncil/finbench/driver/workloads/transaction/TransactionUpdateEventStreamReaderTest.java +++ b/src/test/java/org/ldbcouncil/finbench/driver/workloads/transaction/TransactionUpdateEventStreamReaderTest.java @@ -93,7 +93,7 @@ public void shouldParseAllWrite1Events() throws WorkloadException, SQLException assertThat(operation.getPersonId(), is(1L)); assertThat(operation.getPersonName(), is("A")); assertThat(operation.getAccountId(), is(1001L)); - assertThat(operation.getCurrentTime().getTime(), + assertThat(operation.getTime().getTime(), equalTo(Timestamp.valueOf("2012-07-29 08:52:02.735").getTime())); assertThat(operation.getAccountBlocked(), is(true)); assertThat(operation.getAccountType(), is("AA")); @@ -102,7 +102,7 @@ public void shouldParseAllWrite1Events() throws WorkloadException, SQLException assertThat(operation.getPersonId(), is(2L)); assertThat(operation.getPersonName(), is("B")); assertThat(operation.getAccountId(), is(1002L)); - assertThat(operation.getCurrentTime().getTime(), + assertThat(operation.getTime().getTime(), equalTo(Timestamp.valueOf("2012-07-29 08:52:02.735").getTime())); assertThat(operation.getAccountBlocked(), is(true)); assertThat(operation.getAccountType(), is("BB")); @@ -111,7 +111,7 @@ public void shouldParseAllWrite1Events() throws WorkloadException, SQLException assertThat(operation.getPersonId(), is(3L)); assertThat(operation.getPersonName(), is("C")); assertThat(operation.getAccountId(), is(1003L)); - assertThat(operation.getCurrentTime().getTime(), + assertThat(operation.getTime().getTime(), equalTo(Timestamp.valueOf("2012-07-29 08:52:02.735").getTime())); assertThat(operation.getAccountBlocked(), is(false)); assertThat(operation.getAccountType(), is("CC")); @@ -120,7 +120,7 @@ public void shouldParseAllWrite1Events() throws WorkloadException, SQLException assertThat(operation.getPersonId(), is(4L)); assertThat(operation.getPersonName(), is("D")); assertThat(operation.getAccountId(), is(1004L)); - assertThat(operation.getCurrentTime().getTime(), + assertThat(operation.getTime().getTime(), equalTo(Timestamp.valueOf("2012-07-29 08:52:02.735").getTime())); assertThat(operation.getAccountBlocked(), is(false)); assertThat(operation.getAccountType(), is("DD"));