Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
851cf3f
Created list of dumpfiles
mohandas-pai Oct 31, 2021
e1807ad
Archiving the dumpfile list
mohandas-pai Nov 7, 2021
eda6e67
Testing MultiDump
mohandas-pai Nov 11, 2021
ff2cbd1
TempDir approach for archiving
mohandas-pai Nov 12, 2021
c95c3f8
Fixed the test cases
mohandas-pai Nov 12, 2021
0e2c156
Added boolean multiplefile param for DumpfileBuilder
mohandas-pai Nov 14, 2021
9b7105a
Trying to split the graph
mohandas-pai Nov 17, 2021
7e3e6f4
trying to create multiple graphs in data generator instead of splitti…
mohandas-pai Nov 21, 2021
e597e7b
Graph Handler for multiple files
mohandas-pai Nov 28, 2021
6685b2c
Changed graph properties
mohandas-pai Nov 28, 2021
2d79f93
Added noOfGraphs as a parameter
mohandas-pai Dec 3, 2021
5f0a1d8
DataGenerator now uses noOfGraph-Parameter
Thoren-G Dec 5, 2021
c2dc08c
DataGenerator will only generate multiple graphs for the DumpfileNode
Thoren-G Dec 5, 2021
2f18ea3
minor fixes
Thoren-G Dec 5, 2021
17dc37a
Added noOfGraphs in httpcomponent
mohandas-pai Dec 11, 2021
6866902
Removed hardcoding boolean value
mohandas-pai Dec 11, 2021
f63cf15
Merge branch 'feature/data-formats/microdata' into feature/multi_dump…
Thoren-G Dec 12, 2021
0eac1a7
Fixed the integration tests. The DataGenerator was not able to build …
Thoren-G Dec 12, 2021
059b34a
fixed submodule problem for jsonld/rdfa
Thoren-G Dec 12, 2021
43809a5
Added noOfGraphs as a parameter for integration test
mohandas-pai Dec 12, 2021
c85bb49
finished work on multiple dumpfile feature
Thoren-G Dec 19, 2021
1b19820
Merge branch 'feature/multi_dumpFile' of https://github.com/Thoren-G/…
Thoren-G Dec 19, 2021
b63e9bc
code cleanup for multiple dumpfile feature
Thoren-G Jan 16, 2022
b1f38f7
Merge branch 'develop' into feature/multi_dumpFile
Thoren-G Jan 16, 2022
d19b6e0
multi_dumpfile small fixes
Thoren-G Jan 16, 2022
dfba48c
Removed unecessary test
mohandas-pai Jan 16, 2022
8f27203
Reverted back the DumpFile Builder class
mohandas-pai Jan 23, 2022
5e0888c
multiple dumpfile building fixes
Thoren-G Jan 27, 2022
b9fc1c3
Merge branch 'develop' into feature/multi_dumpFile
Thoren-G Jan 27, 2022
a2d89ea
code cleanup
Thoren-G Feb 1, 2022
dbefb10
fixed merge problem
Thoren-G Feb 1, 2022
278cedd
Merge branch 'develop' into feature/multi_dumpFile
Thoren-G Feb 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions benchmark.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
hobbit:hasParameter
:seed,
:numberOfNodes,
:numberOfGraphs,
:averageTriplesPerNode,
:blankNodesRatio,
:averageNodeGraphDegree,
Expand Down Expand Up @@ -80,6 +81,7 @@
hobbit:hasParameter
:seed,
:numberOfNodes,
:numberOfGraphs,
:averageTriplesPerNode,
:blankNodesRatio,
:averageNodeGraphDegree,
Expand Down Expand Up @@ -136,6 +138,13 @@
rdfs:domain hobbit:Experiment, hobbit:Challenge;
rdfs:range xsd:integer;
hobbit:defaultValue "10"^^xsd:integer .

:numberOfGraphs a hobbit:Parameter, hobbit:ConfigurableParameter;
rdfs:label "Number of graphs"@en;
rdfs:comment "The number of graphs a node can have."@en;
rdfs:domain hobbit:Experiment, hobbit:Challenge;
rdfs:range xsd:integer;
hobbit:defaultValue "1"^^xsd:integer .

