Skip to content
Permalink
Browse files
update input.edge_freq default value to MULTIPLE (#106)
  • Loading branch information
corgiboygsj committed Oct 12, 2021
1 parent 3936792 commit 7a49330d888c40ab6e92b0640167bb9c4f1c7277
Showing 3 changed files with 5 additions and 3 deletions.
@@ -154,7 +154,7 @@ public static synchronized ComputerOptions instance() {
"targetId to identify it.",
allowValues("SINGLE", "SINGLE_PER_LABEL", "MULTIPLE"),
EdgeFrequency::valueOf,
"SINGLE"
"MULTIPLE"
);

public static final ConfigOption<Integer> INPUT_MAX_EDGES_IN_ONE_VERTEX =
@@ -90,7 +90,8 @@ public void setup() {
ComputerOptions.WORKER_WAIT_FINISH_MESSAGES_TIMEOUT, "1000",
ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "10",
ComputerOptions.WORKER_COMPUTATION_CLASS,
MockComputation.class.getName()
MockComputation.class.getName(),
ComputerOptions.INPUT_EDGE_FREQ, "SINGLE"
);

this.managers = new Managers();
@@ -141,7 +141,6 @@ public void testWriteVertex() throws IOException {
public void testWriteVertexWithEdgeFreq() throws IOException {
GraphFactory graphFactory = context.graphFactory();

WriteBuffer buffer = new WriteBuffer(context, 100, 110);
Vertex vertex = graphFactory.createVertex(BytesId.of(1L),
new DoubleValue(0.5d));
vertex.addEdge(graphFactory.createEdge(BytesId.of(2L)));
@@ -152,9 +151,11 @@ public void testWriteVertexWithEdgeFreq() throws IOException {
vertex.addEdge(graphFactory.createEdge("watch", "2222",
BytesId.of(4L)));

WriteBuffer buffer;
UnitTestBase.updateOptions(
ComputerOptions.INPUT_EDGE_FREQ, "SINGLE"
);
buffer = new WriteBuffer(ComputerContext.instance(), 100, 110);
buffer.writeEdges(vertex);
long position1 = buffer.output().position();
Assert.assertGt(0L, position1);

0 comments on commit 7a49330

Please sign in to comment.