Skip to content

Commit a3cd070

Browse files
committed
Merge pull request #4 from orientechnologies/master
Usage of new OrientDB OGraphBatchInsertSimple that is 10x faster than classic API
2 parents 28bb794 + a24bbae commit a3cd070

File tree

14 files changed

+163
-194
lines changed

14 files changed

+163
-194
lines changed

config/input.properties

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,41 @@
1-
!Select the dataset to populate the graph database
2-
DATASET = datasets/real/youtubeEdges.txt
1+
!ENRON DATASET
2+
REAL_DATASET = data/enronEdges.txt
33

4-
!When running CW select the evaluation dataset to check if the algorithms
5-
!works (communities ground-truth)
6-
EVALUATION_DATASET = datasets/synthetic/community30000.dat
4+
!YOUTUBE DATASET
5+
#REAL_DATASET = data/youtubeEdges.txt
6+
7+
!AMAZON DATASET
8+
#REAL_DATASET = data/amazonEdges.txt
9+
10+
!LIVEJOURNAL DATASET
11+
#REAL_DATASET = data/livejournalEdges.txt
12+
13+
!SYNTETIC DATASET
14+
SYNTHETIC_DATASET = data/network.dat
715

816
!Choose which databases you want to include in the benchmark. Right the databases
917
! in a comma-separated list. Available dbs are titan, orientdb, neo4j, sparksee.
10-
DATABASES = sparksee
11-
12-
!Please put a license key for Sparksee in order to run the benchmark with big graphs
13-
SPARKSEE_LICENCE_KEY =
14-
15-
!Choose which benchmark you want to run. Please select one of the above: are MIW,
16-
!SIW, QW-FN, QW-FA, QW-FS and CW. You should choose only one benchmark. ONLY when
17-
!running QW-FA please set ORIENTDB_LW_EDGES to false. In all other cases you should
18-
!set ORIENTDB_LW_EDGES to true
19-
BENCHMARK = MIW
20-
ORIENTDB_LW_EDGES = true
21-
22-
!There are two possible ways to set the cache value, by setting the amount of nodes or
23-
!a percentage of the total nodes for every cache value.
24-
25-
!If to choose the first way you should explicitly set the amount of nodes every cache
26-
!value should have. The different values should be comma separated (e.g 500, 750, 1000).
27-
CACHE_VALUES =
28-
!If you choose the second way you should set the total nodes the graph has, the number
29-
!of cache values and the percentage factor you want to increment the initial cache value.
30-
!Note that the initial cache value is equal to the cache increment factor. For example
31-
!if CACHE_VALUES_CNT = 3 and CACHE_INCREMENT_FACTOR = 0.05 then the benchmark is going
32-
!to initialize with the following cache values: 0.05, 0.1 and 0.15.
33-
NODES_CNT = 30000
34-
CACHE_VALUES_CNT = 6
35-
CACHE_INCREMENT_FACTOR = 0.05
36-
37-
!Select the path you want the results to be written
38-
RESULTS_PATH = results/
18+
DATABASES = titan,neo4j,sparksee
19+
20+
!Choose which benchmark you want to run by removing the comments.
21+
#BENCHMARK = MIW
22+
#BENCHMARK = SIW
23+
BENCHMARK = QW-FN
24+
#BENCHMARK = QW-FA
25+
#BENCHMARK = QW-FS
26+
#BENCHMARK = CW
27+
28+
!Choose the cache values you want run the CW benchmark. The property
29+
!should be comma delimited.
30+
CACHE_VALUES = 25,50,75,100,125,150
3931

4032
!Benchmark class paths
4133
MIW_CLASS = eu.socialsensor.benchmarks.MassiveInsertionBenchmark
4234
SIW_CLASS = eu.socialsensor.benchmarks.SingleInsertionBenchmark
4335
QW-FN_CLASS = eu.socialsensor.benchmarks.FindNeighboursOfAllNodesBenchmark
4436
QW-FA_CLASS = eu.socialsensor.benchmarks.FindNodesOfAllEdgesBenchmark
4537
QW-FS_CLASS = eu.socialsensor.benchmarks.FindShortestPathBenchmark
46-
CW_CLASS = eu.socialsensor.benchmarks.ClusteringBenchmark
38+
CW_CLASS = eu.socialsensor.benchmarks.ClusteringBenchmark
39+
40+
!Results folder path
41+
RESULTS_PATH = data/results/

images/SIWAmazon.png

-35.4 KB
Binary file not shown.

images/SIWEnron.png

-30.1 KB
Binary file not shown.

images/SIWLivejournal.png

-35.8 KB
Binary file not shown.

images/SIWYoutube.png

-42.9 KB
Binary file not shown.

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646

4747
<properties>
4848
<blueprints.version>2.6.0</blueprints.version>
49-
<orientdb.version>2.0-M1</orientdb.version>
50-
<!--<orientdb.version>1.7.9-SNAPSHOT</orientdb.version>-->
49+
<orientdb.version>2.0-SNAPSHOT</orientdb.version>
5150
</properties>
5251

5352
<dependencies>

src/main/java/eu/socialsensor/benchmarks/FindNodesOfAllEdgesBenchmark.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package eu.socialsensor.benchmarks;
22

