From e188f27f5741c9d2a37db8c727a1cd2c9a713d1c Mon Sep 17 00:00:00 2001 From: Yan Levin Date: Thu, 20 Aug 2026 17:59:35 -0500 Subject: [PATCH 1/2] Removed unsafes and keep reflection-only field access --- README.md | 2 +- estore/pom.xml | 2 +- estore/scripts/gen_usecase_data.py | 5 +- estore/src/main/java/org/estore/Estore.java | 38 +- .../main/java/org/estore/EstoreOptions.java | 11 - estore/src/main/java/org/estore/Main.java | 4 +- .../org/estore/planner/util/ClassInfo.java | 9 +- .../planner/util/ClassInfoUnsafeImpl.java | 269 -------- .../org/estore/AggregateFunctionTest.java | 2 +- .../org/estore/AnonymousRelationTest.java | 2 +- .../test/java/org/estore/ArithmeticTest.java | 2 +- .../java/org/estore/CaseExpressionTest.java | 2 +- .../java/org/estore/CountDistinctTest.java | 2 +- .../java/org/estore/CreateInstanceTest.java | 2 +- .../DbMetadataTest/EstoreMetadataTest.java | 92 ++- .../estore/DbMetadataTest/H2MetadataTest.java | 4 +- .../org/estore/MultiDimensionalArrayTest.java | 31 +- .../src/test/java/org/estore/MyFirstTest.java | 2 +- .../test/java/org/estore/SimpleQueryTest.java | 2 +- .../org/estore/ToIntegerFunctionTest.java | 2 +- .../java/org/estore/TypeFunctionTest.java | 2 +- .../java/org/estore/compiler/CodeGenTest.java | 2 +- .../java/org/estore/compiler/UtilTest.java | 2 +- .../apachecommons/DualHashBidiMapTest.java | 2 +- .../apachecommons/GrowthListTest.java | 2 +- .../apachecommons/PatriciaTrieTest.java | 2 +- .../eclipse/FastListTest.java | 2 +- .../eclipse/HashBagTest.java | 2 +- .../eclipse/HashBiMapTest.java | 2 +- .../fastutil/FastutilTest.java | 2 +- .../guava/HashBiMapTest.java | 2 +- .../guava/LinkedListMultimapTest.java | 4 +- .../guava/MinMaxPriorityQueueTest.java | 4 +- .../datastructuretests/jcf/ArrayListTest.java | 2 +- .../datastructuretests/jcf/HashSetTest.java | 2 +- .../eval/datastructure/EclipseTest.java | 2 +- .../estore/eval/datastructure/GuavaTest.java | 2 +- .../estore/eval/datastructure/JCFTest.java | 2 +- .../estore/eval/ldbc/finbench/Fin001Test.java | 2 +- .../org/estore/eval/ldbc/snb/Snb01Test.java | 2 +- .../relational/EqualsRelationExprTest.java | 4 +- .../planner/filter/WhereBooleanLogicTest.java | 4 +- .../InGraphReflectionTestArrayStack100.java | 2 +- .../InGraphReflectionTestArrayStack1000.java | 2 +- .../InGraphReflectionTestArrayStack10000.java | 2 +- ...InGraphReflectionTestArrayStack100000.java | 2 +- .../InGraphReflectionTestFastList100.java | 2 +- .../InGraphReflectionTestFastList1000.java | 2 +- .../InGraphReflectionTestFastList10000.java | 2 +- .../InGraphReflectionTestFastList100000.java | 2 +- ...phReflectionTestImmutableArrayList100.java | 2 +- ...hReflectionTestImmutableArrayList1000.java | 2 +- ...ReflectionTestImmutableArrayList10000.java | 2 +- ...eflectionTestImmutableArrayList100000.java | 2 +- .../InGraphReflectionTestUnifiedMap100.java | 2 +- .../InGraphReflectionTestUnifiedMap1000.java | 2 +- .../InGraphReflectionTestUnifiedMap10000.java | 2 +- ...InGraphReflectionTestUnifiedMap100000.java | 2 +- .../InGraphReflectionTestUnifiedSet100.java | 2 +- .../InGraphReflectionTestUnifiedSet1000.java | 2 +- .../InGraphReflectionTestUnifiedSet10000.java | 2 +- ...InGraphReflectionTestUnifiedSet100000.java | 2 +- .../InGraphUnsafeTestArrayStack100.java | 49 -- .../InGraphUnsafeTestArrayStack1000.java | 49 -- .../InGraphUnsafeTestArrayStack10000.java | 49 -- .../InGraphUnsafeTestArrayStack100000.java | 49 -- .../eclipse/InGraphUnsafeTestFastList100.java | 43 -- .../InGraphUnsafeTestFastList1000.java | 43 -- .../InGraphUnsafeTestFastList10000.java | 43 -- .../InGraphUnsafeTestFastList100000.java | 43 -- ...nGraphUnsafeTestImmutableArrayList100.java | 48 -- ...GraphUnsafeTestImmutableArrayList1000.java | 48 -- ...raphUnsafeTestImmutableArrayList10000.java | 48 -- ...aphUnsafeTestImmutableArrayList100000.java | 48 -- .../InGraphUnsafeTestUnifiedMap100.java | 48 -- .../InGraphUnsafeTestUnifiedMap1000.java | 48 -- .../InGraphUnsafeTestUnifiedMap10000.java | 48 -- .../InGraphUnsafeTestUnifiedMap100000.java | 48 -- .../InGraphUnsafeTestUnifiedSet100.java | 46 -- .../InGraphUnsafeTestUnifiedSet1000.java | 46 -- .../InGraphUnsafeTestUnifiedSet10000.java | 46 -- .../InGraphUnsafeTestUnifiedSet100000.java | 46 -- .../InGraphReflectionTestArrayTable100.java | 2 +- .../InGraphReflectionTestArrayTable1000.java | 2 +- .../InGraphReflectionTestArrayTable10000.java | 2 +- ...InGraphReflectionTestArrayTable100000.java | 2 +- .../InGraphReflectionTestHashMultiset100.java | 2 +- .../guava/InGraphUnsafeTestArrayTable100.java | 52 -- .../InGraphUnsafeTestArrayTable1000.java | 52 -- .../InGraphUnsafeTestArrayTable10000.java | 52 -- .../InGraphUnsafeTestArrayTable100000.java | 52 -- .../InGraphReflectionTestArrayDeque100.java | 2 +- .../InGraphReflectionTestArrayDeque1000.java | 2 +- .../InGraphReflectionTestArrayDeque10000.java | 2 +- ...InGraphReflectionTestArrayDeque100000.java | 2 +- .../InGraphReflectionTestArrayList100.java | 2 +- .../InGraphReflectionTestArrayList1000.java | 2 +- .../InGraphReflectionTestArrayList10000.java | 2 +- .../InGraphReflectionTestArrayList100000.java | 2 +- ...InGraphReflectionTestArrayList1000000.java | 2 +- .../jcf/InGraphReflectionTestHashMap100.java | 2 +- .../jcf/InGraphReflectionTestHashMap1000.java | 2 +- .../InGraphReflectionTestHashMap10000.java | 2 +- .../InGraphReflectionTestHashMap100000.java | 2 +- .../InGraphReflectionTestLinkedList100.java | 2 +- .../InGraphReflectionTestLinkedList1000.java | 2 +- .../InGraphReflectionTestLinkedList10000.java | 2 +- ...InGraphReflectionTestLinkedList100000.java | 2 +- .../jcf/InGraphReflectionTestVector100.java | 2 +- .../jcf/InGraphReflectionTestVector1000.java | 2 +- .../jcf/InGraphReflectionTestVector10000.java | 2 +- .../InGraphReflectionTestVector100000.java | 2 +- .../jcf/InGraphUnsafeTestArrayDeque100.java | 39 -- .../jcf/InGraphUnsafeTestArrayDeque1000.java | 39 -- .../jcf/InGraphUnsafeTestArrayDeque10000.java | 39 -- .../InGraphUnsafeTestArrayDeque100000.java | 39 -- .../jcf/InGraphUnsafeTestArrayList100.java | 43 -- .../jcf/InGraphUnsafeTestArrayList1000.java | 42 -- .../jcf/InGraphUnsafeTestArrayList10000.java | 39 -- .../jcf/InGraphUnsafeTestArrayList100000.java | 39 -- .../jcf/InGraphUnsafeTestHashMap100.java | 40 -- .../jcf/InGraphUnsafeTestHashMap1000.java | 40 -- .../jcf/InGraphUnsafeTestHashMap10000.java | 40 -- .../jcf/InGraphUnsafeTestHashMap100000.java | 40 -- .../jcf/InGraphUnsafeTestLinkedList100.java | 39 -- .../jcf/InGraphUnsafeTestLinkedList1000.java | 41 -- .../jcf/InGraphUnsafeTestLinkedList10000.java | 41 -- .../InGraphUnsafeTestLinkedList100000.java | 41 -- .../jcf/InGraphUnsafeTestVector100.java | 39 -- .../jcf/InGraphUnsafeTestVector1000.java | 39 -- .../jcf/InGraphUnsafeTestVector10000.java | 39 -- .../jcf/InGraphUnsafeTestVector100000.java | 39 -- .../finbench/InGraphReflectionTest001.java | 2 +- .../finbench/InGraphReflectionTest01.java | 2 +- .../finbench/InGraphReflectionTest03.java | 2 +- .../finbench/InGraphReflectionTest10.java | 2 +- .../ldbc/finbench/InGraphReflectionTest3.java | 2 +- .../ldbc/finbench/InGraphUnsafeTest001.java | 432 ------------- .../ldbc/finbench/InGraphUnsafeTest01.java | 436 ------------- .../ldbc/finbench/InGraphUnsafeTest03.java | 431 ------------- .../ldbc/finbench/InGraphUnsafeTest10.java | 431 ------------- .../ldbc/finbench/InGraphUnsafeTest3.java | 431 ------------- .../ldbc/snb/InGraphReflectionTest01.java | 2 +- .../ldbc/snb/InGraphReflectionTest03.java | 2 +- .../ldbc/snb/InGraphReflectionTest1.java | 2 +- .../ldbc/snb/InGraphReflectionTest10.java | 2 +- .../ldbc/snb/InGraphReflectionTest3.java | 2 +- .../estore/ldbc/snb/InGraphUnsafeTest01.java | 585 ----------------- .../estore/ldbc/snb/InGraphUnsafeTest03.java | 595 ------------------ .../estore/ldbc/snb/InGraphUnsafeTest1.java | 595 ------------------ .../estore/ldbc/snb/InGraphUnsafeTest10.java | 594 ----------------- .../estore/ldbc/snb/InGraphUnsafeTest3.java | 594 ----------------- .../h2/InGraphReflectionMetaDataTest.java | 2 +- .../h2/InGraphUnsafeMetaDataTest.java | 112 ---- ...e-arraystack-100-ingraph-unsafe.dockerfile | 32 - ...-arraystack-1000-ingraph-unsafe.dockerfile | 32 - ...arraystack-10000-ingraph-unsafe.dockerfile | 32 - ...rraystack-100000-ingraph-unsafe.dockerfile | 32 - ...pse-fastlist-100-ingraph-unsafe.dockerfile | 32 - ...se-fastlist-1000-ingraph-unsafe.dockerfile | 32 - ...e-fastlist-10000-ingraph-unsafe.dockerfile | 32 - ...-fastlist-100000-ingraph-unsafe.dockerfile | 32 - ...blearraylist-100-ingraph-unsafe.dockerfile | 32 - ...learraylist-1000-ingraph-unsafe.dockerfile | 32 - ...earraylist-10000-ingraph-unsafe.dockerfile | 32 - ...arraylist-100000-ingraph-unsafe.dockerfile | 32 - ...e-unifiedmap-100-ingraph-unsafe.dockerfile | 32 - ...-unifiedmap-1000-ingraph-unsafe.dockerfile | 32 - ...unifiedmap-10000-ingraph-unsafe.dockerfile | 32 - ...nifiedmap-100000-ingraph-unsafe.dockerfile | 32 - ...e-unifiedset-100-ingraph-unsafe.dockerfile | 32 - ...-unifiedset-1000-ingraph-unsafe.dockerfile | 32 - ...unifiedset-10000-ingraph-unsafe.dockerfile | 32 - ...nifiedset-100000-ingraph-unsafe.dockerfile | 32 - ...a-arraytable-100-ingraph-unsafe.dockerfile | 32 - ...-arraytable-1000-ingraph-unsafe.dockerfile | 32 - ...arraytable-10000-ingraph-unsafe.dockerfile | 32 - ...rraytable-100000-ingraph-unsafe.dockerfile | 32 - .../h2metadata-ingraph-unsafe.dockerfile | 32 - ...f-arraydeque-100-ingraph-unsafe.dockerfile | 32 - ...-arraydeque-1000-ingraph-unsafe.dockerfile | 32 - ...arraydeque-10000-ingraph-unsafe.dockerfile | 32 - ...rraydeque-100000-ingraph-unsafe.dockerfile | 32 - ...cf-arraylist-100-ingraph-unsafe.dockerfile | 32 - ...f-arraylist-1000-ingraph-unsafe.dockerfile | 32 - ...-arraylist-10000-ingraph-unsafe.dockerfile | 32 - ...arraylist-100000-ingraph-unsafe.dockerfile | 32 - .../jcf-hashmap-100-ingraph-unsafe.dockerfile | 32 - ...jcf-hashmap-1000-ingraph-unsafe.dockerfile | 32 - ...cf-hashmap-10000-ingraph-unsafe.dockerfile | 32 - ...f-hashmap-100000-ingraph-unsafe.dockerfile | 32 - ...f-linkedlist-100-ingraph-unsafe.dockerfile | 32 - ...-linkedlist-1000-ingraph-unsafe.dockerfile | 32 - ...linkedlist-10000-ingraph-unsafe.dockerfile | 32 - ...inkedlist-100000-ingraph-unsafe.dockerfile | 32 - .../jcf-vector-100-ingraph-unsafe.dockerfile | 32 - .../jcf-vector-1000-ingraph-unsafe.dockerfile | 32 - ...jcf-vector-10000-ingraph-unsafe.dockerfile | 32 - ...cf-vector-100000-ingraph-unsafe.dockerfile | 32 - ...bc-finbench-0.01-ingraph-unsafe.dockerfile | 39 -- ...dbc-finbench-0.1-ingraph-unsafe.dockerfile | 37 -- ...dbc-finbench-0.3-ingraph-unsafe.dockerfile | 37 -- ...ldbc-finbench-10-ingraph-unsafe.dockerfile | 37 -- .../ldbc-finbench-3-ingraph-unsafe.dockerfile | 37 -- .../ldbc-snb-0.1-ingraph-unsafe.dockerfile | 39 -- .../ldbc-snb-0.3-ingraph-unsafe.dockerfile | 39 -- .../ldbc-snb-1-ingraph-unsafe.dockerfile | 39 -- .../ldbc-snb-10-ingraph-unsafe.dockerfile | 39 -- .../ldbc-snb-3-ingraph-unsafe.dockerfile | 39 -- eval/test.py | 8 +- s | 5 +- 211 files changed, 158 insertions(+), 9505 deletions(-) delete mode 100644 estore/src/main/java/org/estore/planner/util/ClassInfoUnsafeImpl.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack1000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack10000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList1000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList10000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList1000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList10000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap1000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap10000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet1000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet10000.java delete mode 100644 eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100000.java delete mode 100644 eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100.java delete mode 100644 eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable1000.java delete mode 100644 eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable10000.java delete mode 100644 eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque1000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque10000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList1000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList10000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap1000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap10000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList1000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList10000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector1000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector10000.java delete mode 100644 eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100000.java delete mode 100644 eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest001.java delete mode 100644 eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest01.java delete mode 100644 eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest03.java delete mode 100644 eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest10.java delete mode 100644 eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest3.java delete mode 100644 eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest01.java delete mode 100644 eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest03.java delete mode 100644 eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest1.java delete mode 100644 eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest10.java delete mode 100644 eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest3.java delete mode 100644 eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphUnsafeMetaDataTest.java delete mode 100644 eval/images/eclipse-arraystack-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-arraystack-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-arraystack-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-arraystack-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-fastlist-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-fastlist-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-fastlist-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-fastlist-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-immutablearraylist-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-immutablearraylist-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-immutablearraylist-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-immutablearraylist-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedmap-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedmap-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedmap-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedmap-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedset-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedset-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedset-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/eclipse-unifiedset-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/guava-arraytable-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/guava-arraytable-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/guava-arraytable-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/guava-arraytable-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/h2metadata-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraydeque-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraydeque-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraydeque-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraydeque-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraylist-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraylist-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraylist-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-arraylist-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-hashmap-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-hashmap-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-hashmap-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-hashmap-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-linkedlist-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-linkedlist-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-linkedlist-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-linkedlist-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-vector-100-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-vector-1000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-vector-10000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/jcf-vector-100000-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-finbench-0.01-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-finbench-0.1-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-finbench-0.3-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-finbench-10-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-finbench-3-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-snb-0.1-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-snb-0.3-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-snb-1-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-snb-10-ingraph-unsafe.dockerfile delete mode 100644 eval/images/ldbc-snb-3-ingraph-unsafe.dockerfile diff --git a/README.md b/README.md index df3afef..da39618 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ programs. Person bob = new Person("Bob", 30, charlie); Person alice = new Person("Alice", 28, bob); - Estore db = new Estore("exampleDb", new EstoreOptions().useUnsafe(false)); + Estore db = new Estore("exampleDb"); db.captureAll(alice); // MATCH finds Person objects; RETURN puts them in column p diff --git a/estore/pom.xml b/estore/pom.xml index 85dbb79..f47ffa3 100644 --- a/estore/pom.xml +++ b/estore/pom.xml @@ -211,7 +211,7 @@ [9,) - --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.sql=ALL-UNNAMED --add-opens jdk.unsupported/sun.misc=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.sql=ALL-UNNAMED diff --git a/estore/scripts/gen_usecase_data.py b/estore/scripts/gen_usecase_data.py index d148744..d3ba88f 100644 --- a/estore/scripts/gen_usecase_data.py +++ b/estore/scripts/gen_usecase_data.py @@ -28,7 +28,6 @@ def generate_json(data_type): queries = ["getCatalogs", "getSchemas", "getTables"] implementations = { "egraph-reflection": "\\ToolReflection", - "egraph-unsafe": "\\ToolUnsafe", "jdbc": "\\JDBC" } test_class = "H2MetadataTest" @@ -36,7 +35,6 @@ def generate_json(data_type): queries = ["dbName", "options", "dynamicClass"] implementations = { "egraph-reflection": "\\ToolReflection", - "egraph-unsafe": "\\ToolUnsafe", } test_class = "EstoreMetadataTest" @@ -61,10 +59,9 @@ def generate_json(data_type): } } else: - use_unsafe = "true" if impl == "egraph-unsafe" else "false" queryName = query[0].upper() + query[1:] if data_type == 'egraph' else query[3:] suffix = "ESTORE" if data_type == 'h2' else "" - command = f"mvn test -Dtest={test_class}#test{queryName}{suffix}Repeat -DuseUnsafe={use_unsafe} -Dprofile=true" + command = f"mvn test -Dtest={test_class}#test{queryName}{suffix}Repeat -Dprofile=true" # print(command) metrics = ["Parse Tree Generation Time", "Query Plan AST Building Time", "Query Execution Time", "Total Query Time"] metric_data = {metric: [] for metric in metrics} diff --git a/estore/src/main/java/org/estore/Estore.java b/estore/src/main/java/org/estore/Estore.java index b1f07b8..8fc7a3d 100644 --- a/estore/src/main/java/org/estore/Estore.java +++ b/estore/src/main/java/org/estore/Estore.java @@ -20,7 +20,6 @@ import org.estore.planner.LogicalPlanBuilder; import org.estore.planner.util.ClassInfo; import org.estore.planner.util.Table; -import sun.misc.Unsafe; public class Estore implements Serializable { private String name; @@ -34,7 +33,6 @@ public class Estore implements Serializable { */ private HashMap runtimeClassInfoMap; - private Unsafe unsafe; private EstoreOptions options; private int id; private ArrayList dynamicClasses; @@ -70,18 +68,12 @@ public Estore(String name) throws Exception { public Estore(String name, EstoreOptions options) throws Exception { this.name = name; this.options = options; - this.unsafe = null; this.id = 0; datastore = new HashMap(); labelObjectMap = new LabelMap(); labelClassInfoMap = new HashMap(); runtimeClassInfoMap = new HashMap(); dynamicClasses = new ArrayList(); - if (options.getUseUnsafe()) { - Field f = Unsafe.class.getDeclaredField("theUnsafe"); - f.setAccessible(true); - unsafe = (Unsafe) f.get(null); - } } public void addDynamicClass(Class klass) { @@ -121,7 +113,7 @@ public void insert(Object obj) throws EstoreException { } datastore.put(objHashCode, obj); if (labelObjectMap.get(className) == null) { - cInfo = labelObjectMap.putNew(objClass, new ArrayList(), options, unsafe); + cInfo = labelObjectMap.putNew(objClass, new ArrayList()); labelClassInfoMap.put(className, cInfo); } labelObjectMap.get(className).add(obj); @@ -178,15 +170,14 @@ public void captureAllBfs(Object obj) throws EstoreException { if (current instanceof Class) { if (labelClassInfoMap.get(Class.class.getName()) == null) { ClassInfo classCInfo = - labelObjectMap.putNew( - Class.class, new ArrayList<>(), options, unsafe); + labelObjectMap.putNew(Class.class, new ArrayList<>()); labelClassInfoMap.put(Class.class.getName(), classCInfo); } cInfo = labelClassInfoMap.get(Class.class.getName()); labelObjectMap.put(className, labelList); labelClassInfoMap.put(className, cInfo); /* for query execution by label */ } else { - cInfo = labelObjectMap.putNew(objClass, labelList, options, unsafe); + cInfo = labelObjectMap.putNew(objClass, labelList); labelClassInfoMap.put(className, cInfo); } } else { @@ -274,15 +265,14 @@ public void captureAllDfs(Object obj) throws EstoreException { if (current instanceof Class) { if (labelClassInfoMap.get(Class.class.getName()) == null) { ClassInfo classCInfo = - labelObjectMap.putNew( - Class.class, new ArrayList<>(), options, unsafe); + labelObjectMap.putNew(Class.class, new ArrayList<>()); labelClassInfoMap.put(Class.class.getName(), classCInfo); } cInfo = labelClassInfoMap.get(Class.class.getName()); labelObjectMap.put(className, labelList); labelClassInfoMap.put(className, cInfo); } else { - cInfo = labelObjectMap.putNew(objClass, labelList, options, unsafe); + cInfo = labelObjectMap.putNew(objClass, labelList); labelClassInfoMap.put(className, cInfo); } } else { @@ -367,14 +357,14 @@ public void captureAllDfsRec(Object obj) throws EstoreException { if (obj instanceof Class) { if (labelClassInfoMap.get(Class.class.getName()) == null) { ClassInfo classCInfo = - labelObjectMap.putNew(Class.class, new ArrayList<>(), options, unsafe); + labelObjectMap.putNew(Class.class, new ArrayList<>()); labelClassInfoMap.put(Class.class.getName(), classCInfo); } cInfo = labelClassInfoMap.get(Class.class.getName()); labelObjectMap.put(className, labelList); labelClassInfoMap.put(className, cInfo); } else { - cInfo = labelObjectMap.putNew(objClass, labelList, options, unsafe); + cInfo = labelObjectMap.putNew(objClass, labelList); labelClassInfoMap.put(className, cInfo); } } else { @@ -458,14 +448,14 @@ public void captureAll(Object obj, int maxDepth, int currDepth) throws EstoreExc if (obj instanceof Class) { if (labelClassInfoMap.get(Class.class.getName()) == null) { ClassInfo classCInfo = - labelObjectMap.putNew(Class.class, new ArrayList<>(), options, unsafe); + labelObjectMap.putNew(Class.class, new ArrayList<>()); labelClassInfoMap.put(Class.class.getName(), classCInfo); } cInfo = labelClassInfoMap.get(Class.class.getName()); labelObjectMap.put(className, labelList); labelClassInfoMap.put(className, cInfo); } else { - cInfo = labelObjectMap.putNew(objClass, labelList, options, unsafe); + cInfo = labelObjectMap.putNew(objClass, labelList); labelClassInfoMap.put(className, cInfo); } } else { @@ -555,7 +545,7 @@ private ClassInfo getOrCreateClassInfo(Class clazz) { String key = clazz.getName(); ClassInfo cInfo = runtimeClassInfoMap.get(key); if (cInfo != null) return cInfo; - cInfo = ClassInfo.getClassInfo(options.getUseUnsafe(), unsafe, clazz); + cInfo = ClassInfo.getClassInfo(clazz); try { for (Field f : getDeclaredFieldsIncludingSuper(clazz)) { try { @@ -694,12 +684,8 @@ public String getString(Object obj, String fieldName) throws EstoreException { } public static class LabelMap extends HashMap> { - public ClassInfo putNew( - Class classInstance, - ArrayList value, - EstoreOptions options, - Unsafe unsafe) { - ClassInfo cInfo = ClassInfo.getClassInfo(options.getUseUnsafe(), unsafe, classInstance); + public ClassInfo putNew(Class classInstance, ArrayList value) { + ClassInfo cInfo = ClassInfo.getClassInfo(classInstance); if (classInstance.isArray()) { super.put(classInstance.getName(), value); return cInfo; diff --git a/estore/src/main/java/org/estore/EstoreOptions.java b/estore/src/main/java/org/estore/EstoreOptions.java index 0b4213a..845fe14 100644 --- a/estore/src/main/java/org/estore/EstoreOptions.java +++ b/estore/src/main/java/org/estore/EstoreOptions.java @@ -1,7 +1,6 @@ package org.estore; public class EstoreOptions { - private boolean useUnsafe; private boolean useDfs; private boolean useRecursion; private boolean profileParseTreeGenTime; @@ -10,7 +9,6 @@ public class EstoreOptions { private boolean profileTotalQueryTime; public EstoreOptions() { - useUnsafe = true; useDfs = false; useRecursion = false; profileParseTreeGenTime = false; @@ -23,11 +21,6 @@ public static EstoreOptions getDefaultOptions() { return new EstoreOptions(); } - public EstoreOptions useUnsafe(boolean flag) { - useUnsafe = flag; - return this; - } - public EstoreOptions useDfs(boolean flag) { useDfs = flag; return this; @@ -66,10 +59,6 @@ public EstoreOptions profileTotalQueryTime(boolean flag) { return this; } - public boolean getUseUnsafe() { - return useUnsafe; - } - public boolean getUseDfs() { return useDfs; } diff --git a/estore/src/main/java/org/estore/Main.java b/estore/src/main/java/org/estore/Main.java index cb3991a..767ae06 100644 --- a/estore/src/main/java/org/estore/Main.java +++ b/estore/src/main/java/org/estore/Main.java @@ -10,11 +10,9 @@ public class Main { public static void main(String[] args) { boolean exit = false; int port = 1234; - boolean unsafeFlag = false; if (args.length > 0) { try { port = Integer.parseInt(args[0]); - unsafeFlag = Boolean.parseBoolean(args[1]); } catch (Exception e) { System.err.println("Invalid argument"); System.exit(1); @@ -22,7 +20,7 @@ public static void main(String[] args) { } try (ServerSocket serverSocket = new ServerSocket(port)) { - Estore estore = new Estore("testDb", new EstoreOptions().useUnsafe(unsafeFlag)); + Estore estore = new Estore("testDb"); while (!exit) { try (Socket clientSocket = serverSocket.accept(); BufferedReader in = diff --git a/estore/src/main/java/org/estore/planner/util/ClassInfo.java b/estore/src/main/java/org/estore/planner/util/ClassInfo.java index 7eae885..eaee9f9 100644 --- a/estore/src/main/java/org/estore/planner/util/ClassInfo.java +++ b/estore/src/main/java/org/estore/planner/util/ClassInfo.java @@ -4,7 +4,6 @@ import java.util.HashMap; import java.util.List; import java.util.Set; -import sun.misc.Unsafe; public abstract class ClassInfo { protected HashMap referenceFieldTypeMap; @@ -14,15 +13,11 @@ public abstract class ClassInfo { protected HashMap primitiveFieldTypeMap; public Class classInstance; - public static ClassInfo getClassInfo(boolean useUnsafe, Unsafe unsafe, Class classInstance) { + public static ClassInfo getClassInfo(Class classInstance) { if (classInstance.isArray()) { return new ArrayClassInfoReflectionImpl(classInstance); } - if (useUnsafe) { - return new ClassInfoUnsafeImpl(unsafe, classInstance); - } else { - return new ClassInfoReflectionImpl(classInstance); - } + return new ClassInfoReflectionImpl(classInstance); } public abstract void addPrimitiveField(Field field); diff --git a/estore/src/main/java/org/estore/planner/util/ClassInfoUnsafeImpl.java b/estore/src/main/java/org/estore/planner/util/ClassInfoUnsafeImpl.java deleted file mode 100644 index 5d9cb97..0000000 --- a/estore/src/main/java/org/estore/planner/util/ClassInfoUnsafeImpl.java +++ /dev/null @@ -1,269 +0,0 @@ -package org.estore.planner.util; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import sun.misc.Unsafe; - -public class ClassInfoUnsafeImpl extends ClassInfo { - protected Unsafe unsafe; - protected HashMap primitiveFieldMap = new HashMap(); - protected HashMap referenceFieldMap = new HashMap(); - protected Set staticFields; - - public ClassInfoUnsafeImpl(Unsafe unsafe, Class classInstance) { - primitiveFieldMap = new HashMap(); - referenceFieldMap = new HashMap(); - referenceFieldTypeMap = new HashMap(); - primitiveFieldTypeMap = new HashMap(); - staticFields = new HashSet(); - this.classInstance = classInstance; - this.unsafe = unsafe; - } - - @Override - public void addPrimitiveField(Field field) { - String fieldName = field.getName(); - if (Modifier.isStatic(field.getModifiers())) { - staticFields.add(fieldName); - primitiveFieldMap.put(fieldName, unsafe.staticFieldOffset(field)); - } else { - primitiveFieldMap.put(fieldName, unsafe.objectFieldOffset(field)); - } - primitiveFieldTypeMap.put(fieldName, field.getType().getName()); - } - - @Override - public void addReferenceField(Field field) { - String fieldName = field.getName(); - if (Modifier.isStatic(field.getModifiers())) { - staticFields.add(fieldName); - referenceFieldMap.put(fieldName, unsafe.staticFieldOffset(field)); - } else { - referenceFieldMap.put(fieldName, unsafe.objectFieldOffset(field)); - } - if (field.getType().isArray()) { - referenceFieldTypeMap.put(fieldName, field.getType().getComponentType().getName()); - } else { - referenceFieldTypeMap.put(fieldName, field.getType().getName()); - } - } - - @Override - public Object getPrimitiveField(String fieldName, String fieldType, Object instance) { - String classFieldType = primitiveFieldTypeMap.get(fieldName); - if (classFieldType == null) { - return null; - } - long fieldOffset; - - /* Note: classFieldType is guaranteed to exist since field names and types are - * checked with an instance's Class instance before this method is invoked - * on an instance to get its value. The null check is avoided for speedup - */ - try { - switch (classFieldType) { - case "byte": - if (fieldType != null && !TypeUtils.isDecimalType(fieldType)) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getByte(instance, fieldOffset); - case "short": - if (fieldType != null && !TypeUtils.isDecimalType(fieldType)) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getShort(instance, fieldOffset); - case "int": - if (fieldType != null && !TypeUtils.isDecimalType(fieldType)) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getInt(instance, fieldOffset); - case "long": - if (fieldType != null && !TypeUtils.isDecimalType(fieldType)) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getLong(instance, fieldOffset); - case "float": - if (fieldType != null && !TypeUtils.isFloatingType(fieldType)) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getFloat(instance, fieldOffset); - case "double": - if (fieldType != null && !TypeUtils.isFloatingType(fieldType)) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getDouble(instance, fieldOffset); - case "boolean": - if (fieldType != null && !fieldType.equals("boolean")) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getBoolean(instance, fieldOffset); - case "char": - if (fieldType != null && !fieldType.equals("char")) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getChar(instance, fieldOffset); - case "java.lang.String": - if (fieldType != null && !fieldType.equals("java.lang.String")) { - return null; - } - fieldOffset = primitiveFieldMap.get(fieldName); - return unsafe.getObject(instance, fieldOffset); - default: - return null; - } - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - @Override - public List getReferenceField(String fieldName, Object instance) { - long fieldOffset = referenceFieldMap.get(fieldName); - if (fieldOffset < 0) { - return null; - } - try { - Object obj = null; - List elements = new ArrayList(); - if (staticFields.contains(fieldName)) { - obj = unsafe.getObject(instance.getClass(), fieldOffset); - } else { - obj = unsafe.getObject(instance, fieldOffset); - } - if (obj == null) { - return elements; - } - Class objClass = obj.getClass(); - if (objClass.isArray()) { - if (obj instanceof byte[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(byte[].class); - int arrayIndexScale = unsafe.arrayIndexScale(byte[].class); - int length = ((byte[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getByte(obj, offset)); - } - } else if (obj instanceof short[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(short[].class); - int arrayIndexScale = unsafe.arrayIndexScale(short[].class); - int length = ((short[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getShort(obj, offset)); - } - } else if (obj instanceof int[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(int[].class); - int arrayIndexScale = unsafe.arrayIndexScale(int[].class); - int length = ((int[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getInt(obj, offset)); - } - } else if (obj instanceof long[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(long[].class); - int arrayIndexScale = unsafe.arrayIndexScale(long[].class); - int length = ((long[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getLong(obj, offset)); - } - } else if (obj instanceof float[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(float[].class); - int arrayIndexScale = unsafe.arrayIndexScale(float[].class); - int length = ((float[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getFloat(obj, offset)); - } - } else if (obj instanceof double[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(double[].class); - int arrayIndexScale = unsafe.arrayIndexScale(double[].class); - int length = ((double[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getDouble(obj, offset)); - } - } else if (obj instanceof boolean[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(boolean[].class); - int arrayIndexScale = unsafe.arrayIndexScale(boolean[].class); - int length = ((boolean[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getBoolean(obj, offset)); - } - } else if (obj instanceof char[]) { - int arrayBaseOffset = unsafe.arrayBaseOffset(char[].class); - int arrayIndexScale = unsafe.arrayIndexScale(char[].class); - int length = ((char[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getChar(obj, offset)); - } - } else { - int arrayBaseOffset = unsafe.arrayBaseOffset(Object[].class); - int arrayIndexScale = unsafe.arrayIndexScale(Object[].class); - int length = ((Object[]) obj).length; - - for (int j = 0; j < length; j++) { - int offset = arrayBaseOffset + arrayIndexScale * j; - elements.add(unsafe.getObject(obj, offset)); - } - } - return elements; - } else { - elements.add(obj); - return elements; - } - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - @Override - public boolean containsPrimitiveFieldWithName(String fieldName) { - return primitiveFieldMap.get(fieldName) != null; - } - - @Override - public boolean containsReferenceFieldWithName(String fieldName, Object instance) { - return referenceFieldMap.get(fieldName) != null; - } - - @Override - public Set getReferenceFieldNames(Object instance) { - return referenceFieldMap.keySet(); - } - - @Override - public Set getPrimitiveFieldNames() { - return primitiveFieldMap.keySet(); - } - - @Override - public int getReferenceFieldCount() { - return referenceFieldMap.size(); - } -} diff --git a/estore/src/test/java/org/estore/AggregateFunctionTest.java b/estore/src/test/java/org/estore/AggregateFunctionTest.java index 0a83a28..c6574a7 100644 --- a/estore/src/test/java/org/estore/AggregateFunctionTest.java +++ b/estore/src/test/java/org/estore/AggregateFunctionTest.java @@ -12,7 +12,7 @@ public class AggregateFunctionTest { @BeforeEach void setUp() throws Exception { - db = new Estore(AggregateFunctionTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(AggregateFunctionTest.class.getName()); Person c = new Person("C", 30); Person b = new Person("B", 40, c); Person a = new Person("A", 20, b); diff --git a/estore/src/test/java/org/estore/AnonymousRelationTest.java b/estore/src/test/java/org/estore/AnonymousRelationTest.java index 30ce756..8873a99 100644 --- a/estore/src/test/java/org/estore/AnonymousRelationTest.java +++ b/estore/src/test/java/org/estore/AnonymousRelationTest.java @@ -12,7 +12,7 @@ public class AnonymousRelationTest { @BeforeEach void setUp() throws Exception { - db = new Estore(AnonymousRelationTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(AnonymousRelationTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/ArithmeticTest.java b/estore/src/test/java/org/estore/ArithmeticTest.java index 9c61ee3..af511cd 100644 --- a/estore/src/test/java/org/estore/ArithmeticTest.java +++ b/estore/src/test/java/org/estore/ArithmeticTest.java @@ -11,7 +11,7 @@ public class ArithmeticTest { @BeforeEach void setUp() throws Exception { - db = new Estore(ArithmeticTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(ArithmeticTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/CaseExpressionTest.java b/estore/src/test/java/org/estore/CaseExpressionTest.java index fa84d0c..3b36faf 100644 --- a/estore/src/test/java/org/estore/CaseExpressionTest.java +++ b/estore/src/test/java/org/estore/CaseExpressionTest.java @@ -12,7 +12,7 @@ public class CaseExpressionTest { @BeforeEach void setUp() throws Exception { - db = new Estore(CaseExpressionTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(CaseExpressionTest.class.getName()); db.captureAll(new Person("A", 20)); } diff --git a/estore/src/test/java/org/estore/CountDistinctTest.java b/estore/src/test/java/org/estore/CountDistinctTest.java index fbf2a49..370f09d 100644 --- a/estore/src/test/java/org/estore/CountDistinctTest.java +++ b/estore/src/test/java/org/estore/CountDistinctTest.java @@ -12,7 +12,7 @@ public class CountDistinctTest { @BeforeEach void setUp() throws Exception { - db = new Estore(CountDistinctTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(CountDistinctTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/CreateInstanceTest.java b/estore/src/test/java/org/estore/CreateInstanceTest.java index d0a39f1..9bb93d5 100644 --- a/estore/src/test/java/org/estore/CreateInstanceTest.java +++ b/estore/src/test/java/org/estore/CreateInstanceTest.java @@ -31,7 +31,7 @@ public void initDatabase() { estore = new Estore( CreateInstanceTest.class.getName(), - new EstoreOptions().useUnsafe(true).useDfs(false)); + new EstoreOptions().useDfs(false)); } catch (Exception e) { e.printStackTrace(); } diff --git a/estore/src/test/java/org/estore/DbMetadataTest/EstoreMetadataTest.java b/estore/src/test/java/org/estore/DbMetadataTest/EstoreMetadataTest.java index 1361da0..aee5ca9 100644 --- a/estore/src/test/java/org/estore/DbMetadataTest/EstoreMetadataTest.java +++ b/estore/src/test/java/org/estore/DbMetadataTest/EstoreMetadataTest.java @@ -9,23 +9,21 @@ import org.junit.jupiter.api.Test; public class EstoreMetadataTest { - private Estore estore1, estore2, estore_u1, estore_u2, estore_u3, estore_r1, estore_r2; + private Estore estore1, estore2, estore_d1, estore_d2, estore_d3, estore_b1, estore_b2; @BeforeEach public void setup() throws Exception { - String unsafeOpt = System.getProperty("useUnsafe"); - Boolean unsafeFlag = (unsafeOpt != null) && (unsafeOpt.equals("true")); String profileOpt = System.getProperty("profile"); Boolean profileFlag = (profileOpt != null) && (profileOpt.equals("true")); estore1 = new Estore( EstoreMetadataTest.class.getName(), - new EstoreOptions().useUnsafe(unsafeFlag).profile(profileFlag)); + new EstoreOptions().profile(profileFlag)); estore2 = new Estore( EstoreMetadataTest.class.getName() + "2", - new EstoreOptions().useUnsafe(unsafeFlag).profile(false)); + new EstoreOptions().profile(false)); } @Test @@ -47,69 +45,69 @@ public void testDbNameRepeat() throws Exception { @Test public void testOptions() throws Exception { - estore_u1 = + estore_d1 = new Estore( - EstoreMetadataTest.class.getName() + "Unsafe1", - new EstoreOptions().useUnsafe(true)); - estore_u2 = + EstoreMetadataTest.class.getName() + "Dfs1", + new EstoreOptions().useDfs(true)); + estore_d2 = new Estore( - EstoreMetadataTest.class.getName() + "Unsafe2", - new EstoreOptions().useUnsafe(true)); - estore_u3 = + EstoreMetadataTest.class.getName() + "Dfs2", + new EstoreOptions().useDfs(true)); + estore_d3 = new Estore( - EstoreMetadataTest.class.getName() + "Unsafe3", - new EstoreOptions().useUnsafe(true)); - estore_r1 = + EstoreMetadataTest.class.getName() + "Dfs3", + new EstoreOptions().useDfs(true)); + estore_b1 = new Estore( - EstoreMetadataTest.class.getName() + "Reflection1", - new EstoreOptions().useUnsafe(false)); - estore_r2 = + EstoreMetadataTest.class.getName() + "Bfs1", + new EstoreOptions().useDfs(false)); + estore_b2 = new Estore( - EstoreMetadataTest.class.getName() + "Reflection2", - new EstoreOptions().useUnsafe(false)); - estore1.captureAll(estore_u1); - estore1.captureAll(estore_u2); - estore1.captureAll(estore_u3); - estore1.captureAll(estore_r1); - estore1.captureAll(estore_r2); + EstoreMetadataTest.class.getName() + "Bfs2", + new EstoreOptions().useDfs(false)); + estore1.captureAll(estore_d1); + estore1.captureAll(estore_d2); + estore1.captureAll(estore_d3); + estore1.captureAll(estore_b1); + estore1.captureAll(estore_b2); Table res = estore1.query( - "MATCH (n: `org.estore.Estore`)-[:options]->(m {useUnsafe: true}) RETURN n"); + "MATCH (n: `org.estore.Estore`)-[:options]->(m {useDfs: true}) RETURN n"); assertEquals(3, res.getSize()); } @Test public void testOptionsRepeat() throws Exception { - estore_u1 = + estore_d1 = new Estore( - EstoreMetadataTest.class.getName() + "Unsafe1", - new EstoreOptions().useUnsafe(true)); - estore_u2 = + EstoreMetadataTest.class.getName() + "Dfs1", + new EstoreOptions().useDfs(true)); + estore_d2 = new Estore( - EstoreMetadataTest.class.getName() + "Unsafe2", - new EstoreOptions().useUnsafe(true)); - estore_u3 = + EstoreMetadataTest.class.getName() + "Dfs2", + new EstoreOptions().useDfs(true)); + estore_d3 = new Estore( - EstoreMetadataTest.class.getName() + "Unsafe3", - new EstoreOptions().useUnsafe(true)); - estore_r1 = + EstoreMetadataTest.class.getName() + "Dfs3", + new EstoreOptions().useDfs(true)); + estore_b1 = new Estore( - EstoreMetadataTest.class.getName() + "Reflection1", - new EstoreOptions().useUnsafe(false)); - estore_r2 = + EstoreMetadataTest.class.getName() + "Bfs1", + new EstoreOptions().useDfs(false)); + estore_b2 = new Estore( - EstoreMetadataTest.class.getName() + "Reflection2", - new EstoreOptions().useUnsafe(false)); - estore1.captureAll(estore_u1); - estore1.captureAll(estore_u2); - estore1.captureAll(estore_u3); - estore1.captureAll(estore_r1); - estore1.captureAll(estore_r2); + EstoreMetadataTest.class.getName() + "Bfs2", + new EstoreOptions().useDfs(false)); + estore1.captureAll(estore_d1); + estore1.captureAll(estore_d2); + estore1.captureAll(estore_d3); + estore1.captureAll(estore_b1); + estore1.captureAll(estore_b2); Table res = null; for (int i = 0; i < 5; i++) { res = estore1.query( - "MATCH (n: `org.estore.Estore`)-[:options]->(m {useUnsafe: true}) RETURN n"); + "MATCH (n: `org.estore.Estore`)-[:options]->(m {useDfs: true}) RETURN n"); } assertEquals(3, res.getSize()); } diff --git a/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java b/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java index 27479cb..1607600 100644 --- a/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java +++ b/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java @@ -24,15 +24,13 @@ public class H2MetadataTest { @BeforeEach public void setup() throws Exception { - String unsafeOpt = System.getProperty("useUnsafe"); - Boolean unsafeFlag = (unsafeOpt != null) && (unsafeOpt.equals("true")); String profileOpt = System.getProperty("profile"); Boolean profileFlag = (profileOpt != null) && (profileOpt.equals("true")); estore1 = new Estore( H2MetadataTest.class.getName(), - new EstoreOptions().useUnsafe(unsafeFlag).profile(profileFlag)); + new EstoreOptions().profile(profileFlag)); Class.forName("org.h2.Driver"); h2Conn1 = DriverManager.getConnection("jdbc:h2:mem:h2TestDb1", "sa", ""); } diff --git a/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java b/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java index 3802598..03f8d5c 100644 --- a/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java +++ b/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java @@ -20,9 +20,7 @@ public class MultiDimensionalArrayTest { public void setup() throws Exception { rand = ThreadLocalRandom.current(); db = - new Estore( - MultiDimensionalArrayTest.class.getName(), - new EstoreOptions().useUnsafe(false)); + new Estore(MultiDimensionalArrayTest.class.getName()); } @Test @@ -222,31 +220,4 @@ public void testDeleteArrayIndex() throws Exception { assertEquals(10L, ((Long) Array.get(arr, 0)).longValue()); assertEquals(30L, ((Long) Array.get(arr, 2)).longValue()); } - - @Test - public void testArrayTable_unsafe() throws Exception { - Estore unsafeStore = - new Estore( - MultiDimensionalArrayTest.class.getName() + "Unsafe", - new EstoreOptions().useUnsafe(true)); - Long[][] grid = new Long[10][10]; - long target = rand.nextLong(0, Long.MAX_VALUE); - int ti = 4; - int tj = 6; - for (int i = 0; i < 10; i++) { - for (int j = 0; j < 10; j++) { - grid[i][j] = (i == ti && j == tj) ? target : rand.nextLong(0, Long.MAX_VALUE); - } - } - unsafeStore.captureAll(grid); - - Table result = - unsafeStore.query( - "MATCH (n:`" - + grid.getClass().getName() - + "`)-[]->()-[]->(m {value:" - + target - + "}) RETURN m"); - assertEquals(target, ((Long) result.get("m").get(0)).longValue()); - } } diff --git a/estore/src/test/java/org/estore/MyFirstTest.java b/estore/src/test/java/org/estore/MyFirstTest.java index 8f746b0..7faabb2 100644 --- a/estore/src/test/java/org/estore/MyFirstTest.java +++ b/estore/src/test/java/org/estore/MyFirstTest.java @@ -13,7 +13,7 @@ public class MyFirstTest { @BeforeEach void setup() throws Exception { - db = new Estore(MyFirstTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(MyFirstTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/SimpleQueryTest.java b/estore/src/test/java/org/estore/SimpleQueryTest.java index 7402565..e586964 100644 --- a/estore/src/test/java/org/estore/SimpleQueryTest.java +++ b/estore/src/test/java/org/estore/SimpleQueryTest.java @@ -12,7 +12,7 @@ public class SimpleQueryTest { @BeforeEach void setUp() throws Exception { - db = new Estore(SimpleQueryTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(SimpleQueryTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/ToIntegerFunctionTest.java b/estore/src/test/java/org/estore/ToIntegerFunctionTest.java index d799a17..3f36e55 100644 --- a/estore/src/test/java/org/estore/ToIntegerFunctionTest.java +++ b/estore/src/test/java/org/estore/ToIntegerFunctionTest.java @@ -12,7 +12,7 @@ public class ToIntegerFunctionTest { @BeforeEach void setUp() throws Exception { - db = new Estore(ToIntegerFunctionTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(ToIntegerFunctionTest.class.getName()); db.captureAll(new Person("A", 20)); } diff --git a/estore/src/test/java/org/estore/TypeFunctionTest.java b/estore/src/test/java/org/estore/TypeFunctionTest.java index d4f7251..7801d71 100644 --- a/estore/src/test/java/org/estore/TypeFunctionTest.java +++ b/estore/src/test/java/org/estore/TypeFunctionTest.java @@ -12,7 +12,7 @@ public class TypeFunctionTest { @BeforeEach void setUp() throws Exception { - db = new Estore(TypeFunctionTest.class.getName(), new EstoreOptions().useUnsafe(true)); + db = new Estore(TypeFunctionTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/compiler/CodeGenTest.java b/estore/src/test/java/org/estore/compiler/CodeGenTest.java index a63eccb..b1a30c3 100644 --- a/estore/src/test/java/org/estore/compiler/CodeGenTest.java +++ b/estore/src/test/java/org/estore/compiler/CodeGenTest.java @@ -27,7 +27,7 @@ public void initDatabase() { estore = new Estore( CodeGenTest.class.getName(), - new EstoreOptions().useUnsafe(true).useDfs(false)); + new EstoreOptions().useDfs(false)); } catch (Exception e) { e.printStackTrace(); } diff --git a/estore/src/test/java/org/estore/compiler/UtilTest.java b/estore/src/test/java/org/estore/compiler/UtilTest.java index 96fc11c..6c92afb 100644 --- a/estore/src/test/java/org/estore/compiler/UtilTest.java +++ b/estore/src/test/java/org/estore/compiler/UtilTest.java @@ -24,7 +24,7 @@ public class UtilTest { @BeforeEach void setUp() throws Exception { - estore = new Estore(UtilTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(UtilTest.class.getName()); a = estore.insert(A.class); aInfo = estore.getLabelClassInfoMap().get(A.class.getName()); } diff --git a/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java b/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java index b6ca61e..4b89a01 100644 --- a/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java @@ -19,7 +19,7 @@ public class DualHashBidiMapTest { public void initDatabase() throws Exception { estore = new Estore( - DualHashBidiMapTest.class.getName(), new EstoreOptions().useUnsafe(false)); + DualHashBidiMapTest.class.getName(), new EstoreOptions()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java b/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java index 4b75081..488a5fa 100644 --- a/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java @@ -16,7 +16,7 @@ public class GrowthListTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(GrowthListTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(GrowthListTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java b/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java index 211dadf..9317d96 100644 --- a/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java @@ -17,7 +17,7 @@ public class PatriciaTrieTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(PatriciaTrieTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(PatriciaTrieTest.class.getName()); size = 5; } diff --git a/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java b/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java index eeccff4..d377f8f 100644 --- a/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java @@ -17,7 +17,7 @@ public class FastListTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(FastListTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(FastListTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java index e11e38b..5814826 100644 --- a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java @@ -17,7 +17,7 @@ public class HashBagTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(HashBagTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(HashBagTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java index 5b84218..e9b5c50 100644 --- a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java @@ -17,7 +17,7 @@ public class HashBiMapTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(HashBiMapTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(HashBiMapTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java b/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java index bea549f..3ba35a7 100644 --- a/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java @@ -21,7 +21,7 @@ public class FastutilTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(FastutilTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(FastutilTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java b/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java index 704f5e8..395e808 100644 --- a/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java @@ -17,7 +17,7 @@ public class HashBiMapTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(HashBiMapTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(HashBiMapTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java b/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java index 25eed57..fb05c26 100644 --- a/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java @@ -18,9 +18,7 @@ public class LinkedListMultimapTest { @BeforeEach public void initDatabase() throws Exception { estore = - new Estore( - LinkedListMultimapTest.class.getName(), - new EstoreOptions().useUnsafe(false)); + new Estore(LinkedListMultimapTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java b/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java index 7650906..23f7d1c 100644 --- a/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java @@ -17,9 +17,7 @@ public class MinMaxPriorityQueueTest { @BeforeEach public void initDatabase() throws Exception { estore = - new Estore( - MinMaxPriorityQueueTest.class.getName(), - new EstoreOptions().useUnsafe(false)); + new Estore(MinMaxPriorityQueueTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java b/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java index 906917c..4003185 100644 --- a/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java @@ -17,7 +17,7 @@ public class ArrayListTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(ArrayListTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(ArrayListTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java b/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java index fbae069..3d292dd 100644 --- a/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java @@ -17,7 +17,7 @@ public class HashSetTest { @BeforeEach public void initDatabase() throws Exception { - estore = new Estore(HashSetTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(HashSetTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java b/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java index 1346eda..78e12e1 100644 --- a/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java +++ b/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java @@ -22,7 +22,7 @@ public class EclipseTest { @BeforeEach public void setup() throws Exception { - estore = new Estore(EclipseTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(EclipseTest.class.getName()); rand = ThreadLocalRandom.current(); } diff --git a/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java b/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java index 50dae09..67589aa 100644 --- a/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java +++ b/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java @@ -18,7 +18,7 @@ public class GuavaTest { @BeforeEach public void setup() throws Exception { rand = ThreadLocalRandom.current(); - estore = new Estore(GuavaTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(GuavaTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java b/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java index 25356d6..2e84ea0 100644 --- a/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java +++ b/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java @@ -22,7 +22,7 @@ public class JCFTest { @BeforeEach public void setup() throws Exception { rand = ThreadLocalRandom.current(); - estore = new Estore(JCFTest.class.getName(), new EstoreOptions().useUnsafe(false)); + estore = new Estore(JCFTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java b/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java index c87861d..57feb23 100644 --- a/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java +++ b/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java @@ -28,7 +28,7 @@ public void setupData() throws Exception { estore = new Estore( Fin001Test.class.getName(), - new EstoreOptions().useUnsafe(false).profile(false)); + new EstoreOptions().profile(false)); readDataSet(); } diff --git a/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java b/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java index 5e57bfd..a13352e 100644 --- a/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java +++ b/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java @@ -28,7 +28,7 @@ public void setupData() throws Exception { estore = new Estore( Snb01Test.class.getName(), - new EstoreOptions().useUnsafe(false).profile(false)); + new EstoreOptions().profile(false)); readDataSet(); } diff --git a/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java b/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java index bf10ee8..ccecfad 100644 --- a/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java +++ b/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java @@ -25,9 +25,7 @@ class EqualsRelationExprTest { @BeforeEach void setUp() throws Exception { db = - new Estore( - EqualsRelationExprTest.class.getName() + "_" + System.nanoTime(), - new EstoreOptions().useUnsafe(true)); + new Estore(EqualsRelationExprTest.class.getName() + "_" + System.nanoTime()); } @Test diff --git a/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java b/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java index 264ab6c..a49e71e 100644 --- a/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java +++ b/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java @@ -15,9 +15,7 @@ class WhereBooleanLogicTest { @BeforeEach void setUp() throws Exception { db = - new Estore( - WhereBooleanLogicTest.class.getName() + "_" + System.nanoTime(), - new EstoreOptions().useUnsafe(true)); + new Estore(WhereBooleanLogicTest.class.getName() + "_" + System.nanoTime()); } @Test diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100.java index ff280ee..e9916cf 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { stackData.add(randValue); arrayStack.push(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(arrayStack); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack1000.java index 9beaeeb..1c5cfe0 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack1000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack1000.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { stackData.add(randValue); arrayStack.push(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(arrayStack); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack10000.java index 19bfd77..54ff9d8 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack10000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack10000.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { stackData.add(randValue); arrayStack.push(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(arrayStack); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100000.java index 0e0b45d..fe691ca 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestArrayStack100000.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { stackData.add(randValue); arrayStack.push(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(arrayStack); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100.java index b7e033e..c1f26ce 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100; j++) { fastList.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(fastList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList1000.java index 9403a66..ae8d923 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList1000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList1000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 1000; j++) { fastList.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(fastList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList10000.java index d36c713..8c2648e 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList10000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList10000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 10000; j++) { fastList.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(fastList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100000.java index 3f07ab2..99664c1 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestFastList100000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100000; j++) { fastList.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(fastList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100.java index be75756..1865b82 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100.java @@ -25,7 +25,7 @@ public void setupData() throws Exception { listData.add(rand.nextLong(0, Long.MAX_VALUE)); } immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(immutableArrayList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList1000.java index b5dc248..f10f0c2 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList1000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList1000.java @@ -25,7 +25,7 @@ public void setupData() throws Exception { listData.add(rand.nextLong(0, Long.MAX_VALUE)); } immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(immutableArrayList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList10000.java index c7655c7..b93eb17 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList10000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList10000.java @@ -25,7 +25,7 @@ public void setupData() throws Exception { listData.add(rand.nextLong(0, Long.MAX_VALUE)); } immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(immutableArrayList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100000.java index 76a011f..0025a90 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestImmutableArrayList100000.java @@ -25,7 +25,7 @@ public void setupData() throws Exception { listData.add(rand.nextLong(0, Long.MAX_VALUE)); } immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(immutableArrayList); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100.java index b13ca62..36657eb 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); setData.add(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedMap); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap1000.java index f569e8a..1a30f5c 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap1000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap1000.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); setData.add(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedMap); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap10000.java index ae23fda..50744a2 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap10000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap10000.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); setData.add(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedMap); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100000.java index 86fd603..a4506b9 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedMap100000.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); setData.add(randValue); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedMap); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100.java index d0663d7..89096ff 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100.java @@ -24,7 +24,7 @@ public void setupData() throws Exception { setData.add(rand.nextLong(0, Long.MAX_VALUE)); } unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedSet); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet1000.java index ec5d757..f40848b 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet1000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet1000.java @@ -24,7 +24,7 @@ public void setupData() throws Exception { setData.add(rand.nextLong(0, Long.MAX_VALUE)); } unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedSet); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet10000.java index e77dbd2..e057004 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet10000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet10000.java @@ -24,7 +24,7 @@ public void setupData() throws Exception { setData.add(rand.nextLong(0, Long.MAX_VALUE)); } unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedSet); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100000.java index 788c2f2..1017927 100644 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100000.java +++ b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphReflectionTestUnifiedSet100000.java @@ -24,7 +24,7 @@ public void setupData() throws Exception { setData.add(rand.nextLong(0, Long.MAX_VALUE)); } unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(unifiedSet); } diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100.java deleted file mode 100644 index 04c6d8d..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.stack.mutable.ArrayStack; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayStack100 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayStack arrayStack; - private ArrayList stackData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - arrayStack = new ArrayStack(); - stackData = new ArrayList(); - for (int j = 0; j < 100; j++) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - stackData.add(randValue); - arrayStack.push(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(arrayStack); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, stackData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.stack.mutable.ArrayStack`)-[:delegate]->()-[:items]->()-[]->(m" - + " {value:" - + (long) stackData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - stackData.get(ind), - "Mismatch in IngraphUnsafeTestArrayStack100 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack1000.java deleted file mode 100644 index 243cff2..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack1000.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.stack.mutable.ArrayStack; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayStack1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayStack arrayStack; - private ArrayList stackData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - arrayStack = new ArrayStack(); - stackData = new ArrayList(); - for (int j = 0; j < 1000; j++) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - stackData.add(randValue); - arrayStack.push(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(arrayStack); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, stackData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.stack.mutable.ArrayStack`)-[:delegate]->()-[:items]->()-[]->(m" - + " {value:" - + (long) stackData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - stackData.get(ind), - "Mismatch in IngraphUnsafeTestArrayStack1000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack10000.java deleted file mode 100644 index bb7b5cd..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack10000.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.stack.mutable.ArrayStack; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayStack10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayStack arrayStack; - private ArrayList stackData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - arrayStack = new ArrayStack(); - stackData = new ArrayList(); - for (int j = 0; j < 10000; j++) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - stackData.add(randValue); - arrayStack.push(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(arrayStack); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, stackData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.stack.mutable.ArrayStack`)-[:delegate]->()-[:items]->()-[]->(m" - + " {value:" - + (long) stackData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - stackData.get(ind), - "Mismatch in IngraphUnsafeTestArrayStack10000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100000.java deleted file mode 100644 index 9383229..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestArrayStack100000.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.stack.mutable.ArrayStack; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayStack100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayStack arrayStack; - private ArrayList stackData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - arrayStack = new ArrayStack(); - stackData = new ArrayList(); - for (int j = 0; j < 100000; j++) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - stackData.add(randValue); - arrayStack.push(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(arrayStack); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, stackData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.stack.mutable.ArrayStack`)-[:delegate]->()-[:items]->()-[]->(m" - + " {value:" - + (long) stackData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - stackData.get(ind), - "Mismatch in IngraphUnsafeTestArrayStack100000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100.java deleted file mode 100644 index 3042057..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.mutable.FastList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestFastList100 { - private Estore estore; - private static ThreadLocalRandom rand; - private FastList fastList; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - fastList = new FastList(); - for (int j = 0; j < 100; j++) { - fastList.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(fastList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, fastList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.list.mutable.FastList`)-[:items]->()-[]->(m" - + " {value:" - + (long) fastList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - fastList.get(ind), - "Mismatch in IngraphUnsafeTestFastList100 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList1000.java deleted file mode 100644 index 98d5977..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList1000.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.mutable.FastList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestFastList1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private FastList fastList; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - fastList = new FastList(); - for (int j = 0; j < 1000; j++) { - fastList.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(fastList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, fastList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.list.mutable.FastList`)-[:items]->()-[]->(m" - + " {value:" - + (long) fastList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - fastList.get(ind), - "Mismatch in IngraphUnsafeTestFastList1000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList10000.java deleted file mode 100644 index 8f463d2..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList10000.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.mutable.FastList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestFastList10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private FastList fastList; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - fastList = new FastList(); - for (int j = 0; j < 10000; j++) { - fastList.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(fastList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, fastList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.list.mutable.FastList`)-[:items]->()-[]->(m" - + " {value:" - + (long) fastList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - fastList.get(ind), - "Mismatch in IngraphUnsafeTestFastList10000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100000.java deleted file mode 100644 index f77fca9..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestFastList100000.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.mutable.FastList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestFastList100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private FastList fastList; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - fastList = new FastList(); - for (int j = 0; j < 100000; j++) { - fastList.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(fastList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, fastList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.list.mutable.FastList`)-[:items]->()-[]->(m" - + " {value:" - + (long) fastList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - fastList.get(ind), - "Mismatch in IngraphUnsafeTestFastList100000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100.java deleted file mode 100644 index d602fc5..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.immutable.*; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import java.util.ArrayList; -import org.eclipse.collections.api.list.ImmutableList; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestImmutableArrayList100 { - private Estore estore; - private static ThreadLocalRandom rand; - private ImmutableList immutableArrayList; - private ArrayList listData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - listData = new ArrayList(); - for (int j = 0; j < 100; j++) { - listData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb"); - estore.captureAll(immutableArrayList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, immutableArrayList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.list.immutable.ImmutableArrayList`)-[:items]->()-[]->(m" - + " {value:" - + (long) immutableArrayList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - immutableArrayList.get(ind), - "Mismatch in IngraphUnsafeTestImmutableArrayList100 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList1000.java deleted file mode 100644 index 97e0691..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList1000.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.immutable.*; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import java.util.ArrayList; -import org.eclipse.collections.api.list.ImmutableList; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestImmutableArrayList1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ImmutableList immutableArrayList; - private ArrayList listData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - listData = new ArrayList(); - for (int j = 0; j < 1000; j++) { - listData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb"); - estore.captureAll(immutableArrayList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, immutableArrayList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.list.immutable.ImmutableArrayList`)-[:items]->()-[]->(m" - + " {value:" - + (long) immutableArrayList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - immutableArrayList.get(ind), - "Mismatch in IngraphUnsafeTestImmutableArrayList1000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList10000.java deleted file mode 100644 index 9fb7f28..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList10000.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.immutable.*; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import java.util.ArrayList; -import org.eclipse.collections.api.list.ImmutableList; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestImmutableArrayList10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ImmutableList immutableArrayList; - private ArrayList listData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - listData = new ArrayList(); - for (int j = 0; j < 10000; j++) { - listData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb"); - estore.captureAll(immutableArrayList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, immutableArrayList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.list.immutable.ImmutableArrayList`)-[:items]->()-[]->(m" - + " {value:" - + (long) immutableArrayList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - immutableArrayList.get(ind), - "Mismatch in IngraphUnsafeTestImmutableArrayList10000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100000.java deleted file mode 100644 index dd323cc..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestImmutableArrayList100000.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.list.immutable.*; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import java.util.ArrayList; -import org.eclipse.collections.api.list.ImmutableList; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestImmutableArrayList100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ImmutableList immutableArrayList; - private ArrayList listData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - listData = new ArrayList(); - for (int j = 0; j < 100000; j++) { - listData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - immutableArrayList = new ImmutableListFactoryImpl().withAll(listData); - estore = new Estore("testDb"); - estore.captureAll(immutableArrayList); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, immutableArrayList.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH" - + " (n:`org.eclipse.collections.impl.list.immutable.ImmutableArrayList`)-[:items]->()-[]->(m" - + " {value:" - + (long) immutableArrayList.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - immutableArrayList.get(ind), - "Mismatch in IngraphUnsafeTestImmutableArrayList100000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100.java deleted file mode 100644 index d4db756..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.map.mutable.UnifiedMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedMap100 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedMap unifiedMap; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - unifiedMap = new UnifiedMap(); - while (unifiedMap.size() != 100) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); - setData.add(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(unifiedMap); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.map.mutable.UnifiedMap`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedMap100 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap1000.java deleted file mode 100644 index 9925e5b..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap1000.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.map.mutable.UnifiedMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedMap1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedMap unifiedMap; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - unifiedMap = new UnifiedMap(); - while (unifiedMap.size() != 1000) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); - setData.add(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(unifiedMap); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.map.mutable.UnifiedMap`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedMap1000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap10000.java deleted file mode 100644 index 6006b98..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap10000.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.map.mutable.UnifiedMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedMap10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedMap unifiedMap; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - unifiedMap = new UnifiedMap(); - while (unifiedMap.size() != 10000) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); - setData.add(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(unifiedMap); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.map.mutable.UnifiedMap`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedMap10000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100000.java deleted file mode 100644 index a4e6b51..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedMap100000.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.map.mutable.UnifiedMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedMap100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedMap unifiedMap; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - unifiedMap = new UnifiedMap(); - while (unifiedMap.size() != 100000) { - long randValue = rand.nextLong(0, Long.MAX_VALUE); - unifiedMap.put(rand.nextLong(0, Long.MAX_VALUE), randValue); - setData.add(randValue); - } - estore = new Estore("testDb"); - estore.captureAll(unifiedMap); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.map.mutable.UnifiedMap`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedMap100000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100.java deleted file mode 100644 index 195cc41..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.set.mutable.UnifiedSet; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedSet100 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedSet unifiedSet; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - for (int j = 0; j < 100; j++) { - setData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb"); - estore.captureAll(unifiedSet); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.set.mutable.UnifiedSet`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedSet100 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet1000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet1000.java deleted file mode 100644 index d5ea366..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet1000.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.set.mutable.UnifiedSet; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedSet1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedSet unifiedSet; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - for (int j = 0; j < 1000; j++) { - setData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb"); - estore.captureAll(unifiedSet); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.set.mutable.UnifiedSet`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedSet1000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet10000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet10000.java deleted file mode 100644 index 46c3e1a..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet10000.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.set.mutable.UnifiedSet; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedSet10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedSet unifiedSet; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - for (int j = 0; j < 10000; j++) { - setData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb"); - estore.captureAll(unifiedSet); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.set.mutable.UnifiedSet`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedSet10000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100000.java b/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100000.java deleted file mode 100644 index 5de0f1a..0000000 --- a/eval/estore/datastructure/eclipse/src/test/java/org/estore/eval/estore/datastructure/eclipse/InGraphUnsafeTestUnifiedSet100000.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.estore.eval.estore.datastructure.eclipse; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import org.eclipse.collections.impl.set.mutable.UnifiedSet; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestUnifiedSet100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private UnifiedSet unifiedSet; - private ArrayList setData; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - setData = new ArrayList(); - for (int j = 0; j < 100000; j++) { - setData.add(rand.nextLong(0, Long.MAX_VALUE)); - } - unifiedSet = new UnifiedSet(setData); - estore = new Estore("testDb"); - estore.captureAll(unifiedSet); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(0, setData.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`org.eclipse.collections.impl.set.mutable.UnifiedSet`)-[:table]->()-[]->(m" - + " {value:" - + (long) setData.get(ind) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - setData.get(ind), - "Mismatch in IngraphUnsafeTestUnifiedSet100000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100.java index e561bdb..dba67a8 100644 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100.java +++ b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100.java @@ -30,7 +30,7 @@ public void setupData() throws Exception { table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); } } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(table); } diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable1000.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable1000.java index 7c62b97..dd26453 100644 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable1000.java +++ b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable1000.java @@ -30,7 +30,7 @@ public void setupData() throws Exception { table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); } } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(table); } diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable10000.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable10000.java index 308341e..390cbd7 100644 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable10000.java +++ b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable10000.java @@ -30,7 +30,7 @@ public void setupData() throws Exception { table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); } } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(table); } diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100000.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100000.java index 63078d5..1ae50f5 100644 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100000.java +++ b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestArrayTable100000.java @@ -30,7 +30,7 @@ public void setupData() throws Exception { table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); } } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(table); } diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestHashMultiset100.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestHashMultiset100.java index 47e4aa8..8f6e834 100644 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestHashMultiset100.java +++ b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphReflectionTestHashMultiset100.java @@ -26,7 +26,7 @@ public void setupData() throws Exception { multiMap.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); } multiSet = HashMultiset.create(values); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(multiMap); } diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100.java deleted file mode 100644 index 299adf1..0000000 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.estore.eval.estore.datastructure.guava; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import com.google.common.collect.ArrayTable; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayTable100 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayTable table; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - ArrayList rows = new ArrayList(); - ArrayList columns = new ArrayList(); - for (long j = 0; j < 10; j++) { - rows.add(j); - columns.add(j); - } - table = ArrayTable.create(rows, columns); - for (long j = 0; j < 10; j++) { - for (long k = 0; k < 10; k++) { - table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); - } - } - estore = new Estore("testDb"); - estore.captureAll(table); - } - - @Test - public void testFindElement() { - long ind = rand.nextLong(0, 10); - long ind2 = rand.nextLong(0, 10); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`com.google.common.collect.ArrayTable`)-[:array]->()-[]->()-[]->(m {value:" - + table.get(ind, ind2) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - table.get(ind, ind2), - "Mismatch in IngraphUnsafeTestArrayTable100 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable1000.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable1000.java deleted file mode 100644 index 0295295..0000000 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable1000.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.estore.eval.estore.datastructure.guava; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import com.google.common.collect.ArrayTable; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayTable1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayTable table; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - ArrayList rows = new ArrayList(); - ArrayList columns = new ArrayList(); - for (long j = 0; j < 32; j++) { - rows.add(j); - columns.add(j); - } - table = ArrayTable.create(rows, columns); - for (long j = 0; j < 32; j++) { - for (long k = 0; k < 32; k++) { - table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); - } - } - estore = new Estore("testDb"); - estore.captureAll(table); - } - - @Test - public void testFindElement() { - long ind = rand.nextLong(0, 32); - long ind2 = rand.nextLong(0, 32); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`com.google.common.collect.ArrayTable`)-[:array]->()-[]->()-[]->(m {value:" - + table.get(ind, ind2) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - table.get(ind, ind2), - "Mismatch in IngraphUnsafeTestArrayTable1000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable10000.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable10000.java deleted file mode 100644 index 415cd79..0000000 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable10000.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.estore.eval.estore.datastructure.guava; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import com.google.common.collect.ArrayTable; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayTable10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayTable table; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - ArrayList rows = new ArrayList(); - ArrayList columns = new ArrayList(); - for (long j = 0; j < 100; j++) { - rows.add(j); - columns.add(j); - } - table = ArrayTable.create(rows, columns); - for (long j = 0; j < 100; j++) { - for (long k = 0; k < 100; k++) { - table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); - } - } - estore = new Estore("testDb"); - estore.captureAll(table); - } - - @Test - public void testFindElement() { - long ind = rand.nextLong(0, 100); - long ind2 = rand.nextLong(0, 100); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`com.google.common.collect.ArrayTable`)-[:array]->()-[]->()-[]->(m {value:" - + table.get(ind, ind2) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - table.get(ind, ind2), - "Mismatch in IngraphUnsafeTestArrayTable10000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100000.java b/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100000.java deleted file mode 100644 index 026ca74..0000000 --- a/eval/estore/datastructure/guava/src/test/java/org/estore/eval/estore/datastructure/guava/InGraphUnsafeTestArrayTable100000.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.estore.eval.estore.datastructure.guava; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import com.google.common.collect.ArrayTable; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import java.util.ArrayList; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayTable100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayTable table; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - ArrayList rows = new ArrayList(); - ArrayList columns = new ArrayList(); - for (long j = 0; j < 320; j++) { - rows.add(j); - columns.add(j); - } - table = ArrayTable.create(rows, columns); - for (long j = 0; j < 320; j++) { - for (long k = 0; k < 320; k++) { - table.put(j, k, rand.nextLong(0, Long.MAX_VALUE)); - } - } - estore = new Estore("testDb"); - estore.captureAll(table); - } - - @Test - public void testFindElement() { - long ind = rand.nextLong(0, 320); - long ind2 = rand.nextLong(0, 320); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`com.google.common.collect.ArrayTable`)-[:array]->()-[]->()-[]->(m {value:" - + table.get(ind, ind2) - + "}) RETURN m"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("m").get(0)), - table.get(ind, ind2), - "Mismatch in IngraphUnsafeTestArrayTable100000 for testFindElement"); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100.java index 237686f..b64837a 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque1000.java index 6d46438..3f10b06 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque1000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque1000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 1000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque10000.java index 252add7..1451a2d 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque10000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque10000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 10000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100000.java index ac7ce22..2362f11 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayDeque100000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100.java index 1fdc528..2a3efbf 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000.java index bd2aad6..cf4d8be 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 1000; j++) { list.add(rand.nextLong()); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList10000.java index f67a056..a9ec68b 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList10000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList10000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 10000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100000.java index b951440..9786e56 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList100000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000000.java index 9ccbe0b..4b02a17 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestArrayList1000000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 1000000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100.java index f51da08..0fdf4d4 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100.java @@ -22,7 +22,7 @@ public void setupData() throws Exception { map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); } map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(map); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap1000.java index f352c5a..93fa7a1 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap1000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap1000.java @@ -22,7 +22,7 @@ public void setupData() throws Exception { map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); } map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(map); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap10000.java index 5ea1018..5680764 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap10000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap10000.java @@ -22,7 +22,7 @@ public void setupData() throws Exception { map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); } map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(map); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100000.java index 7d2d732..326c40a 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestHashMap100000.java @@ -22,7 +22,7 @@ public void setupData() throws Exception { map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); } map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(map); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100.java index 79288a2..af4296b 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList1000.java index 4e6f591..b1b66bc 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList1000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList1000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 1000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList10000.java index 9f7e66e..631ffbb 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList10000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList10000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 10000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100000.java index 2f0a995..141d9d2 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestLinkedList100000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100.java index 6fe0f01..289c7a7 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector1000.java index c74f304..1a4eed4 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector1000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector1000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 1000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector10000.java index 2d0a3d2..b9f8044 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector10000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector10000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 10000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100000.java index 0c73043..2fe8073 100644 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100000.java +++ b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphReflectionTestVector100000.java @@ -21,7 +21,7 @@ public void setupData() throws Exception { for (int j = 0; j < 100000; j++) { list.add(rand.nextLong(0, Long.MAX_VALUE)); } - estore = new Estore("testDb", new EstoreOptions().useUnsafe(false)); + estore = new Estore("testDb"); estore.captureAll(list); } diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100.java deleted file mode 100644 index 57305c8..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.ArrayDeque; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayDeque100 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayDeque list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new ArrayDeque(); - for (int j = 0; j < 100; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.ArrayDeque`)-[:elements]->(m)-[]->(p {value:" - + ((long) list.toArray()[ind]) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals(((Long) result.get("p").get(0)), list.toArray()[ind]); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque1000.java deleted file mode 100644 index 8d7af23..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque1000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.ArrayDeque; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestArrayDeque1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayDeque list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new ArrayDeque(); - for (int j = 0; j < 1000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.ArrayDeque`)-[:elements]->(m)-[]->(p {value:" - + ((long) list.toArray()[ind]) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.toArray()[ind]); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque10000.java deleted file mode 100644 index 4e22725..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque10000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.ArrayDeque; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestArrayDeque10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayDeque list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new ArrayDeque(); - for (int j = 0; j < 10000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.ArrayDeque`)-[:elements]->(m)-[]->(p {value:" - + ((long) list.toArray()[ind]) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.toArray()[ind]); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100000.java deleted file mode 100644 index c0fbcf1..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayDeque100000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.ArrayDeque; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestArrayDeque100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayDeque list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new ArrayDeque(); - for (int j = 0; j < 100000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.ArrayDeque`)-[:elements]->(m)-[]->(p {value:" - + ((long) list.toArray()[ind]) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.toArray()[ind]); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100.java deleted file mode 100644 index 6d1f400..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.ArrayList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayList100 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayList list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new ArrayList(); - for (int j = 0; j < 100; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - - Table result = - estore.query( - "MATCH (n:`java.util.ArrayList`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("p").get(0)), - list.get(ind), - "Mismatch in expected value in InGraphUnsafeTestArrayList100"); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList1000.java deleted file mode 100644 index e58de22..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList1000.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.Random; -import java.util.ArrayList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestArrayList1000 { - private Estore estore; - private Random rand; - private ArrayList list; - - @BeforeEach - public void setupData() throws Exception { - rand = new Random(); - list = new ArrayList(); - for (int j = 0; j < 1000; j++) { - list.add(rand.nextLong()); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.ArrayList`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("p").get(0)), - list.get(ind), - "Mismatch in expected value in InGraphUnsafeTestArrayList1000"); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList10000.java deleted file mode 100644 index a9ce948..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList10000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.ArrayList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestArrayList10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayList list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new ArrayList(); - for (int j = 0; j < 10000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.ArrayList`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100000.java deleted file mode 100644 index 21cd49a..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestArrayList100000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.ArrayList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestArrayList100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private ArrayList list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new ArrayList(); - for (int j = 0; j < 100000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.ArrayList`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100.java deleted file mode 100644 index bbe3f6d..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.HashMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestHashMap100 { - private Estore estore; - private static ThreadLocalRandom rand; - private HashMap map; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - map = new HashMap(); - while (map.size() != 99) { - map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); - } - map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb"); - estore.captureAll(map); - } - - @Test - public void testFindElement() { - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.HashMap`)-[:table]->()-[]->()-[:value]->(p {value:90}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("p").get(0)), - 90L, - "Mismatch in InGraphUnsafeTestHashMap100 in testFindElement"); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap1000.java deleted file mode 100644 index 6bee26a..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap1000.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.HashMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestHashMap1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private HashMap map; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - map = new HashMap(); - while (map.size() != 999) { - map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); - } - map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb"); - estore.captureAll(map); - } - - @Test - public void testFindElement() { - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.HashMap`)-[:table]->()-[]->()-[:value]->(p {value:90}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("p").get(0)), - 90L, - "Mismatch in InGraphUnsafeTestHashMap1000 in testFindElement"); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap10000.java deleted file mode 100644 index 818c468..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap10000.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.HashMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestHashMap10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private HashMap map; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - map = new HashMap(); - while (map.size() != 9999) { - map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); - } - map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb"); - estore.captureAll(map); - } - - @Test - public void testFindElement() { - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.HashMap`)-[:table]->()-[]->()-[:value]->(p {value:90}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("p").get(0)), - 90L, - "Mismatch in InGraphUnsafeTestHashMap10000 in testFindElement"); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100000.java deleted file mode 100644 index 51ac4e3..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestHashMap100000.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.HashMap; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestHashMap100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private HashMap map; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - map = new HashMap(); - while (map.size() != 99999) { - map.put(rand.nextLong(0, Long.MAX_VALUE), rand.nextLong(0, Long.MAX_VALUE)); - } - map.put(rand.nextLong(0, Long.MAX_VALUE), 90L); - estore = new Estore("testDb"); - estore.captureAll(map); - } - - @Test - public void testFindElement() { - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.HashMap`)-[:table]->()-[]->()-[:value]->(p {value:90}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals( - ((Long) result.get("p").get(0)), - 90L, - "Mismatch in InGraphUnsafeTestHashMap100000 in testFindElement"); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100.java deleted file mode 100644 index 33aafc8..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.LinkedList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestLinkedList100 { - private Estore estore; - private static ThreadLocalRandom rand; - private LinkedList list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new LinkedList(); - for (int j = 0; j < 100; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.LinkedList`)-[*1..99]->(m)-[:item]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals(((Long) result.get("p").get(0)), list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList1000.java deleted file mode 100644 index b3dbada..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList1000.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.LinkedList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestLinkedList1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private LinkedList list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new LinkedList(); - for (int j = 0; j < 1000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.LinkedList`)-[:*1.." - + list.size() - + "]->(m)-[:item]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList10000.java deleted file mode 100644 index 1c94c56..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList10000.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.LinkedList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestLinkedList10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private LinkedList list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new LinkedList(); - for (int j = 0; j < 10000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.LinkedList`)-[:*1.." - + list.size() - + "]->(m)-[:item]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100000.java deleted file mode 100644 index d467666..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestLinkedList100000.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.LinkedList; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestLinkedList100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private LinkedList list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new LinkedList(); - for (int j = 0; j < 100000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.LinkedList`)-[:*1.." - + list.size() - + "]->(m)-[:item]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100.java deleted file mode 100644 index b4b9012..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.Vector; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTestVector100 { - private Estore estore; - private static ThreadLocalRandom rand; - private Vector list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new Vector(); - for (int j = 0; j < 100; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.Vector`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertEquals(((Long) result.get("p").get(0)), list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector1000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector1000.java deleted file mode 100644 index 96b45bb..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector1000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.Vector; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestVector1000 { - private Estore estore; - private static ThreadLocalRandom rand; - private Vector list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new Vector(); - for (int j = 0; j < 1000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.Vector`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector10000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector10000.java deleted file mode 100644 index bc517fd..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector10000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.Vector; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestVector10000 { - private Estore estore; - private static ThreadLocalRandom rand; - private Vector list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new Vector(); - for (int j = 0; j < 10000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.Vector`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100000.java b/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100000.java deleted file mode 100644 index 8c3e281..0000000 --- a/eval/estore/datastructure/jcf/src/test/java/org/estore/eval/estore/datastructure/jcf/InGraphUnsafeTestVector100000.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.estore.eval.estore.datastructure.jcf; - -import org.estore.Estore; -import java.util.concurrent.ThreadLocalRandom; -import java.util.Vector; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.planner.util.Table; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class InGraphUnsafeTestVector100000 { - private Estore estore; - private static ThreadLocalRandom rand; - private Vector list; - - @BeforeEach - public void setupData() throws Exception { - rand = ThreadLocalRandom.current(); - list = new Vector(); - for (int j = 0; j < 100000; j++) { - list.add(rand.nextLong(0, Long.MAX_VALUE)); - } - estore = new Estore("testDb"); - estore.captureAll(list); - } - - @Test - public void testFindElement() { - int ind = rand.nextInt(list.size()); - long t1 = System.nanoTime(); - Table result = - estore.query( - "MATCH (n:`java.util.Vector`)-[:elementData]->(m)-[]->(p {value:" - + ((long) list.get(ind)) - + "}) RETURN p"); - System.out.println("Execution Time : " + (System.nanoTime() - t1)); - assertTrue(((Long) result.get("p").get(0)) == list.get(ind)); - } -} diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest001.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest001.java index 35d908c..9dcbddc 100644 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest001.java +++ b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest001.java @@ -22,7 +22,7 @@ public class InGraphReflectionTest001 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest01.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest01.java index 366399e..7388ff3 100644 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest01.java +++ b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest01.java @@ -24,7 +24,7 @@ public class InGraphReflectionTest01 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest03.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest03.java index 79cb96e..09d32b3 100644 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest03.java +++ b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest03.java @@ -22,7 +22,7 @@ public class InGraphReflectionTest03 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest10.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest10.java index 7a1c3fb..dd36587 100644 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest10.java +++ b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest10.java @@ -22,7 +22,7 @@ public class InGraphReflectionTest10 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest3.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest3.java index 546b31a..d4a415d 100644 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest3.java +++ b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphReflectionTest3.java @@ -22,7 +22,7 @@ public class InGraphReflectionTest3 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest001.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest001.java deleted file mode 100644 index 78b5409..0000000 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest001.java +++ /dev/null @@ -1,432 +0,0 @@ -package org.estore.eval.estore.ldbc.finbench; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.finbench.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -public class InGraphUnsafeTest001 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - - readDataSet(); - } - - @Test - public void testTw1() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 1, personName:" - + " 'George'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1020342322, createTime: '26th March', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw2() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Company` {companyId: 12345," - + " companyName: 'Rand'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1213243435, createTime: 'February 5th', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw3() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972}), (src:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 99079191802151398}) CREATE (dst)-[:Transfer]->(src)"); - } - - @Test - public void testTw4() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972, accountType:'card'})," - + " (src:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 99079191802151398}) CREATE (dst)-[:Withdraw]->(src)"); - } - - @Test - public void testTw8() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (loan)-[:Deposit]->(acc)"); - } - - @Test - public void testTw9() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (acc)-[:Repay]->(loan)"); - } - - @Test - public void testTw13() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 2199023255767})," - + " (p2:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 10995116278183})" - + " CREATE (p1)<-[:Guarantee]-(p2)"); - } - - @Test - public void testTsr1() { - Table result = - estore.query( - "MATCH (account:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}) RETURN account.createTime, account.isBlocked," - + " account.accountType"); - result.print(); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap accounts = new HashMap(); - HashMap companys = new HashMap(); - HashMap loans = new HashMap(); - HashMap mediums = new HashMap(); - - String datasetPath = "/sf0.01"; - - // Nodes - insertAccounts(datasetPath + "/" + "snapshot/Account.csv", accounts); - insertCompanys(datasetPath + "/" + "snapshot/Company.csv", companys); - insertLoans(datasetPath + "/" + "snapshot/Loan.csv", loans); - insertMediums(datasetPath + "/" + "snapshot/Medium.csv", mediums); - insertPersons(datasetPath + "/" + "snapshot/Person.csv", persons); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountRepayLoan.csv", - Account.class, - Loan.class, - accounts, - loans, - "setRepay"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountTransferAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setTransfer"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountWithdrawAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setWithdraw"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyApplyLoan.csv", - Company.class, - Loan.class, - companys, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyGuaranteeCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyInvestCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyOwnAccount.csv", - Company.class, - Account.class, - companys, - accounts, - "setOwn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/LoanDepositAccount.csv", - Loan.class, - Account.class, - loans, - accounts, - "setDeposit"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/MediumSignInAccount.csv", - Medium.class, - Account.class, - mediums, - accounts, - "setSignIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonApplyLoan.csv", - Person.class, - Loan.class, - persons, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonGuaranteePerson.csv", - Person.class, - Person.class, - persons, - persons, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonInvestCompany.csv", - Person.class, - Company.class, - persons, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonOwnAccount.csv", - Person.class, - Account.class, - persons, - accounts, - "setOwn"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Account account : accounts.values()) { - estore.insert(account); - } - for (Company company : companys.values()) { - estore.insert(company); - } - for (Loan loan : loans.values()) { - estore.insert(loan); - } - for (Medium medium : mediums.values()) { - estore.insert(medium); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long personId = Long.parseLong(csvRecord.get("personId")); - String personName = csvRecord.get("personName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String gender = csvRecord.get("gender"); - String birthday = csvRecord.get("birthday"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - - persons.put( - personId, - (new Person( - personId, personName, isBlocked, createTime, gender, birthday, country, city))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertAccounts(String filePath, HashMap accounts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long accountId = Long.parseLong(csvRecord.get("accountId")); - String createTime = csvRecord.get("createTime"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String accountType = csvRecord.get("accoutType"); - String nickname = csvRecord.get("nickname"); - String phonenum = csvRecord.get("phonenum"); - String email = csvRecord.get("email"); - String freqLoginType = csvRecord.get("freqLoginType"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String accountLevel = csvRecord.get("accountLevel"); - - accounts.put( - accountId, - new Account( - accountId, - createTime, - isBlocked, - accountType, - nickname, - phonenum, - email, - freqLoginType, - lastLoginTime, - accountLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertCompanys(String filePath, HashMap companys) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long companyId = Long.parseLong(csvRecord.get("companyId")); - String companyName = csvRecord.get("companyName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - String business = csvRecord.get("business"); - String description = csvRecord.get("description"); - String url = csvRecord.get("url"); - - companys.put( - companyId, - new Company( - companyId, - companyName, - isBlocked, - createTime, - country, - city, - business, - description, - url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertLoans(String filePath, HashMap loans) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long loanId = Long.parseLong(csvRecord.get("loanId")); - double loanAmount = Double.parseDouble(csvRecord.get("loanAmount")); - double balance = Double.parseDouble(csvRecord.get("balance")); - String createTime = csvRecord.get("createTime"); - String loanUsage = csvRecord.get("loanUsage"); - double interestRate = Double.parseDouble(csvRecord.get("interestRate")); - - loans.put( - loanId, new Loan(loanId, loanAmount, balance, createTime, loanUsage, interestRate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertMediums(String filePath, HashMap mediums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long mediumId = Long.parseLong(csvRecord.get("mediumId")); - String mediumType = csvRecord.get("mediumType"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String riskLevel = csvRecord.get("riskLevel"); - - mediums.put( - mediumId, - new Medium(mediumId, mediumType, isBlocked, createTime, lastLoginTime, riskLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest01.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest01.java deleted file mode 100644 index 8305901..0000000 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest01.java +++ /dev/null @@ -1,436 +0,0 @@ -package org.estore.eval.estore.ldbc.finbench; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.finbench.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTest01 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - - readDataSet(); - } - - @Test - public void testTw1() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 1, personName:" - + " 'George'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1020342322, createTime: '26th March', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw2() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Company` {companyId: 12345," - + " companyName: 'Rand'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1213243435, createTime: 'February 5th', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw3() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972}), (src:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 99079191802151398}) CREATE (dst)-[:Transfer]->(src)"); - } - - @Test - public void testTw4() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972, accountType:'card'})," - + " (src:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 99079191802151398}) CREATE (dst)-[:Withdraw]->(src)"); - } - - @Test - public void testTw8() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (loan)-[:Deposit]->(acc)"); - } - - @Test - public void testTw9() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (acc)-[:Repay]->(loan)"); - } - - @Test - public void testTw13() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 2199023255767})," - + " (p2:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 10995116278183})" - + " CREATE (p1)<-[:Guarantee]-(p2)"); - } - - @Test - public void testTsr1() { - Table result = - estore.query( - "MATCH (account:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}) RETURN account.createTime, account.isBlocked," - + " account.accountType"); - assertEquals(result.get("account.createTime").get(0), "2020-11-11 18:44:24.021"); - assertEquals(result.get("account.isBlocked").get(0), false); - assertEquals(result.get("account.accountType").get(0), "certificate of deposit"); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap accounts = new HashMap(); - HashMap companys = new HashMap(); - HashMap loans = new HashMap(); - HashMap mediums = new HashMap(); - - String datasetPath = "/sf0.1"; - - // Nodes - insertAccounts(datasetPath + "/" + "snapshot/Account.csv", accounts); - insertCompanys(datasetPath + "/" + "snapshot/Company.csv", companys); - insertLoans(datasetPath + "/" + "snapshot/Loan.csv", loans); - insertMediums(datasetPath + "/" + "snapshot/Medium.csv", mediums); - insertPersons(datasetPath + "/" + "snapshot/Person.csv", persons); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountRepayLoan.csv", - Account.class, - Loan.class, - accounts, - loans, - "setRepay"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountTransferAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setTransfer"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountWithdrawAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setWithdraw"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyApplyLoan.csv", - Company.class, - Loan.class, - companys, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyGuaranteeCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyInvestCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyOwnAccount.csv", - Company.class, - Account.class, - companys, - accounts, - "setOwn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/LoanDepositAccount.csv", - Loan.class, - Account.class, - loans, - accounts, - "setDeposit"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/MediumSignInAccount.csv", - Medium.class, - Account.class, - mediums, - accounts, - "setSignIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonApplyLoan.csv", - Person.class, - Loan.class, - persons, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonGuaranteePerson.csv", - Person.class, - Person.class, - persons, - persons, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonInvestCompany.csv", - Person.class, - Company.class, - persons, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonOwnAccount.csv", - Person.class, - Account.class, - persons, - accounts, - "setOwn"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Account account : accounts.values()) { - estore.insert(account); - } - for (Company company : companys.values()) { - estore.insert(company); - } - for (Loan loan : loans.values()) { - estore.insert(loan); - } - for (Medium medium : mediums.values()) { - estore.insert(medium); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long personId = Long.parseLong(csvRecord.get("personId")); - String personName = csvRecord.get("personName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String gender = csvRecord.get("gender"); - String birthday = csvRecord.get("birthday"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - - persons.put( - personId, - (new Person( - personId, personName, isBlocked, createTime, gender, birthday, country, city))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertAccounts(String filePath, HashMap accounts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long accountId = Long.parseLong(csvRecord.get("accountId")); - String createTime = csvRecord.get("createTime"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String accountType = csvRecord.get("accoutType"); - String nickname = csvRecord.get("nickname"); - String phonenum = csvRecord.get("phonenum"); - String email = csvRecord.get("email"); - String freqLoginType = csvRecord.get("freqLoginType"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String accountLevel = csvRecord.get("accountLevel"); - - accounts.put( - accountId, - new Account( - accountId, - createTime, - isBlocked, - accountType, - nickname, - phonenum, - email, - freqLoginType, - lastLoginTime, - accountLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertCompanys(String filePath, HashMap companys) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long companyId = Long.parseLong(csvRecord.get("companyId")); - String companyName = csvRecord.get("companyName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - String business = csvRecord.get("business"); - String description = csvRecord.get("description"); - String url = csvRecord.get("url"); - - companys.put( - companyId, - new Company( - companyId, - companyName, - isBlocked, - createTime, - country, - city, - business, - description, - url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertLoans(String filePath, HashMap loans) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long loanId = Long.parseLong(csvRecord.get("loanId")); - double loanAmount = Double.parseDouble(csvRecord.get("loanAmount")); - double balance = Double.parseDouble(csvRecord.get("balance")); - String createTime = csvRecord.get("createTime"); - String loanUsage = csvRecord.get("loanUsage"); - double interestRate = Double.parseDouble(csvRecord.get("interestRate")); - - loans.put( - loanId, new Loan(loanId, loanAmount, balance, createTime, loanUsage, interestRate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertMediums(String filePath, HashMap mediums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long mediumId = Long.parseLong(csvRecord.get("mediumId")); - String mediumType = csvRecord.get("mediumType"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String riskLevel = csvRecord.get("riskLevel"); - - mediums.put( - mediumId, - new Medium(mediumId, mediumType, isBlocked, createTime, lastLoginTime, riskLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest03.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest03.java deleted file mode 100644 index 671adc7..0000000 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest03.java +++ /dev/null @@ -1,431 +0,0 @@ -package org.estore.eval.estore.ldbc.finbench; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.finbench.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -public class InGraphUnsafeTest03 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - - readDataSet(); - } - - @Test - public void testTw1() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 1, personName:" - + " 'George'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1020342322, createTime: '26th March', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw2() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Company` {companyId: 12345," - + " companyName: 'Rand'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1213243435, createTime: 'February 5th', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw3() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972}), (src:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 99079191802151398}) CREATE (dst)-[:Transfer]->(src)"); - } - - @Test - public void testTw4() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972, accountType:'card'})," - + " (src:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 99079191802151398}) CREATE (dst)-[:Withdraw]->(src)"); - } - - @Test - public void testTw8() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (loan)-[:Deposit]->(acc)"); - } - - @Test - public void testTw9() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (acc)-[:Repay]->(loan)"); - } - - @Test - public void testTw13() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 2199023255767})," - + " (p2:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 10995116278183})" - + " CREATE (p1)<-[:Guarantee]-(p2)"); - } - - @Test - public void testTsr1() { - Table result = - estore.query( - "MATCH (account:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}) RETURN account.createTime, account.isBlocked," - + " account.accountType"); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap accounts = new HashMap(); - HashMap companys = new HashMap(); - HashMap loans = new HashMap(); - HashMap mediums = new HashMap(); - - String datasetPath = "/sf0.3"; - - // Nodes - insertAccounts(datasetPath + "/" + "snapshot/Account.csv", accounts); - insertCompanys(datasetPath + "/" + "snapshot/Company.csv", companys); - insertLoans(datasetPath + "/" + "snapshot/Loan.csv", loans); - insertMediums(datasetPath + "/" + "snapshot/Medium.csv", mediums); - insertPersons(datasetPath + "/" + "snapshot/Person.csv", persons); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountRepayLoan.csv", - Account.class, - Loan.class, - accounts, - loans, - "setRepay"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountTransferAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setTransfer"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountWithdrawAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setWithdraw"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyApplyLoan.csv", - Company.class, - Loan.class, - companys, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyGuaranteeCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyInvestCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyOwnAccount.csv", - Company.class, - Account.class, - companys, - accounts, - "setOwn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/LoanDepositAccount.csv", - Loan.class, - Account.class, - loans, - accounts, - "setDeposit"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/MediumSignInAccount.csv", - Medium.class, - Account.class, - mediums, - accounts, - "setSignIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonApplyLoan.csv", - Person.class, - Loan.class, - persons, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonGuaranteePerson.csv", - Person.class, - Person.class, - persons, - persons, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonInvestCompany.csv", - Person.class, - Company.class, - persons, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonOwnAccount.csv", - Person.class, - Account.class, - persons, - accounts, - "setOwn"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Account account : accounts.values()) { - estore.insert(account); - } - for (Company company : companys.values()) { - estore.insert(company); - } - for (Loan loan : loans.values()) { - estore.insert(loan); - } - for (Medium medium : mediums.values()) { - estore.insert(medium); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long personId = Long.parseLong(csvRecord.get("personId")); - String personName = csvRecord.get("personName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String gender = csvRecord.get("gender"); - String birthday = csvRecord.get("birthday"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - - persons.put( - personId, - (new Person( - personId, personName, isBlocked, createTime, gender, birthday, country, city))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertAccounts(String filePath, HashMap accounts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long accountId = Long.parseLong(csvRecord.get("accountId")); - String createTime = csvRecord.get("createTime"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String accountType = csvRecord.get("accoutType"); - String nickname = csvRecord.get("nickname"); - String phonenum = csvRecord.get("phonenum"); - String email = csvRecord.get("email"); - String freqLoginType = csvRecord.get("freqLoginType"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String accountLevel = csvRecord.get("accountLevel"); - - accounts.put( - accountId, - new Account( - accountId, - createTime, - isBlocked, - accountType, - nickname, - phonenum, - email, - freqLoginType, - lastLoginTime, - accountLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertCompanys(String filePath, HashMap companys) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long companyId = Long.parseLong(csvRecord.get("companyId")); - String companyName = csvRecord.get("companyName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - String business = csvRecord.get("business"); - String description = csvRecord.get("description"); - String url = csvRecord.get("url"); - - companys.put( - companyId, - new Company( - companyId, - companyName, - isBlocked, - createTime, - country, - city, - business, - description, - url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertLoans(String filePath, HashMap loans) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long loanId = Long.parseLong(csvRecord.get("loanId")); - double loanAmount = Double.parseDouble(csvRecord.get("loanAmount")); - double balance = Double.parseDouble(csvRecord.get("balance")); - String createTime = csvRecord.get("createTime"); - String loanUsage = csvRecord.get("loanUsage"); - double interestRate = Double.parseDouble(csvRecord.get("interestRate")); - - loans.put( - loanId, new Loan(loanId, loanAmount, balance, createTime, loanUsage, interestRate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertMediums(String filePath, HashMap mediums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long mediumId = Long.parseLong(csvRecord.get("mediumId")); - String mediumType = csvRecord.get("mediumType"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String riskLevel = csvRecord.get("riskLevel"); - - mediums.put( - mediumId, - new Medium(mediumId, mediumType, isBlocked, createTime, lastLoginTime, riskLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest10.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest10.java deleted file mode 100644 index 302e121..0000000 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest10.java +++ /dev/null @@ -1,431 +0,0 @@ -package org.estore.eval.estore.ldbc.finbench; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.finbench.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -public class InGraphUnsafeTest10 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - - readDataSet(); - } - - @Test - public void testTw1() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 1, personName:" - + " 'George'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1020342322, createTime: '26th March', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw2() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Company` {companyId: 12345," - + " companyName: 'Rand'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1213243435, createTime: 'February 5th', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw3() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972}), (src:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 99079191802151398}) CREATE (dst)-[:Transfer]->(src)"); - } - - @Test - public void testTw4() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972, accountType:'card'})," - + " (src:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 99079191802151398}) CREATE (dst)-[:Withdraw]->(src)"); - } - - @Test - public void testTw8() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (loan)-[:Deposit]->(acc)"); - } - - @Test - public void testTw9() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (acc)-[:Repay]->(loan)"); - } - - @Test - public void testTw13() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 2199023255767})," - + " (p2:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 10995116278183})" - + " CREATE (p1)<-[:Guarantee]-(p2)"); - } - - @Test - public void testTsr1() { - Table result = - estore.query( - "MATCH (account:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}) RETURN account.createTime, account.isBlocked," - + " account.accountType"); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap accounts = new HashMap(); - HashMap companys = new HashMap(); - HashMap loans = new HashMap(); - HashMap mediums = new HashMap(); - - String datasetPath = "/sf10"; - - // Nodes - insertAccounts(datasetPath + "/" + "snapshot/Account.csv", accounts); - insertCompanys(datasetPath + "/" + "snapshot/Company.csv", companys); - insertLoans(datasetPath + "/" + "snapshot/Loan.csv", loans); - insertMediums(datasetPath + "/" + "snapshot/Medium.csv", mediums); - insertPersons(datasetPath + "/" + "snapshot/Person.csv", persons); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountRepayLoan.csv", - Account.class, - Loan.class, - accounts, - loans, - "setRepay"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountTransferAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setTransfer"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountWithdrawAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setWithdraw"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyApplyLoan.csv", - Company.class, - Loan.class, - companys, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyGuaranteeCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyInvestCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyOwnAccount.csv", - Company.class, - Account.class, - companys, - accounts, - "setOwn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/LoanDepositAccount.csv", - Loan.class, - Account.class, - loans, - accounts, - "setDeposit"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/MediumSignInAccount.csv", - Medium.class, - Account.class, - mediums, - accounts, - "setSignIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonApplyLoan.csv", - Person.class, - Loan.class, - persons, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonGuaranteePerson.csv", - Person.class, - Person.class, - persons, - persons, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonInvestCompany.csv", - Person.class, - Company.class, - persons, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonOwnAccount.csv", - Person.class, - Account.class, - persons, - accounts, - "setOwn"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Account account : accounts.values()) { - estore.insert(account); - } - for (Company company : companys.values()) { - estore.insert(company); - } - for (Loan loan : loans.values()) { - estore.insert(loan); - } - for (Medium medium : mediums.values()) { - estore.insert(medium); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long personId = Long.parseLong(csvRecord.get("personId")); - String personName = csvRecord.get("personName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String gender = csvRecord.get("gender"); - String birthday = csvRecord.get("birthday"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - - persons.put( - personId, - (new Person( - personId, personName, isBlocked, createTime, gender, birthday, country, city))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertAccounts(String filePath, HashMap accounts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long accountId = Long.parseLong(csvRecord.get("accountId")); - String createTime = csvRecord.get("createTime"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String accountType = csvRecord.get("accoutType"); - String nickname = csvRecord.get("nickname"); - String phonenum = csvRecord.get("phonenum"); - String email = csvRecord.get("email"); - String freqLoginType = csvRecord.get("freqLoginType"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String accountLevel = csvRecord.get("accountLevel"); - - accounts.put( - accountId, - new Account( - accountId, - createTime, - isBlocked, - accountType, - nickname, - phonenum, - email, - freqLoginType, - lastLoginTime, - accountLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertCompanys(String filePath, HashMap companys) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long companyId = Long.parseLong(csvRecord.get("companyId")); - String companyName = csvRecord.get("companyName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - String business = csvRecord.get("business"); - String description = csvRecord.get("description"); - String url = csvRecord.get("url"); - - companys.put( - companyId, - new Company( - companyId, - companyName, - isBlocked, - createTime, - country, - city, - business, - description, - url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertLoans(String filePath, HashMap loans) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long loanId = Long.parseLong(csvRecord.get("loanId")); - double loanAmount = Double.parseDouble(csvRecord.get("loanAmount")); - double balance = Double.parseDouble(csvRecord.get("balance")); - String createTime = csvRecord.get("createTime"); - String loanUsage = csvRecord.get("loanUsage"); - double interestRate = Double.parseDouble(csvRecord.get("interestRate")); - - loans.put( - loanId, new Loan(loanId, loanAmount, balance, createTime, loanUsage, interestRate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertMediums(String filePath, HashMap mediums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long mediumId = Long.parseLong(csvRecord.get("mediumId")); - String mediumType = csvRecord.get("mediumType"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String riskLevel = csvRecord.get("riskLevel"); - - mediums.put( - mediumId, - new Medium(mediumId, mediumType, isBlocked, createTime, lastLoginTime, riskLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest3.java b/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest3.java deleted file mode 100644 index 0d37382..0000000 --- a/eval/estore/ldbc/finbench/src/test/java/org/estore/eval/estore/ldbc/finbench/InGraphUnsafeTest3.java +++ /dev/null @@ -1,431 +0,0 @@ -package org.estore.eval.estore.ldbc.finbench; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.finbench.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -public class InGraphUnsafeTest3 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - - readDataSet(); - } - - @Test - public void testTw1() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 1, personName:" - + " 'George'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1020342322, createTime: '26th March', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw2() { - Table result = - estore.query( - "CREATE (:`org.estore.eval.estore.ldbc.finbench.util.Company` {companyId: 12345," - + " companyName: 'Rand'})-[:Own]->(:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 1213243435, createTime: 'February 5th', isBlocked: False," - + " accountType: 'brokerage account'})"); - } - - @Test - public void testTw3() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972}), (src:`org.estore.eval.estore.ldbc.finbench.util.Account`" - + " {accountId: 99079191802151398}) CREATE (dst)-[:Transfer]->(src)"); - } - - @Test - public void testTw4() { - Table result = - estore.query( - " MATCH (dst:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4619004367821865972, accountType:'card'})," - + " (src:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 99079191802151398}) CREATE (dst)-[:Withdraw]->(src)"); - } - - @Test - public void testTw8() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (loan)-[:Deposit]->(acc)"); - } - - @Test - public void testTw9() { - Table result = - estore.query( - "MATCH (acc:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}), (loan:`org.estore.eval.estore.ldbc.finbench.util.Loan`" - + " {loanId: 4684025087442027461}) CREATE (acc)-[:Repay]->(loan)"); - } - - @Test - public void testTw13() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 2199023255767})," - + " (p2:`org.estore.eval.estore.ldbc.finbench.util.Person` {personId: 10995116278183})" - + " CREATE (p1)<-[:Guarantee]-(p2)"); - } - - @Test - public void testTsr1() { - Table result = - estore.query( - "MATCH (account:`org.estore.eval.estore.ldbc.finbench.util.Account` {accountId:" - + " 4700350636091245930}) RETURN account.createTime, account.isBlocked," - + " account.accountType"); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap accounts = new HashMap(); - HashMap companys = new HashMap(); - HashMap loans = new HashMap(); - HashMap mediums = new HashMap(); - - String datasetPath = "/sf3"; - - // Nodes - insertAccounts(datasetPath + "/" + "snapshot/Account.csv", accounts); - insertCompanys(datasetPath + "/" + "snapshot/Company.csv", companys); - insertLoans(datasetPath + "/" + "snapshot/Loan.csv", loans); - insertMediums(datasetPath + "/" + "snapshot/Medium.csv", mediums); - insertPersons(datasetPath + "/" + "snapshot/Person.csv", persons); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountRepayLoan.csv", - Account.class, - Loan.class, - accounts, - loans, - "setRepay"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountTransferAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setTransfer"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/AccountWithdrawAccount.csv", - Account.class, - Account.class, - accounts, - accounts, - "setWithdraw"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyApplyLoan.csv", - Company.class, - Loan.class, - companys, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyGuaranteeCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyInvestCompany.csv", - Company.class, - Company.class, - companys, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/CompanyOwnAccount.csv", - Company.class, - Account.class, - companys, - accounts, - "setOwn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/LoanDepositAccount.csv", - Loan.class, - Account.class, - loans, - accounts, - "setDeposit"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/MediumSignInAccount.csv", - Medium.class, - Account.class, - mediums, - accounts, - "setSignIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonApplyLoan.csv", - Person.class, - Loan.class, - persons, - loans, - "setApply"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonGuaranteePerson.csv", - Person.class, - Person.class, - persons, - persons, - "setGuarantee"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonInvestCompany.csv", - Person.class, - Company.class, - persons, - companys, - "setInvest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "snapshot/PersonOwnAccount.csv", - Person.class, - Account.class, - persons, - accounts, - "setOwn"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Account account : accounts.values()) { - estore.insert(account); - } - for (Company company : companys.values()) { - estore.insert(company); - } - for (Loan loan : loans.values()) { - estore.insert(loan); - } - for (Medium medium : mediums.values()) { - estore.insert(medium); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long personId = Long.parseLong(csvRecord.get("personId")); - String personName = csvRecord.get("personName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String gender = csvRecord.get("gender"); - String birthday = csvRecord.get("birthday"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - - persons.put( - personId, - (new Person( - personId, personName, isBlocked, createTime, gender, birthday, country, city))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertAccounts(String filePath, HashMap accounts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long accountId = Long.parseLong(csvRecord.get("accountId")); - String createTime = csvRecord.get("createTime"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String accountType = csvRecord.get("accoutType"); - String nickname = csvRecord.get("nickname"); - String phonenum = csvRecord.get("phonenum"); - String email = csvRecord.get("email"); - String freqLoginType = csvRecord.get("freqLoginType"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String accountLevel = csvRecord.get("accountLevel"); - - accounts.put( - accountId, - new Account( - accountId, - createTime, - isBlocked, - accountType, - nickname, - phonenum, - email, - freqLoginType, - lastLoginTime, - accountLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertCompanys(String filePath, HashMap companys) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long companyId = Long.parseLong(csvRecord.get("companyId")); - String companyName = csvRecord.get("companyName"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - String country = csvRecord.get("country"); - String city = csvRecord.get("city"); - String business = csvRecord.get("business"); - String description = csvRecord.get("description"); - String url = csvRecord.get("url"); - - companys.put( - companyId, - new Company( - companyId, - companyName, - isBlocked, - createTime, - country, - city, - business, - description, - url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertLoans(String filePath, HashMap loans) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long loanId = Long.parseLong(csvRecord.get("loanId")); - double loanAmount = Double.parseDouble(csvRecord.get("loanAmount")); - double balance = Double.parseDouble(csvRecord.get("balance")); - String createTime = csvRecord.get("createTime"); - String loanUsage = csvRecord.get("loanUsage"); - double interestRate = Double.parseDouble(csvRecord.get("interestRate")); - - loans.put( - loanId, new Loan(loanId, loanAmount, balance, createTime, loanUsage, interestRate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertMediums(String filePath, HashMap mediums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long mediumId = Long.parseLong(csvRecord.get("mediumId")); - String mediumType = csvRecord.get("mediumType"); - boolean isBlocked = Boolean.parseBoolean(csvRecord.get("isBlocked")); - String createTime = csvRecord.get("createTime"); - long lastLoginTime = Long.parseLong(csvRecord.get("lastLoginTime")); - String riskLevel = csvRecord.get("riskLevel"); - - mediums.put( - mediumId, - new Medium(mediumId, mediumType, isBlocked, createTime, lastLoginTime, riskLevel)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest01.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest01.java index 9f5ca42..6a3ecbe 100644 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest01.java +++ b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest01.java @@ -24,7 +24,7 @@ public class InGraphReflectionTest01 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest03.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest03.java index c6ea4c2..271d83e 100644 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest03.java +++ b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest03.java @@ -24,7 +24,7 @@ public class InGraphReflectionTest03 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest1.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest1.java index 5dbcd88..67afbdb 100644 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest1.java +++ b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest1.java @@ -24,7 +24,7 @@ public class InGraphReflectionTest1 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest10.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest10.java index 5b0da17..cc5498e 100644 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest10.java +++ b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest10.java @@ -24,7 +24,7 @@ public class InGraphReflectionTest10 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest3.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest3.java index ac8ce28..a278be3 100644 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest3.java +++ b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphReflectionTest3.java @@ -24,7 +24,7 @@ public class InGraphReflectionTest3 { @BeforeEach public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(false).profile(true)); + estore = new Estore("myDb", new EstoreOptions().profile(true)); readDataSet(); } diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest01.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest01.java deleted file mode 100644 index cec2a09..0000000 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest01.java +++ /dev/null @@ -1,585 +0,0 @@ -package org.estore.eval.estore.ldbc.snb; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.snb.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTest01 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - readDataSet(); - } - - @Test - public void testInteractiveDeleteQuery2() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:10995116278291})-[likes:LIKES2]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Post;`" - + " {id:343597383821}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - @Test - public void testInteractiveDeleteQuery3() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:19791209300608})-[likes:LIKES1]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Comment;`" - + " {id:549755814421}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - @Test - public void testInteractiveDeleteQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Forum`" - + " {id:481036337162})-[hasMember:HAS_MEMBER]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`" - + " {id:2199023256077}) DELETE hasMember RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - @Test - public void testInteractiveShortQuery1() { - Table result = - estore.query( - "MATCH (n:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:32985348833679})-[:IS_LOCATED_IN]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Place;`)" - + " RETURN n.firstName AS firstName, n.lastName AS lastName, n.birthday AS" - + " birthday, n.locationIP AS locationIP, n.browserUsed AS browserUsed, p.id AS" - + " cityId, n.gender AS gender, n.creationDate AS creationDate"); - assertEquals(result.get("birthday").get(0), 579484800000L); - assertEquals(result.get("firstName").get(0), "Min-Jung"); - assertEquals(result.get("lastName").get(0), "Park"); - assertEquals(result.get("gender").get(0), "female"); - assertEquals(result.get("browserUsed").get(0), "Internet Explorer"); - assertEquals(result.get("locationIP").get(0), "42.18.171.166"); - assertEquals(result.get("cityId").get(0), 1342L); - assertEquals(result.get("creationDate").get(0), 1345825908405L); - } - - @Test - public void testInteractiveShortQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Comment`" - + " {id:206158430603})-[:HAS_CREATOR]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`)" - + " RETURN p.id AS personId, p.firstName AS firstName, p.lastName AS lastName"); - assertEquals(result.get("firstName").get(0), "Rudolf"); - assertEquals(result.get("lastName").get(0), "Engel"); - assertEquals(result.get("personId").get(0), 2199023256437L); - } - - @Test - public void testInteractiveUpdateQuery2() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:10995116278291})," - + " (post:`org.estore.eval.estore.ldbc.snb.util.Post` {id:481036337280}) CREATE" - + " (person)-[r:LIKES2]->(post) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - @Test - public void testInteractiveUpdateQuery3() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:19791209301454})," - + " (comment:`org.estore.eval.estore.ldbc.snb.util.Comment` {id:481036337631}) CREATE" - + " (person)-[r:LIKES1]->(comment) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - @Test - public void testInteractiveUpdateQuery5() { - Table result = - estore.query( - "MATCH (f:`org.estore.eval.estore.ldbc.snb.util.Forum` {id:549755813984})," - + " (p:`org.estore.eval.estore.ldbc.snb.util.Person` {id:19791209300852}) CREATE" - + " (f)-[r:HAS_MEMBER]->(p) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - @Test - public void testInteractiveUpdateQuery8() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.snb.util.Person` {id:4398046512167})," - + " (p2:`org.estore.eval.estore.ldbc.snb.util.Person` {id:2199023256816}) CREATE" - + " (p1)-[r:KNOWS]->(p2) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap places = new HashMap(); - HashMap tags = new HashMap(); - HashMap tagclasses = new HashMap(); - HashMap comments = new HashMap(); - HashMap forums = new HashMap(); - HashMap posts = new HashMap(); - HashMap organisations = new HashMap(); - - String datasetPath = "/social_network-csv_composite-longdateformatter-sf0.1"; - - // Nodes - insertPlaces(datasetPath + "/" + "static/place_0_0.csv", places); - insertTagClasses(datasetPath + "/" + "static/tagclass_0_0.csv", tagclasses); - insertTags(datasetPath + "/" + "static/tag_0_0.csv", tags); - insertForums(datasetPath + "/" + "dynamic/forum_0_0.csv", forums); - insertPersons(datasetPath + "/" + "dynamic/person_0_0.csv", persons); - insertComments(datasetPath + "/" + "dynamic/comment_0_0.csv", comments); - insertPosts(datasetPath + "/" + "dynamic/post_0_0.csv", posts); - insertOrganisations(datasetPath + "/" + "static/organisation_0_0.csv", organisations); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/place_isPartOf_place_0_0.csv", - Place.class, - Place.class, - places, - places, - "setIsPartOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_isLocatedIn_place_0_0.csv", - Person.class, - Place.class, - persons, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tag_hasType_tagclass_0_0.csv", - Tag.class, - TagClass.class, - tags, - tagclasses, - "setHasType"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasCreator_person_0_0.csv", - Comment.class, - Person.class, - comments, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_isLocatedIn_place_0_0.csv", - Comment.class, - Place.class, - comments, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_comment_0_0.csv", - Comment.class, - Comment.class, - comments, - comments, - "setIsReplyOf1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_post_0_0.csv", - Comment.class, - Post.class, - comments, - posts, - "setIsReplyOf2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_containerOf_post_0_0.csv", - Forum.class, - Post.class, - forums, - posts, - "setContainerOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasMember_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasMember"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasModerator_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasModerator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasTag_tag_0_0.csv", - Forum.class, - Tag.class, - forums, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_hasInterest_tag_0_0.csv", - Person.class, - Tag.class, - persons, - tags, - "setHasInterest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_knows_person_0_0.csv", - Person.class, - Person.class, - persons, - persons, - "setKnows"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_comment_0_0.csv", - Person.class, - Comment.class, - persons, - comments, - "setLikes1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_post_0_0.csv", - Person.class, - Post.class, - persons, - posts, - "setLikes2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasCreator_person_0_0.csv", - Post.class, - Person.class, - posts, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasTag_tag_0_0.csv", - Comment.class, - Tag.class, - comments, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasTag_tag_0_0.csv", - Post.class, - Tag.class, - posts, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_isLocatedIn_place_0_0.csv", - Post.class, - Place.class, - posts, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_studyAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setStudyAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_workAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setWorkAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/organisation_isLocatedIn_place_0_0.csv", - Organisation.class, - Place.class, - organisations, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tagclass_isSubclassOf_tagclass_0_0.csv", - TagClass.class, - TagClass.class, - tagclasses, - tagclasses, - "setIsSubclassOf"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Place place : places.values()) { - estore.insert(place); - } - for (TagClass tagclass : tagclasses.values()) { - estore.insert(tagclass); - } - for (Tag tag : tags.values()) { - estore.insert(tag); - } - for (Post post : posts.values()) { - estore.insert(post); - } - for (Comment comment : comments.values()) { - estore.insert(comment); - } - for (Forum forum : forums.values()) { - estore.insert(forum); - } - for (Organisation organisation : organisations.values()) { - estore.insert(organisation); - } - } - - private void insertPlaces(String filePath, HashMap places) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - String type = csvRecord.get("type"); - places.put(id, (new Place(id, name, url, type))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTagClasses(String filePath, HashMap tagclasses) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tagclasses.put(id, new TagClass(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTags(String filePath, HashMap tags) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tags.put(id, new Tag(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertOrganisations(String filePath, HashMap organisations) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String type = csvRecord.get("type"); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - organisations.put(id, new Organisation(id, type, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertForums(String filePath, HashMap forums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String title = csvRecord.get("title"); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - - forums.put(id, new Forum(id, title, creationDate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String firstName = csvRecord.get("firstName"); - String lastName = csvRecord.get("lastName"); - String gender = csvRecord.get("gender"); - long birthday = Long.parseLong(csvRecord.get("birthday")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String email = csvRecord.get("email"); - - persons.put( - id, - new Person( - id, - firstName, - lastName, - gender, - birthday, - creationDate, - locationIP, - browserUsed, - language, - email)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertComments(String filePath, HashMap comments) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - comments.put(id, new Comment(id, creationDate, locationIP, browserUsed, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPosts(String filePath, HashMap posts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - posts.put( - id, new Post(id, creationDate, locationIP, browserUsed, language, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest03.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest03.java deleted file mode 100644 index 27f1533..0000000 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest03.java +++ /dev/null @@ -1,595 +0,0 @@ -package org.estore.eval.estore.ldbc.snb; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.snb.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTest03 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - readDataSet(); - } - - // - @Test - public void testInteractiveDeleteQuery2() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:24189255814068})-[likes:LIKES2]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Post;`" - + " {id:481036337191}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery3() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:2199023256437})-[likes:LIKES1]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Comment;`" - + " {id:1030792151057}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Forum`" - + " {id:893353197569})-[hasMember:HAS_MEMBER]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`" - + " {id:24189255814068}) DELETE hasMember RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveShortQuery1() { - Table result = - estore.query( - "MATCH (n:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:32985348833679})-[:IS_LOCATED_IN]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Place;`)" - + " RETURN n.firstName AS firstName, n.lastName AS lastName, n.birthday AS" - + " birthday, n.locationIP AS locationIP, n.browserUsed AS browserUsed, p.id AS" - + " cityId, n.gender AS gender, n.creationDate AS creationDate"); - assertEquals(result.get("birthday").get(0), 579484800000L); - assertEquals(result.get("firstName").get(0), "Min-Jung"); - assertEquals(result.get("lastName").get(0), "Park"); - assertEquals(result.get("gender").get(0), "female"); - assertEquals(result.get("browserUsed").get(0), "Internet Explorer"); - assertEquals(result.get("locationIP").get(0), "42.18.171.166"); - assertEquals(result.get("cityId").get(0), 1342L); - assertEquals(result.get("creationDate").get(0), 1345825908405L); - } - - // - @Test - public void testInteractiveShortQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Comment`" - + " {id:1030792151047})-[:HAS_CREATOR]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`)" - + " RETURN p.id AS personId, p.firstName AS firstName, p.lastName AS lastName"); - assertEquals(result.get("firstName").get(0), "Rudolf"); - assertEquals(result.get("lastName").get(0), "Engel"); - assertEquals(result.get("personId").get(0), 2199023256437L); - } - - // - @Test - public void testInteractiveUpdateQuery2() { - - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:15393162790400})," - + " (post:`org.estore.eval.estore.ldbc.snb.util.Post` {id:206158430485}) CREATE" - + " (person)-[r:LIKES2]->(post) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery3() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:6597069769310})," - + " (comment:`org.estore.eval.estore.ldbc.snb.util.Comment` {id:962072676825}) CREATE" - + " (person)-[r:LIKES1]->(comment) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery5() { - Table result = - estore.query( - "MATCH (f:`org.estore.eval.estore.ldbc.snb.util.Forum` {id:893353197569})," - + " (p:`org.estore.eval.estore.ldbc.snb.util.Person` {id:15393162790400}) CREATE" - + " (f)-[r:HAS_MEMBER]->(p) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery8() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.snb.util.Person` {id:2199023256684})," - + " (p2:`org.estore.eval.estore.ldbc.snb.util.Person` {id:4398046513209}) CREATE" - + " (p1)-[r:KNOWS]->(p2) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap places = new HashMap(); - HashMap tags = new HashMap(); - HashMap tagclasses = new HashMap(); - HashMap comments = new HashMap(); - HashMap forums = new HashMap(); - HashMap posts = new HashMap(); - HashMap organisations = new HashMap(); - - String datasetPath = "/social_network-csv_composite-longdateformatter-sf0.3"; - - // Nodes - insertPlaces(datasetPath + "/" + "static/place_0_0.csv", places); - insertTagClasses(datasetPath + "/" + "static/tagclass_0_0.csv", tagclasses); - insertTags(datasetPath + "/" + "static/tag_0_0.csv", tags); - insertForums(datasetPath + "/" + "dynamic/forum_0_0.csv", forums); - insertPersons(datasetPath + "/" + "dynamic/person_0_0.csv", persons); - insertComments(datasetPath + "/" + "dynamic/comment_0_0.csv", comments); - insertPosts(datasetPath + "/" + "dynamic/post_0_0.csv", posts); - insertOrganisations(datasetPath + "/" + "static/organisation_0_0.csv", organisations); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/place_isPartOf_place_0_0.csv", - Place.class, - Place.class, - places, - places, - "setIsPartOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_isLocatedIn_place_0_0.csv", - Person.class, - Place.class, - persons, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tag_hasType_tagclass_0_0.csv", - Tag.class, - TagClass.class, - tags, - tagclasses, - "setHasType"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasCreator_person_0_0.csv", - Comment.class, - Person.class, - comments, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_isLocatedIn_place_0_0.csv", - Comment.class, - Place.class, - comments, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_comment_0_0.csv", - Comment.class, - Comment.class, - comments, - comments, - "setIsReplyOf1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_post_0_0.csv", - Comment.class, - Post.class, - comments, - posts, - "setIsReplyOf2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_containerOf_post_0_0.csv", - Forum.class, - Post.class, - forums, - posts, - "setContainerOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasMember_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasMember"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasModerator_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasModerator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasTag_tag_0_0.csv", - Forum.class, - Tag.class, - forums, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_hasInterest_tag_0_0.csv", - Person.class, - Tag.class, - persons, - tags, - "setHasInterest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_knows_person_0_0.csv", - Person.class, - Person.class, - persons, - persons, - "setKnows"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_comment_0_0.csv", - Person.class, - Comment.class, - persons, - comments, - "setLikes1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_post_0_0.csv", - Person.class, - Post.class, - persons, - posts, - "setLikes2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasCreator_person_0_0.csv", - Post.class, - Person.class, - posts, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasTag_tag_0_0.csv", - Comment.class, - Tag.class, - comments, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasTag_tag_0_0.csv", - Post.class, - Tag.class, - posts, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_isLocatedIn_place_0_0.csv", - Post.class, - Place.class, - posts, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_studyAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setStudyAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_workAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setWorkAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/organisation_isLocatedIn_place_0_0.csv", - Organisation.class, - Place.class, - organisations, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tagclass_isSubclassOf_tagclass_0_0.csv", - TagClass.class, - TagClass.class, - tagclasses, - tagclasses, - "setIsSubclassOf"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Place place : places.values()) { - estore.insert(place); - } - for (TagClass tagclass : tagclasses.values()) { - estore.insert(tagclass); - } - for (Tag tag : tags.values()) { - estore.insert(tag); - } - for (Post post : posts.values()) { - estore.insert(post); - } - for (Comment comment : comments.values()) { - estore.insert(comment); - } - for (Forum forum : forums.values()) { - estore.insert(forum); - } - for (Organisation organisation : organisations.values()) { - estore.insert(organisation); - } - } - - private void insertPlaces(String filePath, HashMap places) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - String type = csvRecord.get("type"); - places.put(id, (new Place(id, name, url, type))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTagClasses(String filePath, HashMap tagclasses) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tagclasses.put(id, new TagClass(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTags(String filePath, HashMap tags) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tags.put(id, new Tag(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertOrganisations(String filePath, HashMap organisations) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String type = csvRecord.get("type"); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - organisations.put(id, new Organisation(id, type, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertForums(String filePath, HashMap forums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String title = csvRecord.get("title"); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - - forums.put(id, new Forum(id, title, creationDate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String firstName = csvRecord.get("firstName"); - String lastName = csvRecord.get("lastName"); - String gender = csvRecord.get("gender"); - long birthday = Long.parseLong(csvRecord.get("birthday")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String email = csvRecord.get("email"); - - persons.put( - id, - new Person( - id, - firstName, - lastName, - gender, - birthday, - creationDate, - locationIP, - browserUsed, - language, - email)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertComments(String filePath, HashMap comments) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - comments.put(id, new Comment(id, creationDate, locationIP, browserUsed, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPosts(String filePath, HashMap posts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - posts.put( - id, new Post(id, creationDate, locationIP, browserUsed, language, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest1.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest1.java deleted file mode 100644 index a45f37e..0000000 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest1.java +++ /dev/null @@ -1,595 +0,0 @@ -package org.estore.eval.estore.ldbc.snb; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.snb.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTest1 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - readDataSet(); - } - - // - - @Test - public void testInteractiveDeleteQuery2() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:6597069777240})-[likes:LIKES2]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Post;`" - + " {id:1374389534822}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery3() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:32985348833579})-[likes:LIKES1]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Comment;`" - + " {id:2061584302097}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Forum`" - + " {id:1786706395137})-[hasMember:HAS_MEMBER]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`" - + " {id:6597069777240}) DELETE hasMember RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveShortQuery1() { - Table result = - estore.query( - "MATCH (n:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:32985348833679})-[:IS_LOCATED_IN]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Place;`)" - + " RETURN n.firstName AS firstName, n.lastName AS lastName, n.birthday AS" - + " birthday, n.locationIP AS locationIP, n.browserUsed AS browserUsed, p.id AS" - + " cityId, n.gender AS gender, n.creationDate AS creationDate"); - assertEquals(result.get("birthday").get(0), 579484800000L); - assertEquals(result.get("firstName").get(0), "Min-Jung"); - assertEquals(result.get("lastName").get(0), "Park"); - assertEquals(result.get("gender").get(0), "female"); - assertEquals(result.get("browserUsed").get(0), "Internet Explorer"); - assertEquals(result.get("locationIP").get(0), "42.18.171.166"); - assertEquals(result.get("cityId").get(0), 1342L); - assertEquals(result.get("creationDate").get(0), 1345825908405L); - } - - // - @Test - public void testInteractiveShortQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Comment`" - + " {id:1511828523046})-[:HAS_CREATOR]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`)" - + " RETURN p.id AS personId, p.firstName AS firstName, p.lastName AS lastName"); - assertEquals(result.get("firstName").get(0), "Rudolf"); - assertEquals(result.get("lastName").get(0), "Engel"); - assertEquals(result.get("personId").get(0), 2199023256437L); - } - - // - @Test - public void testInteractiveUpdateQuery2() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:6597069777240})," - + " (post:`org.estore.eval.estore.ldbc.snb.util.Post` {id:549755815810}) CREATE" - + " (person)-[r:LIKES2]->(post) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery3() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:10995116284808})," - + " (comment:`org.estore.eval.estore.ldbc.snb.util.Comment` {id:824633722450}) CREATE" - + " (person)-[:LIKES1]->(comment) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery5() { - Table result = - estore.query( - "MATCH (f:`org.estore.eval.estore.ldbc.snb.util.Forum` {id:1374389534723})," - + " (p:`org.estore.eval.estore.ldbc.snb.util.Person` {id:32985348838375}) CREATE" - + " (f)-[:HAS_MEMBER]->(p) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery8() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.snb.util.Person` {id:2199023256684})," - + " (p2:`org.estore.eval.estore.ldbc.snb.util.Person` {id:21990232560132}) CREATE" - + " (p1)-[:KNOWS]->(p2) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap places = new HashMap(); - HashMap tags = new HashMap(); - HashMap tagclasses = new HashMap(); - HashMap comments = new HashMap(); - HashMap forums = new HashMap(); - HashMap posts = new HashMap(); - HashMap organisations = new HashMap(); - - String datasetPath = "/social_network-csv_composite-longdateformatter-sf1"; - - // Nodes - insertPlaces(datasetPath + "/" + "static/place_0_0.csv", places); - insertTagClasses(datasetPath + "/" + "static/tagclass_0_0.csv", tagclasses); - insertTags(datasetPath + "/" + "static/tag_0_0.csv", tags); - insertForums(datasetPath + "/" + "dynamic/forum_0_0.csv", forums); - insertPersons(datasetPath + "/" + "dynamic/person_0_0.csv", persons); - insertComments(datasetPath + "/" + "dynamic/comment_0_0.csv", comments); - insertPosts(datasetPath + "/" + "dynamic/post_0_0.csv", posts); - insertOrganisations(datasetPath + "/" + "static/organisation_0_0.csv", organisations); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/place_isPartOf_place_0_0.csv", - Place.class, - Place.class, - places, - places, - "setIsPartOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_isLocatedIn_place_0_0.csv", - Person.class, - Place.class, - persons, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tag_hasType_tagclass_0_0.csv", - Tag.class, - TagClass.class, - tags, - tagclasses, - "setHasType"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasCreator_person_0_0.csv", - Comment.class, - Person.class, - comments, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_isLocatedIn_place_0_0.csv", - Comment.class, - Place.class, - comments, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_comment_0_0.csv", - Comment.class, - Comment.class, - comments, - comments, - "setIsReplyOf1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_post_0_0.csv", - Comment.class, - Post.class, - comments, - posts, - "setIsReplyOf2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_containerOf_post_0_0.csv", - Forum.class, - Post.class, - forums, - posts, - "setContainerOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasMember_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasMember"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasModerator_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasModerator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasTag_tag_0_0.csv", - Forum.class, - Tag.class, - forums, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_hasInterest_tag_0_0.csv", - Person.class, - Tag.class, - persons, - tags, - "setHasInterest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_knows_person_0_0.csv", - Person.class, - Person.class, - persons, - persons, - "setKnows"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_comment_0_0.csv", - Person.class, - Comment.class, - persons, - comments, - "setLikes1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_post_0_0.csv", - Person.class, - Post.class, - persons, - posts, - "setLikes2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasCreator_person_0_0.csv", - Post.class, - Person.class, - posts, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasTag_tag_0_0.csv", - Comment.class, - Tag.class, - comments, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasTag_tag_0_0.csv", - Post.class, - Tag.class, - posts, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_isLocatedIn_place_0_0.csv", - Post.class, - Place.class, - posts, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_studyAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setStudyAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_workAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setWorkAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/organisation_isLocatedIn_place_0_0.csv", - Organisation.class, - Place.class, - organisations, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tagclass_isSubclassOf_tagclass_0_0.csv", - TagClass.class, - TagClass.class, - tagclasses, - tagclasses, - "setIsSubclassOf"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Place place : places.values()) { - estore.insert(place); - } - for (TagClass tagclass : tagclasses.values()) { - estore.insert(tagclass); - } - for (Tag tag : tags.values()) { - estore.insert(tag); - } - for (Post post : posts.values()) { - estore.insert(post); - } - for (Comment comment : comments.values()) { - estore.insert(comment); - } - for (Forum forum : forums.values()) { - estore.insert(forum); - } - for (Organisation organisation : organisations.values()) { - estore.insert(organisation); - } - } - - private void insertPlaces(String filePath, HashMap places) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - String type = csvRecord.get("type"); - places.put(id, (new Place(id, name, url, type))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTagClasses(String filePath, HashMap tagclasses) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tagclasses.put(id, new TagClass(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTags(String filePath, HashMap tags) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tags.put(id, new Tag(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertOrganisations(String filePath, HashMap organisations) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String type = csvRecord.get("type"); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - organisations.put(id, new Organisation(id, type, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertForums(String filePath, HashMap forums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String title = csvRecord.get("title"); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - - forums.put(id, new Forum(id, title, creationDate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String firstName = csvRecord.get("firstName"); - String lastName = csvRecord.get("lastName"); - String gender = csvRecord.get("gender"); - long birthday = Long.parseLong(csvRecord.get("birthday")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String email = csvRecord.get("email"); - - persons.put( - id, - new Person( - id, - firstName, - lastName, - gender, - birthday, - creationDate, - locationIP, - browserUsed, - language, - email)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertComments(String filePath, HashMap comments) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - comments.put(id, new Comment(id, creationDate, locationIP, browserUsed, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPosts(String filePath, HashMap posts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - posts.put( - id, new Post(id, creationDate, locationIP, browserUsed, language, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest10.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest10.java deleted file mode 100644 index 9e92297..0000000 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest10.java +++ /dev/null @@ -1,594 +0,0 @@ -package org.estore.eval.estore.ldbc.snb; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.snb.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTest10 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - readDataSet(); - } - - // - @Test - public void testInteractiveDeleteQuery2() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:6597069780295})-[likes:LIKES2]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Post;`" - + " {id:7146825580576}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery3() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:6597069815834})-[likes:LIKES1]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Comment;`" - + " {id:8246337208337}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Forum`" - + " {id:1099511627777})-[hasMember:HAS_MEMBER]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`" - + " {id:6597069780295}) DELETE hasMember RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveShortQuery1() { - Table result = - estore.query( - "MATCH (n:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:32985348833679})-[:IS_LOCATED_IN]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Place;`)" - + " RETURN n.firstName AS firstName, n.lastName AS lastName, n.birthday AS" - + " birthday, n.locationIP AS locationIP, n.browserUsed AS browserUsed, p.id AS" - + " cityId, n.gender AS gender, n.creationDate AS creationDate"); - assertEquals(result.get("birthday").get(0), 579484800000L); - assertEquals(result.get("firstName").get(0), "Min-Jung"); - assertEquals(result.get("lastName").get(0), "Park"); - assertEquals(result.get("gender").get(0), "female"); - assertEquals(result.get("browserUsed").get(0), "Internet Explorer"); - assertEquals(result.get("locationIP").get(0), "42.18.171.166"); - assertEquals(result.get("cityId").get(0), 1342L); - assertEquals(result.get("creationDate").get(0), 1345825908405L); - } - - // - @Test - public void testInteractiveShortQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Comment`" - + " {id:7146825883053})-[:HAS_CREATOR]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`)" - + " RETURN p.id AS personId, p.firstName AS firstName, p.lastName AS lastName"); - assertEquals(result.get("firstName").get(0), "Rudolf"); - assertEquals(result.get("lastName").get(0), "Engel"); - assertEquals(result.get("personId").get(0), 2199023256437L); - } - - // - @Test - public void testInteractiveUpdateQuery2() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:6597069815834})," - + " (post:`org.estore.eval.estore.ldbc.snb.util.Post` {id:6047313953017}) CREATE" - + " (person)-[r:LIKES2]->(post) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery3() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:6597069780295})," - + " (comment:`org.estore.eval.estore.ldbc.snb.util.Comment` {id:3848290697802}) CREATE" - + " (person)-[r:LIKES1]->(comment) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery5() { - Table result = - estore.query( - "MATCH (f:`org.estore.eval.estore.ldbc.snb.util.Forum` {id:1099511627777})," - + " (p:`org.estore.eval.estore.ldbc.snb.util.Person` {id:8796093058058}) CREATE" - + " (f)-[r:HAS_MEMBER]->(p) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery8() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.snb.util.Person` {id:2199023256684})," - + " (p2:`org.estore.eval.estore.ldbc.snb.util.Person` {id:17592186114273}) CREATE" - + " (p1)-[r:KNOWS]->(p2) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap places = new HashMap(); - HashMap tags = new HashMap(); - HashMap tagclasses = new HashMap(); - HashMap comments = new HashMap(); - HashMap forums = new HashMap(); - HashMap posts = new HashMap(); - HashMap organisations = new HashMap(); - - String datasetPath = "/social_network-csv_composite-longdateformatter-sf10"; - - // Nodes - insertPlaces(datasetPath + "/" + "static/place_0_0.csv", places); - insertTagClasses(datasetPath + "/" + "static/tagclass_0_0.csv", tagclasses); - insertTags(datasetPath + "/" + "static/tag_0_0.csv", tags); - insertForums(datasetPath + "/" + "dynamic/forum_0_0.csv", forums); - insertPersons(datasetPath + "/" + "dynamic/person_0_0.csv", persons); - insertComments(datasetPath + "/" + "dynamic/comment_0_0.csv", comments); - insertPosts(datasetPath + "/" + "dynamic/post_0_0.csv", posts); - insertOrganisations(datasetPath + "/" + "static/organisation_0_0.csv", organisations); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/place_isPartOf_place_0_0.csv", - Place.class, - Place.class, - places, - places, - "setIsPartOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_isLocatedIn_place_0_0.csv", - Person.class, - Place.class, - persons, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tag_hasType_tagclass_0_0.csv", - Tag.class, - TagClass.class, - tags, - tagclasses, - "setHasType"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasCreator_person_0_0.csv", - Comment.class, - Person.class, - comments, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_isLocatedIn_place_0_0.csv", - Comment.class, - Place.class, - comments, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_comment_0_0.csv", - Comment.class, - Comment.class, - comments, - comments, - "setIsReplyOf1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_post_0_0.csv", - Comment.class, - Post.class, - comments, - posts, - "setIsReplyOf2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_containerOf_post_0_0.csv", - Forum.class, - Post.class, - forums, - posts, - "setContainerOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasMember_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasMember"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasModerator_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasModerator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasTag_tag_0_0.csv", - Forum.class, - Tag.class, - forums, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_hasInterest_tag_0_0.csv", - Person.class, - Tag.class, - persons, - tags, - "setHasInterest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_knows_person_0_0.csv", - Person.class, - Person.class, - persons, - persons, - "setKnows"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_comment_0_0.csv", - Person.class, - Comment.class, - persons, - comments, - "setLikes1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_post_0_0.csv", - Person.class, - Post.class, - persons, - posts, - "setLikes2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasCreator_person_0_0.csv", - Post.class, - Person.class, - posts, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasTag_tag_0_0.csv", - Comment.class, - Tag.class, - comments, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasTag_tag_0_0.csv", - Post.class, - Tag.class, - posts, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_isLocatedIn_place_0_0.csv", - Post.class, - Place.class, - posts, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_studyAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setStudyAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_workAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setWorkAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/organisation_isLocatedIn_place_0_0.csv", - Organisation.class, - Place.class, - organisations, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tagclass_isSubclassOf_tagclass_0_0.csv", - TagClass.class, - TagClass.class, - tagclasses, - tagclasses, - "setIsSubclassOf"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Place place : places.values()) { - estore.insert(place); - } - for (TagClass tagclass : tagclasses.values()) { - estore.insert(tagclass); - } - for (Tag tag : tags.values()) { - estore.insert(tag); - } - for (Post post : posts.values()) { - estore.insert(post); - } - for (Comment comment : comments.values()) { - estore.insert(comment); - } - for (Forum forum : forums.values()) { - estore.insert(forum); - } - for (Organisation organisation : organisations.values()) { - estore.insert(organisation); - } - } - - private void insertPlaces(String filePath, HashMap places) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - String type = csvRecord.get("type"); - places.put(id, (new Place(id, name, url, type))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTagClasses(String filePath, HashMap tagclasses) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tagclasses.put(id, new TagClass(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTags(String filePath, HashMap tags) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tags.put(id, new Tag(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertOrganisations(String filePath, HashMap organisations) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String type = csvRecord.get("type"); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - organisations.put(id, new Organisation(id, type, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertForums(String filePath, HashMap forums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String title = csvRecord.get("title"); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - - forums.put(id, new Forum(id, title, creationDate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String firstName = csvRecord.get("firstName"); - String lastName = csvRecord.get("lastName"); - String gender = csvRecord.get("gender"); - long birthday = Long.parseLong(csvRecord.get("birthday")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String email = csvRecord.get("email"); - - persons.put( - id, - new Person( - id, - firstName, - lastName, - gender, - birthday, - creationDate, - locationIP, - browserUsed, - language, - email)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertComments(String filePath, HashMap comments) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - comments.put(id, new Comment(id, creationDate, locationIP, browserUsed, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPosts(String filePath, HashMap posts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - posts.put( - id, new Post(id, creationDate, locationIP, browserUsed, language, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest3.java b/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest3.java deleted file mode 100644 index ef9eb20..0000000 --- a/eval/estore/ldbc/snb/src/test/java/org/estore/eval/estore/ldbc/snb/InGraphUnsafeTest3.java +++ /dev/null @@ -1,594 +0,0 @@ -package org.estore.eval.estore.ldbc.snb; - -import java.io.FileReader; -import java.io.Reader; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import org.apache.commons.csv.CSVFormat; -import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.eval.estore.ldbc.snb.util.*; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class InGraphUnsafeTest3 { - - private Estore estore; - - @BeforeEach - public void setupData() throws Exception { - estore = new Estore("myDb", new EstoreOptions().useUnsafe(true).profile(true)); - readDataSet(); - } - - // - @Test - public void testInteractiveDeleteQuery2() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:6597069786683})-[likes:LIKES2]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Post;`" - + " {id:1649267441739}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery3() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:6597069780295})-[likes:LIKES1]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Comment;`" - + " {id:4123168604177}) DELETE likes RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveDeleteQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Forum`" - + " {id:2748779069441})-[hasMember:HAS_MEMBER]->(:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`" - + " {id:6597069776731}) DELETE hasMember RETURN COUNT(m)"); - assertEquals(result.get("COUNT(m)").get(0), 1); - } - - // - @Test - public void testInteractiveShortQuery1() { - Table result = - estore.query( - "MATCH (n:`org.estore.eval.estore.ldbc.snb.util.Person`" - + " {id:32985348833679})-[:IS_LOCATED_IN]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Place;`)" - + " RETURN n.firstName AS firstName, n.lastName AS lastName, n.birthday AS" - + " birthday, n.locationIP AS locationIP, n.browserUsed AS browserUsed, p.id AS" - + " cityId, n.gender AS gender, n.creationDate AS creationDate"); - assertEquals(result.get("birthday").get(0), 579484800000L); - assertEquals(result.get("firstName").get(0), "Min-Jung"); - assertEquals(result.get("lastName").get(0), "Park"); - assertEquals(result.get("gender").get(0), "female"); - assertEquals(result.get("browserUsed").get(0), "Internet Explorer"); - assertEquals(result.get("locationIP").get(0), "42.18.171.166"); - assertEquals(result.get("cityId").get(0), 1342L); - assertEquals(result.get("creationDate").get(0), 1345825908405L); - } - - // - @Test - public void testInteractiveShortQuery5() { - Table result = - estore.query( - "MATCH (m:`org.estore.eval.estore.ldbc.snb.util.Comment`" - + " {id:2199023299651})-[:HAS_CREATOR]->(p:`[Lorg.estore.eval.estore.ldbc.snb.util.Person;`)" - + " RETURN p.id AS personId, p.firstName AS firstName, p.lastName AS lastName"); - assertEquals(result.get("firstName").get(0), "Rudolf"); - assertEquals(result.get("lastName").get(0), "Engel"); - assertEquals(result.get("personId").get(0), 2199023256437L); - } - - // - @Test - public void testInteractiveUpdateQuery2() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:6597069786683})," - + " (post:`org.estore.eval.estore.ldbc.snb.util.Post` {id:1924145349113}) CREATE" - + " (person)-[r:LIKES2]->(post) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery3() { - Table result = - estore.query( - "MATCH (person:`org.estore.eval.estore.ldbc.snb.util.Person` {id:6597069780295})," - + " (comment:`org.estore.eval.estore.ldbc.snb.util.Comment` {id:2199023256180}) CREATE" - + " (person)-[r:LIKES1]->(comment) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery5() { - Table result = - estore.query( - "MATCH (f:`org.estore.eval.estore.ldbc.snb.util.Forum` {id:2748779069441})," - + " (p:`org.estore.eval.estore.ldbc.snb.util.Person` {id:19791209317730}) CREATE" - + " (f)-[r:HAS_MEMBER]->(p) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - // - @Test - public void testInteractiveUpdateQuery8() { - Table result = - estore.query( - "MATCH (p1:`org.estore.eval.estore.ldbc.snb.util.Person` {id:2199023256684})," - + " (p2:`org.estore.eval.estore.ldbc.snb.util.Person` {id:30786325587981}) CREATE" - + " (p1)-[r:KNOWS]->(p2) RETURN COUNT(r)"); - assertEquals(result.get("COUNT(r)").get(0), 1); - } - - public void readDataSet() throws Exception { - HashMap persons = new HashMap(); - HashMap places = new HashMap(); - HashMap tags = new HashMap(); - HashMap tagclasses = new HashMap(); - HashMap comments = new HashMap(); - HashMap forums = new HashMap(); - HashMap posts = new HashMap(); - HashMap organisations = new HashMap(); - - String datasetPath = "/social_network-csv_composite-longdateformatter-sf3"; - - // Nodes - insertPlaces(datasetPath + "/" + "static/place_0_0.csv", places); - insertTagClasses(datasetPath + "/" + "static/tagclass_0_0.csv", tagclasses); - insertTags(datasetPath + "/" + "static/tag_0_0.csv", tags); - insertForums(datasetPath + "/" + "dynamic/forum_0_0.csv", forums); - insertPersons(datasetPath + "/" + "dynamic/person_0_0.csv", persons); - insertComments(datasetPath + "/" + "dynamic/comment_0_0.csv", comments); - insertPosts(datasetPath + "/" + "dynamic/post_0_0.csv", posts); - insertOrganisations(datasetPath + "/" + "static/organisation_0_0.csv", organisations); - - // Relations - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/place_isPartOf_place_0_0.csv", - Place.class, - Place.class, - places, - places, - "setIsPartOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_isLocatedIn_place_0_0.csv", - Person.class, - Place.class, - persons, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tag_hasType_tagclass_0_0.csv", - Tag.class, - TagClass.class, - tags, - tagclasses, - "setHasType"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasCreator_person_0_0.csv", - Comment.class, - Person.class, - comments, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_isLocatedIn_place_0_0.csv", - Comment.class, - Place.class, - comments, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_comment_0_0.csv", - Comment.class, - Comment.class, - comments, - comments, - "setIsReplyOf1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_replyOf_post_0_0.csv", - Comment.class, - Post.class, - comments, - posts, - "setIsReplyOf2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_containerOf_post_0_0.csv", - Forum.class, - Post.class, - forums, - posts, - "setContainerOf"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasMember_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasMember"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasModerator_person_0_0.csv", - Forum.class, - Person.class, - forums, - persons, - "setHasModerator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/forum_hasTag_tag_0_0.csv", - Forum.class, - Tag.class, - forums, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_hasInterest_tag_0_0.csv", - Person.class, - Tag.class, - persons, - tags, - "setHasInterest"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_knows_person_0_0.csv", - Person.class, - Person.class, - persons, - persons, - "setKnows"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_comment_0_0.csv", - Person.class, - Comment.class, - persons, - comments, - "setLikes1"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_likes_post_0_0.csv", - Person.class, - Post.class, - persons, - posts, - "setLikes2"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasCreator_person_0_0.csv", - Post.class, - Person.class, - posts, - persons, - "setHasCreator"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/comment_hasTag_tag_0_0.csv", - Comment.class, - Tag.class, - comments, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_hasTag_tag_0_0.csv", - Post.class, - Tag.class, - posts, - tags, - "setHasTag"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/post_isLocatedIn_place_0_0.csv", - Post.class, - Place.class, - posts, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_studyAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setStudyAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "dynamic/person_workAt_organisation_0_0.csv", - Person.class, - Organisation.class, - persons, - organisations, - "setWorkAt"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/organisation_isLocatedIn_place_0_0.csv", - Organisation.class, - Place.class, - organisations, - places, - "setIsLocatedIn"); - new CreateRelation() - .insertRelations( - datasetPath + "/" + "static/tagclass_isSubclassOf_tagclass_0_0.csv", - TagClass.class, - TagClass.class, - tagclasses, - tagclasses, - "setIsSubclassOf"); - - for (Person person : persons.values()) { - estore.insert(person); - } - for (Place place : places.values()) { - estore.insert(place); - } - for (TagClass tagclass : tagclasses.values()) { - estore.insert(tagclass); - } - for (Tag tag : tags.values()) { - estore.insert(tag); - } - for (Post post : posts.values()) { - estore.insert(post); - } - for (Comment comment : comments.values()) { - estore.insert(comment); - } - for (Forum forum : forums.values()) { - estore.insert(forum); - } - for (Organisation organisation : organisations.values()) { - estore.insert(organisation); - } - } - - private void insertPlaces(String filePath, HashMap places) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - String type = csvRecord.get("type"); - places.put(id, (new Place(id, name, url, type))); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTagClasses(String filePath, HashMap tagclasses) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tagclasses.put(id, new TagClass(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertTags(String filePath, HashMap tags) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - tags.put(id, new Tag(id, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertOrganisations(String filePath, HashMap organisations) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String type = csvRecord.get("type"); - String name = csvRecord.get("name"); - String url = csvRecord.get("url"); - - organisations.put(id, new Organisation(id, type, name, url)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertForums(String filePath, HashMap forums) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String title = csvRecord.get("title"); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - - forums.put(id, new Forum(id, title, creationDate)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPersons(String filePath, HashMap persons) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - String firstName = csvRecord.get("firstName"); - String lastName = csvRecord.get("lastName"); - String gender = csvRecord.get("gender"); - long birthday = Long.parseLong(csvRecord.get("birthday")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String email = csvRecord.get("email"); - - persons.put( - id, - new Person( - id, - firstName, - lastName, - gender, - birthday, - creationDate, - locationIP, - browserUsed, - language, - email)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertComments(String filePath, HashMap comments) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - comments.put(id, new Comment(id, creationDate, locationIP, browserUsed, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void insertPosts(String filePath, HashMap posts) { - try { - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = CSVFormat.newFormat('|').withFirstRecordAsHeader(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - - for (CSVRecord csvRecord : csvParser) { - long id = Long.parseLong(csvRecord.get("id")); - long creationDate = Long.parseLong(csvRecord.get("creationDate")); - String locationIP = csvRecord.get("locationIP"); - String browserUsed = csvRecord.get("browserUsed"); - String language = csvRecord.get("language"); - String content = csvRecord.get("content"); - int length = Integer.parseInt(csvRecord.get("length")); - - posts.put( - id, new Post(id, creationDate, locationIP, browserUsed, language, content, length)); - } - csvParser.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static class CreateRelation { - public void insertRelations( - String filePath, - Class referrerClass, - Class refereeClass, - HashMap referrerMap, - HashMap refereeMap, - String setRelationMethodName) { - try { - HashMap> relationMap = new HashMap>(); - Reader reader = new FileReader(filePath); - CSVFormat csvFormat = - CSVFormat.Builder.create() - .setDelimiter('|') - .setSkipHeaderRecord(true) - .setHeader("Referrer", "Referee") - .build(); - CSVParser csvParser = new CSVParser(reader, csvFormat); - Method setRelationMethod = referrerClass.getMethod(setRelationMethodName, Object[].class); - - for (CSVRecord csvRecord : csvParser) { - long referrerId = Long.parseLong(csvRecord.get("Referrer")); - long refereeId = Long.parseLong(csvRecord.get("Referee")); - if (relationMap.get(referrerId) == null) { - relationMap.put(referrerId, new HashSet()); - } - relationMap.get(referrerId).add(refereeMap.get(refereeId)); - } - csvParser.close(); - for (Map.Entry> item : relationMap.entrySet()) { - setRelationMethod.invoke( - referrerMap.get(item.getKey()), - new Object[] {item.getValue().toArray(Object[]::new)}); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphReflectionMetaDataTest.java b/eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphReflectionMetaDataTest.java index 2014d5a..aab5a1d 100644 --- a/eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphReflectionMetaDataTest.java +++ b/eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphReflectionMetaDataTest.java @@ -22,7 +22,7 @@ public class InGraphReflectionMetaDataTest { @BeforeEach public void setup() throws Exception { - estore1 = new Estore("estoreTestDb1", new EstoreOptions().useUnsafe(false)); + estore1 = new Estore("estoreTestDb1"); conn1 = DriverManager.getConnection("jdbc:h2:mem:h2TestDb1", "sa", ""); } diff --git a/eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphUnsafeMetaDataTest.java b/eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphUnsafeMetaDataTest.java deleted file mode 100644 index 4699ce1..0000000 --- a/eval/estore/metadata/h2/src/test/java/org/estore/eval/estore/metadata/h2/InGraphUnsafeMetaDataTest.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.estore.eval.estore.metadata.h2; - -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.estore.Estore; -import org.estore.EstoreOptions; -import org.estore.planner.util.Table; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.Statement; -import java.util.HashSet; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.*; - -public class InGraphUnsafeMetaDataTest { - - private Connection conn1; - private Estore estore1; - - @BeforeEach - public void setup() throws Exception { - estore1 = new Estore("estoreTestDb1", new EstoreOptions().useUnsafe(true)); - conn1 = DriverManager.getConnection("jdbc:h2:mem:h2TestDb1", "sa", ""); - } - - @Test - public void testH2DbNameQuery() throws Exception { - // insert H2 Engine into estore - Class t = Class.forName("org.h2.engine.Engine"); - estore1.captureAll(t); - - long time1 = System.nanoTime(); - Table res = estore1.query("MATCH (n: `org.h2.engine.Database`) RETURN n.databaseName"); - System.out.println("Execution Time : " + (System.nanoTime() - time1)); - - Set names = new HashSet<>(); - for (Object name : res.get("n.databaseName")) { - names.add((String) name); - } - assertEquals(2, res.getSize()); - assertTrue(names.contains("mem:h2TestDb1")); - assertTrue(names.contains("mem:h2TestDb2")); - assertTrue(true); - } - - @Test - public void testH2TablesQuery() throws Exception { - // Create new tables - Statement stmt = conn1.createStatement(); - stmt.execute("CREATE TABLE IF NOT EXISTS TEST_TABLE1 (ID INT PRIMARY KEY, NAME VARCHAR(255))"); - stmt.execute("CREATE TABLE IF NOT EXISTS TEST_TABLE2 (ID INT PRIMARY KEY, NAME VARCHAR(255))"); - - // insert H2 Engine into estore - Class t = Class.forName("org.h2.engine.Engine"); - estore1.captureAll(t); - - long time1 = System.nanoTime(); - Table res1 = - estore1.query( - "MATCH (n:" - + " `org.h2.engine.Database`)-[:mainSchema]->()-[:tablesAndViews]->()-[:table]->()-[]->()-[:key]->(k)" - + " RETURN k"); - System.out.println("Execution Time : " + (System.nanoTime() - time1)); - - Set names = new HashSet<>(); - for (Object name : res1.get("k")) { - names.add((String) name); - } - estore1.captureAll(names); - assertTrue(names.contains("TEST_TABLE1")); - assertTrue(names.contains("TEST_TABLE2")); - } - - @Test - public void testH2UsersQuery() throws Exception { - // create new user - Statement stmt = conn1.createStatement(); - stmt.execute("CREATE USER IF NOT EXISTS USER1 PASSWORD 'password1'"); - - // insert H2 Engine into estore - Class t = Class.forName("org.h2.engine.Engine"); - estore1.captureAll(t); - - long time1 = System.nanoTime(); - Table res = - estore1.query( - "MATCH (n:" - + " `org.h2.engine.Database`)-[:usersAndRoles]->()-[:table]->()-[]->()-[:key]->(k)" - + " RETURN k"); - System.out.println("Execution Time : " + (System.nanoTime() - time1)); - - Set users = new HashSet<>(); - for (Object name : res.get("k")) { - users.add((String) name); - } - - assertTrue(users.contains("USER1")); - // built-in users - assertTrue(users.contains("PUBLIC")); - assertTrue(users.contains("SA")); - } - - @AfterEach - public void drop() throws Exception { - if (conn1 != null) { - conn1.close(); - } - } -} diff --git a/eval/images/eclipse-arraystack-100-ingraph-unsafe.dockerfile b/eval/images/eclipse-arraystack-100-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-arraystack-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-arraystack-1000-ingraph-unsafe.dockerfile b/eval/images/eclipse-arraystack-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-arraystack-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-arraystack-10000-ingraph-unsafe.dockerfile b/eval/images/eclipse-arraystack-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-arraystack-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-arraystack-100000-ingraph-unsafe.dockerfile b/eval/images/eclipse-arraystack-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-arraystack-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-fastlist-100-ingraph-unsafe.dockerfile b/eval/images/eclipse-fastlist-100-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-fastlist-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-fastlist-1000-ingraph-unsafe.dockerfile b/eval/images/eclipse-fastlist-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-fastlist-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-fastlist-10000-ingraph-unsafe.dockerfile b/eval/images/eclipse-fastlist-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-fastlist-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-fastlist-100000-ingraph-unsafe.dockerfile b/eval/images/eclipse-fastlist-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-fastlist-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-immutablearraylist-100-ingraph-unsafe.dockerfile b/eval/images/eclipse-immutablearraylist-100-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-immutablearraylist-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-immutablearraylist-1000-ingraph-unsafe.dockerfile b/eval/images/eclipse-immutablearraylist-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-immutablearraylist-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-immutablearraylist-10000-ingraph-unsafe.dockerfile b/eval/images/eclipse-immutablearraylist-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-immutablearraylist-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-immutablearraylist-100000-ingraph-unsafe.dockerfile b/eval/images/eclipse-immutablearraylist-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-immutablearraylist-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedmap-100-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedmap-100-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedmap-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedmap-1000-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedmap-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedmap-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedmap-10000-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedmap-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedmap-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedmap-100000-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedmap-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedmap-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedset-100-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedset-100-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedset-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedset-1000-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedset-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedset-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedset-10000-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedset-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedset-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/eclipse-unifiedset-100000-ingraph-unsafe.dockerfile b/eval/images/eclipse-unifiedset-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index de51776..0000000 --- a/eval/images/eclipse-unifiedset-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/eclipse/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/eclipse - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/guava-arraytable-100-ingraph-unsafe.dockerfile b/eval/images/guava-arraytable-100-ingraph-unsafe.dockerfile deleted file mode 100644 index 3c9729c..0000000 --- a/eval/images/guava-arraytable-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/guava/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/guava - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/guava-arraytable-1000-ingraph-unsafe.dockerfile b/eval/images/guava-arraytable-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index 3c9729c..0000000 --- a/eval/images/guava-arraytable-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/guava/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/guava - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/guava-arraytable-10000-ingraph-unsafe.dockerfile b/eval/images/guava-arraytable-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index 3c9729c..0000000 --- a/eval/images/guava-arraytable-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/guava/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/guava - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/guava-arraytable-100000-ingraph-unsafe.dockerfile b/eval/images/guava-arraytable-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index 3c9729c..0000000 --- a/eval/images/guava-arraytable-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/guava/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/guava - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/h2metadata-ingraph-unsafe.dockerfile b/eval/images/h2metadata-ingraph-unsafe.dockerfile deleted file mode 100644 index 7b77870..0000000 --- a/eval/images/h2metadata-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/metadata/h2/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/metadata/h2 - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraydeque-100-ingraph-unsafe.dockerfile b/eval/images/jcf-arraydeque-100-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraydeque-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraydeque-1000-ingraph-unsafe.dockerfile b/eval/images/jcf-arraydeque-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraydeque-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraydeque-10000-ingraph-unsafe.dockerfile b/eval/images/jcf-arraydeque-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraydeque-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraydeque-100000-ingraph-unsafe.dockerfile b/eval/images/jcf-arraydeque-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraydeque-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraylist-100-ingraph-unsafe.dockerfile b/eval/images/jcf-arraylist-100-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraylist-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraylist-1000-ingraph-unsafe.dockerfile b/eval/images/jcf-arraylist-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraylist-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraylist-10000-ingraph-unsafe.dockerfile b/eval/images/jcf-arraylist-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraylist-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-arraylist-100000-ingraph-unsafe.dockerfile b/eval/images/jcf-arraylist-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-arraylist-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-hashmap-100-ingraph-unsafe.dockerfile b/eval/images/jcf-hashmap-100-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-hashmap-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-hashmap-1000-ingraph-unsafe.dockerfile b/eval/images/jcf-hashmap-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-hashmap-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-hashmap-10000-ingraph-unsafe.dockerfile b/eval/images/jcf-hashmap-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-hashmap-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-hashmap-100000-ingraph-unsafe.dockerfile b/eval/images/jcf-hashmap-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-hashmap-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-linkedlist-100-ingraph-unsafe.dockerfile b/eval/images/jcf-linkedlist-100-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-linkedlist-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-linkedlist-1000-ingraph-unsafe.dockerfile b/eval/images/jcf-linkedlist-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-linkedlist-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-linkedlist-10000-ingraph-unsafe.dockerfile b/eval/images/jcf-linkedlist-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-linkedlist-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-linkedlist-100000-ingraph-unsafe.dockerfile b/eval/images/jcf-linkedlist-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-linkedlist-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-vector-100-ingraph-unsafe.dockerfile b/eval/images/jcf-vector-100-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-vector-100-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-vector-1000-ingraph-unsafe.dockerfile b/eval/images/jcf-vector-1000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-vector-1000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-vector-10000-ingraph-unsafe.dockerfile b/eval/images/jcf-vector-10000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-vector-10000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/jcf-vector-100000-ingraph-unsafe.dockerfile b/eval/images/jcf-vector-100000-ingraph-unsafe.dockerfile deleted file mode 100644 index 877465b..0000000 --- a/eval/images/jcf-vector-100000-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM eclipse-temurin:11-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/datastructure/jcf/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/datastructure/jcf - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/ldbc-finbench-0.01-ingraph-unsafe.dockerfile b/eval/images/ldbc-finbench-0.01-ingraph-unsafe.dockerfile deleted file mode 100644 index 3d8f5b8..0000000 --- a/eval/images/ldbc-finbench-0.01-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC FinBench SF 0.01 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget -O test.tar.gz -L "https://drive.usercontent.google.com/download?id=1kBouy5zrUE4h9QmklaIiWNPDfC9-XgD-&export=download&authuser=0&confirm=t&uuid=971b21ed-db6a-4c84-b4d1-db510b9ea4f8&at=APZUnTWZ702p54DH7frTbxTgQijv:1701486595409" &&\ - gzip -d test.tar.gz &&\ - tar -xvf test.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/finbench/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/finbench - -# Run the test -CMD ["bash","execute.sh"] - - diff --git a/eval/images/ldbc-finbench-0.1-ingraph-unsafe.dockerfile b/eval/images/ldbc-finbench-0.1-ingraph-unsafe.dockerfile deleted file mode 100644 index 0918fe5..0000000 --- a/eval/images/ldbc-finbench-0.1-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC FinBench SF 0.01 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget -O test.tar.gz -L "https://drive.usercontent.google.com/download?id=1G7wgGInuNO22ecvOGsNGn3I_ZiyX4wvF&export=download&authuser=0&confirm=t&uuid=971b21ed-db6a-4c84-b4d1-db510b9ea4f8&at=APZUnTWZ702p54DH7frTbxTgQijv:1701486595409" &&\ - gzip -d test.tar.gz &&\ - tar -xvf test.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/finbench/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/finbench - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/ldbc-finbench-0.3-ingraph-unsafe.dockerfile b/eval/images/ldbc-finbench-0.3-ingraph-unsafe.dockerfile deleted file mode 100644 index d8ae719..0000000 --- a/eval/images/ldbc-finbench-0.3-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC FinBench SF 0.3 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget -O test.tar.gz -L "https://drive.usercontent.google.com/download?id=1zY7OkXPMSMs35JC4kLbm2GyDPD9SyswB&export=download&authuser=0&confirm=t&uuid=971b21ed-db6a-4c84-b4d1-db510b9ea4f8&at=APZUnTWZ702p54DH7frTbxTgQijv:1701486595409" &&\ - gzip -d test.tar.gz &&\ - tar -xvf test.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/finbench/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/finbench - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/ldbc-finbench-10-ingraph-unsafe.dockerfile b/eval/images/ldbc-finbench-10-ingraph-unsafe.dockerfile deleted file mode 100644 index e47a5c8..0000000 --- a/eval/images/ldbc-finbench-10-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC FinBench SF 3 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget -O test.tar.gz -L "https://drive.usercontent.google.com/download?id=18oe1LEZvi5EusseswQE6ftiUxCsx4A92&export=download&authuser=0&confirm=t&uuid=971b21ed-db6a-4c84-b4d1-db510b9ea4f8&at=APZUnTWZ702p54DH7frTbxTgQijv:1701486595409" &&\ - gzip -d test.tar.gz &&\ - tar -xvf test.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/finbench/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/finbench - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/ldbc-finbench-3-ingraph-unsafe.dockerfile b/eval/images/ldbc-finbench-3-ingraph-unsafe.dockerfile deleted file mode 100644 index 7cebe84..0000000 --- a/eval/images/ldbc-finbench-3-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC FinBench SF 3 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget -O test.tar.gz -L "https://drive.usercontent.google.com/download?id=1hsXVlC-KGEnSW94DfKpj_n622r5GKVX6&export=download&authuser=0&confirm=t&uuid=971b21ed-db6a-4c84-b4d1-db510b9ea4f8&at=APZUnTWZ702p54DH7frTbxTgQijv:1701486595409" &&\ - gzip -d test.tar.gz &&\ - tar -xvf test.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/finbench/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/finbench - -# Run the test -CMD ["bash","execute.sh"] diff --git a/eval/images/ldbc-snb-0.1-ingraph-unsafe.dockerfile b/eval/images/ldbc-snb-0.1-ingraph-unsafe.dockerfile deleted file mode 100644 index fc2de09..0000000 --- a/eval/images/ldbc-snb-0.1-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget --no-check-certificate https://repository.surfsara.nl/datasets/cwi/snb/files/social_network-csv_composite-longdateformatter/social_network-csv_composite-longdateformatter-sf0.1.tar.zst &&\ - zstd -d social_network-csv_composite-longdateformatter-sf0.1.tar.zst &&\ - tar -xvf social_network-csv_composite-longdateformatter-sf0.1.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/snb/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/snb - -# Run the test -CMD ["bash","execute.sh"] - - diff --git a/eval/images/ldbc-snb-0.3-ingraph-unsafe.dockerfile b/eval/images/ldbc-snb-0.3-ingraph-unsafe.dockerfile deleted file mode 100644 index fbff6c6..0000000 --- a/eval/images/ldbc-snb-0.3-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget --no-check-certificate https://repository.surfsara.nl/datasets/cwi/snb/files/social_network-csv_composite-longdateformatter/social_network-csv_composite-longdateformatter-sf0.3.tar.zst &&\ - zstd -d social_network-csv_composite-longdateformatter-sf0.3.tar.zst &&\ - tar -xvf social_network-csv_composite-longdateformatter-sf0.3.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/snb/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/snb - -# Run the test -CMD ["bash","execute.sh"] - - diff --git a/eval/images/ldbc-snb-1-ingraph-unsafe.dockerfile b/eval/images/ldbc-snb-1-ingraph-unsafe.dockerfile deleted file mode 100644 index 3744130..0000000 --- a/eval/images/ldbc-snb-1-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget --no-check-certificate https://repository.surfsara.nl/datasets/cwi/snb/files/social_network-csv_composite-longdateformatter/social_network-csv_composite-longdateformatter-sf1.tar.zst &&\ - zstd -d social_network-csv_composite-longdateformatter-sf1.tar.zst &&\ - tar -xvf social_network-csv_composite-longdateformatter-sf1.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/snb/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/snb - -# Run the test -CMD ["bash","execute.sh"] - - diff --git a/eval/images/ldbc-snb-10-ingraph-unsafe.dockerfile b/eval/images/ldbc-snb-10-ingraph-unsafe.dockerfile deleted file mode 100644 index 8941eef..0000000 --- a/eval/images/ldbc-snb-10-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget --no-check-certificate https://repository.surfsara.nl/datasets/cwi/snb/files/social_network-csv_composite-longdateformatter/social_network-csv_composite-longdateformatter-sf10.tar.zst &&\ - zstd -d social_network-csv_composite-longdateformatter-sf10.tar.zst &&\ - tar -xvf social_network-csv_composite-longdateformatter-sf10.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/snb/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/snb - -# Run the test -CMD ["bash","execute.sh"] - - diff --git a/eval/images/ldbc-snb-3-ingraph-unsafe.dockerfile b/eval/images/ldbc-snb-3-ingraph-unsafe.dockerfile deleted file mode 100644 index 0c4abb2..0000000 --- a/eval/images/ldbc-snb-3-ingraph-unsafe.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM eclipse-temurin:17.0.9_9-jdk - -WORKDIR / - -# Install MAVEN and download the dataset for LDBC SNB SF 0.1 -RUN apt-get update -y &&\ - apt-get install -y zstd &&\ - wget -O maven.tar.gz -L https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz &&\ - gzip -d maven.tar.gz && tar -xvf maven.tar && rm *.tar &&\ - wget --no-check-certificate https://repository.surfsara.nl/datasets/cwi/snb/files/social_network-csv_composite-longdateformatter/social_network-csv_composite-longdateformatter-sf3.tar.zst &&\ - zstd -d social_network-csv_composite-longdateformatter-sf3.tar.zst &&\ - tar -xvf social_network-csv_composite-longdateformatter-sf3.tar && rm *.tar - -ENV PATH="${PATH}:/apache-maven-3.9.5/bin" - -ARG username -ARG uid -ARG groupname -ARG gid -RUN groupadd -g $gid $groupname -RUN \ - useradd -m -s /bin/bash -c "$username's clone" -u $uid -g $gid $username && \ - adduser $username sudo && \ - usermod -aG sudo $username && \ - echo "$username:docker" | chpasswd - -USER $username - -COPY --chown=$username ./pom.xml /home/$username/pom.xml -COPY --chown=$username ./estore /home/$username/estore -COPY --chown=$username ./images/execute.sh /home/$username/estore/ldbc/snb/execute.sh -COPY --chown=$username ./libs /home/libs - -WORKDIR /home/$username/estore/ldbc/snb - -# Run the test -CMD ["bash","execute.sh"] - - diff --git a/eval/test.py b/eval/test.py index b3e8f64..554d4f4 100644 --- a/eval/test.py +++ b/eval/test.py @@ -77,7 +77,6 @@ def __init__(self, SYSTEMS : Dict[str, str] = {"neo4j-server" : "Neo4jServerTest", "neo4j-impermanant" : "Neo4jImpermanantTest", "ingraph-reflection" : "InGraphReflectionTest", - "ingraph-unsafe" : "InGraphUnsafeTest", "estore-neo" : "EstoreNeoTest", "estore-mem" : "EstoreMemTest", "memgraph-server" : "MemgraphServerTest", @@ -99,7 +98,7 @@ def exec_datastructure(project : str, queries = PROJECT.queries #fi if systems is None: - systems = ["ingraph-reflection", "ingraph-unsafe"] + systems = ["ingraph-reflection"] #fi if datastructures is None: datastructures = project2.data_structures @@ -260,14 +259,13 @@ def exec_usecase(usecase : str, return #fi if impls is None: - impls = ["ingraph-reflection", "ingraph-unsafe", "jdbc"] + impls = ["ingraph-reflection", "jdbc"] #fi if queries is None: queries = ["dbname", "tables", "users"] #fi impl_test_map : Dict[str, str] = {"ingraph-reflection" : "InGraphReflectionMetaDataTest", - "ingraph-unsafe" : "InGraphUnsafeMetaDataTest", "jdbc" : "JDBCMetaDataTest"} query_method_map : Dict[str, str] = {"dbname" : "testH2DbNameQuery", @@ -363,7 +361,7 @@ def exec_usecase(usecase : str, parser.add_argument("--h2impls", help="H2 query implementation to use", required = False, - choices=["ingraph-reflection", "ingraph-unsafe", "jdbc"], + choices=["ingraph-reflection", "jdbc"], nargs=1,) parser.add_argument("--usecase", help="Use case to evaluate", diff --git a/s b/s index 375ad8e..7a6b6a7 100755 --- a/s +++ b/s @@ -119,14 +119,13 @@ function install_estore() { function exec_estore() { check_deps || \ { echo "Dependencies not satisfied. Please install with: ./s install_deps"; return 1; } - echo "Usage: $0 [port] [useUnsafe]" + echo "Usage: $0 [port]" local port=${1:-1234} - local useUnsafe=${2:-false} echo "Example: echo 'MATCH (n) return n' | nc -q 0 localhost $port" echo "send 'q' to exit" compile_estore ( cd estore - mvn exec:java@main -Dexec.args="$port $useUnsafe" & + mvn exec:java@main -Dexec.args="$port" & echo "Running db as $!" ) } From b81a96cde5c30115a917cf0e83b0b5a93fcfe71c Mon Sep 17 00:00:00 2001 From: Yan Levin Date: Thu, 20 Aug 2026 18:50:17 -0500 Subject: [PATCH 2/2] fixed formatting --- estore/src/main/java/org/estore/Estore.java | 6 ++---- estore/src/test/java/org/estore/CreateInstanceTest.java | 3 +-- .../test/java/org/estore/DbMetadataTest/H2MetadataTest.java | 3 +-- .../src/test/java/org/estore/MultiDimensionalArrayTest.java | 3 +-- estore/src/test/java/org/estore/compiler/CodeGenTest.java | 5 +---- estore/src/test/java/org/estore/compiler/UtilTest.java | 1 - .../apachecommons/DualHashBidiMapTest.java | 4 +--- .../datastructuretests/apachecommons/GrowthListTest.java | 1 - .../datastructuretests/apachecommons/PatriciaTrieTest.java | 1 - .../org/estore/datastructuretests/eclipse/FastListTest.java | 1 - .../org/estore/datastructuretests/eclipse/HashBagTest.java | 1 - .../estore/datastructuretests/eclipse/HashBiMapTest.java | 1 - .../estore/datastructuretests/fastutil/FastutilTest.java | 1 - .../org/estore/datastructuretests/guava/HashBiMapTest.java | 1 - .../datastructuretests/guava/LinkedListMultimapTest.java | 4 +--- .../datastructuretests/guava/MinMaxPriorityQueueTest.java | 4 +--- .../org/estore/datastructuretests/jcf/ArrayListTest.java | 1 - .../java/org/estore/datastructuretests/jcf/HashSetTest.java | 1 - .../java/org/estore/eval/datastructure/EclipseTest.java | 1 - .../test/java/org/estore/eval/datastructure/GuavaTest.java | 1 - .../test/java/org/estore/eval/datastructure/JCFTest.java | 1 - .../test/java/org/estore/eval/ldbc/finbench/Fin001Test.java | 5 +---- .../src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java | 5 +---- .../expressions/relational/EqualsRelationExprTest.java | 4 +--- .../org/estore/planner/filter/WhereBooleanLogicTest.java | 4 +--- 25 files changed, 13 insertions(+), 50 deletions(-) diff --git a/estore/src/main/java/org/estore/Estore.java b/estore/src/main/java/org/estore/Estore.java index 8fc7a3d..0e9a226 100644 --- a/estore/src/main/java/org/estore/Estore.java +++ b/estore/src/main/java/org/estore/Estore.java @@ -356,8 +356,7 @@ public void captureAllDfsRec(Object obj) throws EstoreException { ArrayList labelList = new ArrayList(); if (obj instanceof Class) { if (labelClassInfoMap.get(Class.class.getName()) == null) { - ClassInfo classCInfo = - labelObjectMap.putNew(Class.class, new ArrayList<>()); + ClassInfo classCInfo = labelObjectMap.putNew(Class.class, new ArrayList<>()); labelClassInfoMap.put(Class.class.getName(), classCInfo); } cInfo = labelClassInfoMap.get(Class.class.getName()); @@ -447,8 +446,7 @@ public void captureAll(Object obj, int maxDepth, int currDepth) throws EstoreExc ArrayList labelList = new ArrayList(); if (obj instanceof Class) { if (labelClassInfoMap.get(Class.class.getName()) == null) { - ClassInfo classCInfo = - labelObjectMap.putNew(Class.class, new ArrayList<>()); + ClassInfo classCInfo = labelObjectMap.putNew(Class.class, new ArrayList<>()); labelClassInfoMap.put(Class.class.getName(), classCInfo); } cInfo = labelClassInfoMap.get(Class.class.getName()); diff --git a/estore/src/test/java/org/estore/CreateInstanceTest.java b/estore/src/test/java/org/estore/CreateInstanceTest.java index 9bb93d5..76ea990 100644 --- a/estore/src/test/java/org/estore/CreateInstanceTest.java +++ b/estore/src/test/java/org/estore/CreateInstanceTest.java @@ -30,8 +30,7 @@ public void initDatabase() { try { estore = new Estore( - CreateInstanceTest.class.getName(), - new EstoreOptions().useDfs(false)); + CreateInstanceTest.class.getName(), new EstoreOptions().useDfs(false)); } catch (Exception e) { e.printStackTrace(); } diff --git a/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java b/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java index 1607600..cc0b0c2 100644 --- a/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java +++ b/estore/src/test/java/org/estore/DbMetadataTest/H2MetadataTest.java @@ -29,8 +29,7 @@ public void setup() throws Exception { estore1 = new Estore( - H2MetadataTest.class.getName(), - new EstoreOptions().profile(profileFlag)); + H2MetadataTest.class.getName(), new EstoreOptions().profile(profileFlag)); Class.forName("org.h2.Driver"); h2Conn1 = DriverManager.getConnection("jdbc:h2:mem:h2TestDb1", "sa", ""); } diff --git a/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java b/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java index 03f8d5c..698deb9 100644 --- a/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java +++ b/estore/src/test/java/org/estore/MultiDimensionalArrayTest.java @@ -19,8 +19,7 @@ public class MultiDimensionalArrayTest { @BeforeEach public void setup() throws Exception { rand = ThreadLocalRandom.current(); - db = - new Estore(MultiDimensionalArrayTest.class.getName()); + db = new Estore(MultiDimensionalArrayTest.class.getName()); } @Test diff --git a/estore/src/test/java/org/estore/compiler/CodeGenTest.java b/estore/src/test/java/org/estore/compiler/CodeGenTest.java index b1a30c3..77fee7e 100644 --- a/estore/src/test/java/org/estore/compiler/CodeGenTest.java +++ b/estore/src/test/java/org/estore/compiler/CodeGenTest.java @@ -24,10 +24,7 @@ public class CodeGenTest { @BeforeEach public void initDatabase() { try { - estore = - new Estore( - CodeGenTest.class.getName(), - new EstoreOptions().useDfs(false)); + estore = new Estore(CodeGenTest.class.getName(), new EstoreOptions().useDfs(false)); } catch (Exception e) { e.printStackTrace(); } diff --git a/estore/src/test/java/org/estore/compiler/UtilTest.java b/estore/src/test/java/org/estore/compiler/UtilTest.java index 6c92afb..668ac12 100644 --- a/estore/src/test/java/org/estore/compiler/UtilTest.java +++ b/estore/src/test/java/org/estore/compiler/UtilTest.java @@ -8,7 +8,6 @@ import java.util.Collections; import java.util.List; import org.estore.Estore; -import org.estore.EstoreOptions; import org.estore.example.A; import org.estore.example.B; import org.estore.planner.util.ClassInfo; diff --git a/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java b/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java index 4b89a01..2e0f2b2 100644 --- a/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/apachecommons/DualHashBidiMapTest.java @@ -17,9 +17,7 @@ public class DualHashBidiMapTest { @BeforeEach public void initDatabase() throws Exception { - estore = - new Estore( - DualHashBidiMapTest.class.getName(), new EstoreOptions()); + estore = new Estore(DualHashBidiMapTest.class.getName(), new EstoreOptions()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java b/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java index 488a5fa..f8e5ef5 100644 --- a/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/apachecommons/GrowthListTest.java @@ -4,7 +4,6 @@ import org.apache.commons.collections4.list.GrowthList; import org.estore.Estore; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java b/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java index 9317d96..1543fae 100644 --- a/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/apachecommons/PatriciaTrieTest.java @@ -5,7 +5,6 @@ import org.apache.commons.collections4.trie.PatriciaTrie; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java b/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java index d377f8f..a588e2f 100644 --- a/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/eclipse/FastListTest.java @@ -5,7 +5,6 @@ import org.eclipse.collections.impl.list.mutable.FastList; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java index 5814826..2fd863b 100644 --- a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBagTest.java @@ -5,7 +5,6 @@ import org.eclipse.collections.impl.bag.mutable.HashBag; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java index e9b5c50..3aa8dc0 100644 --- a/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/eclipse/HashBiMapTest.java @@ -5,7 +5,6 @@ import org.eclipse.collections.impl.bimap.mutable.HashBiMap; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java b/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java index 3ba35a7..d16de3d 100644 --- a/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/fastutil/FastutilTest.java @@ -8,7 +8,6 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import java.util.concurrent.ThreadLocalRandom; import org.estore.Estore; -import org.estore.EstoreOptions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java b/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java index 395e808..fab3fff 100644 --- a/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/guava/HashBiMapTest.java @@ -5,7 +5,6 @@ import com.google.common.collect.HashBiMap; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java b/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java index fb05c26..e8be8d2 100644 --- a/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/guava/LinkedListMultimapTest.java @@ -5,7 +5,6 @@ import com.google.common.collect.LinkedListMultimap; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -17,8 +16,7 @@ public class LinkedListMultimapTest { @BeforeEach public void initDatabase() throws Exception { - estore = - new Estore(LinkedListMultimapTest.class.getName()); + estore = new Estore(LinkedListMultimapTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java b/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java index 23f7d1c..1b36530 100644 --- a/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/guava/MinMaxPriorityQueueTest.java @@ -5,7 +5,6 @@ import com.google.common.collect.MinMaxPriorityQueue; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -16,8 +15,7 @@ public class MinMaxPriorityQueueTest { @BeforeEach public void initDatabase() throws Exception { - estore = - new Estore(MinMaxPriorityQueueTest.class.getName()); + estore = new Estore(MinMaxPriorityQueueTest.class.getName()); size = 10; } diff --git a/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java b/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java index 4003185..fbd2f55 100644 --- a/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/jcf/ArrayListTest.java @@ -5,7 +5,6 @@ import java.util.ArrayList; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java b/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java index 3d292dd..92ee8a0 100644 --- a/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java +++ b/estore/src/test/java/org/estore/datastructuretests/jcf/HashSetTest.java @@ -5,7 +5,6 @@ import java.util.HashSet; import org.estore.Estore; import org.estore.EstoreException; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java b/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java index 78e12e1..a467aa8 100644 --- a/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java +++ b/estore/src/test/java/org/estore/eval/datastructure/EclipseTest.java @@ -11,7 +11,6 @@ import org.eclipse.collections.impl.set.mutable.UnifiedSet; import org.eclipse.collections.impl.stack.mutable.ArrayStack; import org.estore.Estore; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java b/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java index 67589aa..7d612ae 100644 --- a/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java +++ b/estore/src/test/java/org/estore/eval/datastructure/GuavaTest.java @@ -6,7 +6,6 @@ import java.util.ArrayList; import java.util.concurrent.ThreadLocalRandom; import org.estore.Estore; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java b/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java index 2e84ea0..2c63053 100644 --- a/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java +++ b/estore/src/test/java/org/estore/eval/datastructure/JCFTest.java @@ -10,7 +10,6 @@ import java.util.Vector; import java.util.concurrent.ThreadLocalRandom; import org.estore.Estore; -import org.estore.EstoreOptions; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java b/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java index 57feb23..4c4145c 100644 --- a/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java +++ b/estore/src/test/java/org/estore/eval/ldbc/finbench/Fin001Test.java @@ -25,10 +25,7 @@ public class Fin001Test { @BeforeEach public void setupData() throws Exception { - estore = - new Estore( - Fin001Test.class.getName(), - new EstoreOptions().profile(false)); + estore = new Estore(Fin001Test.class.getName(), new EstoreOptions().profile(false)); readDataSet(); } diff --git a/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java b/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java index a13352e..2592c8f 100644 --- a/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java +++ b/estore/src/test/java/org/estore/eval/ldbc/snb/Snb01Test.java @@ -25,10 +25,7 @@ public class Snb01Test { @BeforeEach public void setupData() throws Exception { - estore = - new Estore( - Snb01Test.class.getName(), - new EstoreOptions().profile(false)); + estore = new Estore(Snb01Test.class.getName(), new EstoreOptions().profile(false)); readDataSet(); } diff --git a/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java b/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java index ccecfad..35a90c5 100644 --- a/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java +++ b/estore/src/test/java/org/estore/planner/expressions/relational/EqualsRelationExprTest.java @@ -7,7 +7,6 @@ import java.util.ArrayList; import java.util.function.Function; import org.estore.Estore; -import org.estore.EstoreOptions; import org.estore.example.Person; import org.estore.planner.expressions.LogicalExpr; import org.estore.planner.expressions.function.FunctionInvocationExpr; @@ -24,8 +23,7 @@ class EqualsRelationExprTest { @BeforeEach void setUp() throws Exception { - db = - new Estore(EqualsRelationExprTest.class.getName() + "_" + System.nanoTime()); + db = new Estore(EqualsRelationExprTest.class.getName() + "_" + System.nanoTime()); } @Test diff --git a/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java b/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java index a49e71e..89033e0 100644 --- a/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java +++ b/estore/src/test/java/org/estore/planner/filter/WhereBooleanLogicTest.java @@ -3,7 +3,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.estore.Estore; -import org.estore.EstoreOptions; import org.estore.example.Person; import org.estore.planner.util.Table; import org.junit.jupiter.api.BeforeEach; @@ -14,8 +13,7 @@ class WhereBooleanLogicTest { @BeforeEach void setUp() throws Exception { - db = - new Estore(WhereBooleanLogicTest.class.getName() + "_" + System.nanoTime()); + db = new Estore(WhereBooleanLogicTest.class.getName() + "_" + System.nanoTime()); } @Test