:averageTriplesPerNode a hobbit:Parameter, hobbit:ConfigurableParameter;
rdfs:label "RDF dataset size"@en;
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ For the full license text, see [LICENSE](../LICENSE).
| Parameter | Description | Ontology resources
| --- | --- | ---
| Number of nodes | The number of nodes in the synthetic graph. | [orca:numberOfNodes](http://w3id.org/dice-research/orca/ontology#numberOfNodes)
| Number of graphs | The number of graphs a node can have. | [orca:numberOfGraphs](http://w3id.org/dice-research/orca/ontology#numberOfGraphs)
| Average node degree | The average degree of the nodes in the generated graph. | [orca:averageNodeGraphDegree](http://w3id.org/dice-research/orca/ontology#averageNodeGraphDegree)
| Ratio of blank nodes | The ration of blank nodes in the generated graph. | [orca:blankNodesRatio](http://w3id.org/dice-research/orca/ontology#blankNodesRatio)
| RDF dataset size | Average number of triples of the generated RDF graphs. | [orca:averageTriplesPerNode](http://w3id.org/dice-research/orca/ontology#averageTriplesPerNode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class ApiConstants {
public static final String ENV_CRAWL_DELAY_KEY = "LDCBENCH_CRAWL_DELAY";
public static final String ENV_DISALLOWED_RATIO_KEY = "LDCBENCH_DISALLOWED_RATIO";
public static final String ENV_COMPRESSED_RATIO_KEY = "LDCBENCH_COMPRESSED_RATIO";
public static final String ENV_NUMBER_OF_GRAPHS_KEY = "LDCBENCH_DATAGENERATOR_NUMBER_OF_GRAPHS";

public static final String ENV_SEED_KEY = "LDCBENCH_DATAGENERATOR_SEED";
public static final String ENV_COMPONENT_COUNT_KEY = "LDCBENCH_COMPONENT_COUNT";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public default int incomingEdgeCount(int nodeId) {
* the ID of the external graph the node belongs to.
*/
public int getGraphId(int nodeId);

public int getGraphId();

/**
* Returns the ID of the node in the external graph if this node is an external
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* An extension of the {@link Graph} interface offering methods for the addition
* of nodes and edges.
*
*
* @author Michael Röder (michael.roeder@uni-paderborn.de)
*
*/
Expand All @@ -13,7 +13,7 @@ public interface GraphBuilder extends Graph {
* Returns a {@link Graph} instance based on the graph data that the builder
* collected until now. This instance might offer a faster implementation than
* the builder class.
*
*
* @return a {@link Graph} instance containing the built graph.
*/
public default Graph build() {
Expand All @@ -23,7 +23,7 @@ public default Graph build() {
/**
* Adds a new edge with the given information if possible. Returns {@code true}
* if the edge could be added.
*
*
* @param sourceId
* the id of the source node
* @param targetId
Expand All @@ -37,15 +37,15 @@ public default Graph build() {

/**
* Adds a new node to the graph and returns its ID.
*
*
* @return the ID of the newly created node
*/
public int addNode();

/**
* Adds the given number of nodes to the graph and returns the range of node
* IDs.
*
*
* @param nodeCount
* the number of nodes that should be added
* @return the range of IDs from the first added node ([0], inclusive) to the
Expand All @@ -56,7 +56,7 @@ public default Graph build() {
/**
* Sets the IDs of the entrance nodes (i.e., nodes from which all other nodes
* can be reached).
*
*
* @param entranceNodes
* the IDs of the entrance nodes
*/
Expand All @@ -68,7 +68,7 @@ public default Graph build() {
* graph. However, to mark external nodes (i.e., nodes that are not part of this
* graph but are linked from one of the nodes of this graph), this method can be
* used to store their graph ID as well as their ID in the other graph.
*
*
* @param nodeId
* the ID of the node in this graph
* @param graphId
Expand All @@ -80,7 +80,8 @@ public default Graph build() {
* graphID != {@link #INTERNAL_NODE_GRAPH_ID})
*/
public void setGraphIdOfNode(int nodeId, int graphId, int externalId);


public void setGraphId(int i);
/**
* Sets the index of the first blank node of the graph.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ public class GraphMetadata implements Serializable {

public int numberOfNodes;
public int[] entranceNodes;
public int graphId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class GrphBasedGraph implements GraphBuilder {
*/
protected int blankNodesIndex = Integer.MAX_VALUE;

protected int actualGraphId;

/**
* Constructor for an empty GraphBuilder.
*/
Expand Down Expand Up @@ -112,7 +114,7 @@ public int[] outgoingEdgeTargets(int nodeId) {
public int[] outgoingEdgeTypes(int nodeId) {
return orderedOutgoingEdges(nodeId).map(this::getEdgeType).toArray();
}

@Override
public int outgoingEdgeCount(int nodeId) {
return graph.getOutEdgeDegree(nodeId);
Expand All @@ -125,7 +127,7 @@ public int[] incomingEdgeSources(int nodeId) {
public int[] incomingEdgeTypes(int nodeId) {
return orderedIncomingEdges(nodeId).map(this::getEdgeType).toArray();
}

@Override
public int incomingEdgeCount(int nodeId) {
return graph.getInEdgeDegree(nodeId);
Expand Down Expand Up @@ -263,6 +265,14 @@ public String toString() {
return graph.toString();
}

public int getGraphId() {
return actualGraphId;
}

public void setGraphId(int id) {
actualGraphId = id;
}

@Override
public boolean isBlankNode(int nodeId) {
return nodeId >= getBlankNodesIndex();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class LDCBench {
public static final Property httpDumpNodeCompressedRatio = property("httpDumpNodeCompressedRatio");
public static final Property httpDumpNodeWeight = property("httpDumpNodeWeight");
public static final Property numberOfNodes = property("numberOfNodes");
public static final Property numberOfGraphs = property("numberOfGraphs");
public static final Property blankNodesRatio = property("blankNodesRatio");
public static final Property macroRecall = property("macroRecall");
public static final Property microRecall = property("microRecall");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ public void init() throws Exception {
.getInt();
int averageRdfGraphDegree = RdfHelper.getLiteral(benchmarkParamModel, null, LDCBench.averageRdfGraphDegree)
.getInt();
int numberOfGraphs = RdfHelper.getLiteral(benchmarkParamModel, null, LDCBench.numberOfGraphs)
.getInt();
double httpDumpNodeCompressedRatio = RdfHelper
.getLiteral(benchmarkParamModel, null, LDCBench.httpDumpNodeCompressedRatio).getDouble();

Expand Down Expand Up @@ -443,7 +445,7 @@ public void handleNodeGraph(int senderId, Graph g) {
DataGenerator.ENV_ACCESS_URI_TEMPLATES_KEY + "=" + serializedAccessUris,
DataGenerator.ENV_RESOURCE_URI_TEMPLATES_KEY + "=" + serializedResourceUris, },
nodeManagers.get(i).getDataGeneratorEnvironment(averageRdfGraphDegree,
nodeSizeDeterminer.getNodeSize()));
nodeSizeDeterminer.getNodeSize(), numberOfGraphs));
createDataGenerator(nodeManagers.get(i), envVariables);
// FIXME: HOBBIT SDK workaround (setting environment for "containers")
if (sdk) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ public boolean canBeHub() {
}

@Override
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode) {
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs) {
String[] env = new String[]{
DataGenerator.ENV_AVERAGE_DEGREE_KEY + "=" + 0,
DataGenerator.ENV_NUMBER_OF_NODES_KEY + "=" + 1,
DataGenerator.ENV_NUMBER_OF_GRAPHS_KEY + "=" + 1,
};
return env;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ public String[] getNodeEnvironment() {
};

@Override
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode) {
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs) {
String[] env = new String[]{
DataGenerator.ENV_AVERAGE_DEGREE_KEY + "=" + averageRdfGraphDegree,
DataGenerator.ENV_NUMBER_OF_EDGES_KEY + "=" + triplesPerNode,
DataGenerator.ENV_NUMBER_OF_GRAPHS_KEY + "=" + 1,
};
return env;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ public String[] getNodeEnvironment() {
};

@Override
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode) {
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs) {
String[] env = new String[]{
DataGenerator.ENV_AVERAGE_DEGREE_KEY + "=" + averageRdfGraphDegree,
DataGenerator.ENV_NUMBER_OF_EDGES_KEY + "=" + triplesPerNode,
DataGenerator.ENV_NUMBER_OF_GRAPHS_KEY + "=" + numberOfGraphs,
};
return env;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ public String[] getNodeEnvironment() {
};

@Override
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode) {
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs) {
String[] env = new String[]{
DataGenerator.ENV_AVERAGE_DEGREE_KEY + "=" + averageRdfGraphDegree,
DataGenerator.ENV_NUMBER_OF_EDGES_KEY + "=" + triplesPerNode,
DataGenerator.ENV_NUMBER_OF_GRAPHS_KEY + "=" + 1,
};
return env;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ public String[] getNodeEnvironment() {
};

@Override
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode) {
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs) {
String[] env = new String[]{
DataGenerator.ENV_AVERAGE_DEGREE_KEY + "=" + 0,
DataGenerator.ENV_NUMBER_OF_NODES_KEY + "=" + 1,
DataGenerator.ENV_NUMBER_OF_GRAPHS_KEY + "=" + 1,
};
return env;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Interface of a manager class that gives the benchmark controller the
* necessary information to create a node of a certain type and supply it with
* the given data and meta data.
*
*
* @author Michael Röder (michael.roeder@uni-paderborn.de)
*
*/
Expand All @@ -15,62 +15,62 @@ public interface NodeManager {
/**
* Flag indicating whether the node created by this node manager can be used as
* a hub
*
*
* @return flag indicating whether the node created by this node manager can be
* used as a hub
*/
public boolean canBeHub();

/**
* Returns the Docker image name of the node.
*
*
* @return the Docker image name of the node.
*/
public String getNodeImageName();

/**
* Returns the environmental values for the generated node.
*
*
* @return the environmental values for the generated node.
*/
public String[] getNodeEnvironment();

/**
* Returns the Docker image name of the node's data generator.
*
*
* @return the Docker image name of the node's data generator.
*/
public String getDataGeneratorImageName();

/**
* Returns the environmental values for the generated node's data generator
* based on the given data.
*
*
* @param averageRdfGraphDegree the average degree of a node within the
* generated RDF graph
* @param triplesPerNode the average number of triples per node
* @return the environmental values for the generated node's data generator.
*/
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode);
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs);

/**
* Returns the label of the node type.
*
*
* @return the label of the node type.
*/
public abstract String getLabel();

/**
* Returns the metadata of this node.
*
*
* @return the metadata of this node.
*/
public NodeMetadata getMetadata();

/**
* Returns the weight for a link from the given node manager instance to this
* node manager instance.
*
*
* @param nodeManager the node manager instance that could create the outgoing link
* @return the weight of such a link in the range of [0,1]
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ public String[] getNodeEnvironment() {
};

@Override
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode) {
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs) {
String[] env = new String[]{
DataGenerator.ENV_AVERAGE_DEGREE_KEY + "=" + 0,
DataGenerator.ENV_NUMBER_OF_NODES_KEY + "=" + 1,
DataGenerator.ENV_NUMBER_OF_GRAPHS_KEY + "=" + 1,
};
return env;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ public boolean canBeHub() {
}

@Override
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode) {
public String[] getDataGeneratorEnvironment(long averageRdfGraphDegree, long triplesPerNode, long numberOfGraphs) {
String[] env = new String[]{
DataGenerator.ENV_AVERAGE_DEGREE_KEY + "=" + averageRdfGraphDegree,
DataGenerator.ENV_NUMBER_OF_EDGES_KEY + "=" + triplesPerNode,
DataGenerator.ENV_NUMBER_OF_GRAPHS_KEY + "=" + 1,
};
return env;
}
Expand Down
Loading