3+
import java.lang.reflect.InvocationTargetException;
4+
import java.lang.reflect.Method;
5+
6+
import org.apache.log4j.Level;
7+
import org.apache.log4j.Logger;
8+
39
import eu.socialsensor.graphdatabases.GraphDatabase;
410
import eu.socialsensor.graphdatabases.Neo4jGraphDatabase;
511
import eu.socialsensor.graphdatabases.OrientGraphDatabase;
@@ -9,12 +15,6 @@
915
import eu.socialsensor.utils.PermuteMethod;
1016
import eu.socialsensor.utils.Utils;
1117

12-
import org.apache.log4j.Level;
13-
import org.apache.log4j.Logger;
14-
15-
import java.lang.reflect.InvocationTargetException;
16-
import java.lang.reflect.Method;
17-
1818
/**
1919
* FindNodesOfAllEdgesBenchmark implementation
2020
* @author sotbeis

src/main/java/eu/socialsensor/benchmarks/FindShortestPathBenchmark.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
package eu.socialsensor.benchmarks;
22

3-
import java.lang.reflect.InvocationTargetException;
4-
import java.lang.reflect.Method;
5-
import java.util.HashSet;
6-
import java.util.Random;
7-
import java.util.Set;
8-
9-
import org.apache.log4j.Level;
10-
import org.apache.log4j.Logger;
11-
123
import eu.socialsensor.graphdatabases.GraphDatabase;
134
import eu.socialsensor.graphdatabases.Neo4jGraphDatabase;
145
import eu.socialsensor.graphdatabases.OrientGraphDatabase;
@@ -17,6 +8,14 @@
178
import eu.socialsensor.main.GraphDatabaseBenchmark;
189
import eu.socialsensor.utils.PermuteMethod;
1910
import eu.socialsensor.utils.Utils;
11+
import org.apache.log4j.Level;
12+
import org.apache.log4j.Logger;
13+
14+
import java.lang.reflect.InvocationTargetException;
15+
import java.lang.reflect.Method;
16+
import java.util.HashSet;
17+
import java.util.Random;
18+
import java.util.Set;
2019

2120
/**
2221
* FindShortestPathBenchmark implementation

src/main/java/eu/socialsensor/benchmarks/MassiveInsertionBenchmark.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
package eu.socialsensor.benchmarks;
22

3-
import java.lang.reflect.InvocationTargetException;
4-
import java.lang.reflect.Method;
5-
6-
import org.apache.log4j.Level;
7-
import org.apache.log4j.Logger;
8-
93
import eu.socialsensor.graphdatabases.GraphDatabase;
104
import eu.socialsensor.graphdatabases.Neo4jGraphDatabase;
115
import eu.socialsensor.graphdatabases.OrientGraphDatabase;
@@ -14,6 +8,11 @@
148
import eu.socialsensor.main.GraphDatabaseBenchmark;
159
import eu.socialsensor.utils.PermuteMethod;
1610
import eu.socialsensor.utils.Utils;
11+
import org.apache.log4j.Level;
12+
import org.apache.log4j.Logger;
13+
14+
import java.lang.reflect.InvocationTargetException;
15+
import java.lang.reflect.Method;
1716

1817
/**
1918
* MassiveInsertionBenchmark implementation

src/main/java/eu/socialsensor/graphdatabases/Neo4jGraphDatabase.java

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package eu.socialsensor.graphdatabases;
22

3-
import java.io.File;
4-
import java.util.ArrayList;
5-
import java.util.HashMap;
6-
import java.util.HashSet;
7-
import java.util.List;
8-
import java.util.Map;
9-
import java.util.Set;
10-
import java.util.concurrent.TimeUnit;
11-
3+
import com.google.common.collect.Iterables;
4+
import eu.socialsensor.insert.Insertion;
5+
import eu.socialsensor.insert.Neo4jMassiveInsertion;
6+
import eu.socialsensor.insert.Neo4jSingleInsertion;
7+
import eu.socialsensor.query.Neo4jQuery;
8+
import eu.socialsensor.query.Query;
9+
import eu.socialsensor.utils.Utils;
1210
import org.neo4j.graphdb.Direction;
1311
import org.neo4j.graphdb.DynamicLabel;
1412
import org.neo4j.graphdb.GraphDatabaseService;
@@ -27,14 +25,14 @@
2725
import org.neo4j.unsafe.batchinsert.BatchInserter;
2826
import org.neo4j.unsafe.batchinsert.BatchInserters;
2927

30-
import com.google.common.collect.Iterables;
31-
32-
import eu.socialsensor.insert.Insertion;
33-
import eu.socialsensor.insert.Neo4jMassiveInsertion;
34-
import eu.socialsensor.insert.Neo4jSingleInsertion;
35-
import eu.socialsensor.query.Neo4jQuery;
36-
import eu.socialsensor.query.Query;
37-
import eu.socialsensor.utils.Utils;
28+
import java.io.File;
29+
import java.util.ArrayList;
30+
import java.util.HashMap;
31+
import java.util.HashSet;
32+
import java.util.List;
33+
import java.util.Map;
34+
import java.util.Set;
35+
import java.util.concurrent.TimeUnit;
3836

3937
/**
4038
* Neo4j graph database implementation
@@ -659,4 +657,4 @@ public boolean nodeExists(int nodeId) {
659657
return false;
660658
}
661659

662-
}
660+
}

0 commit comments

Comments
 (0)