Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
992c3ca
preview CI
rashtao Mar 19, 2020
0b4f404
Insert-Update (#336)
rashtao Mar 24, 2020
4f0a9e1
satellite graphs (#337)
rashtao Mar 24, 2020
ba7a162
schema validation (#339)
rashtao Mar 24, 2020
8e61624
added peakMemoryUsage aql stats
rashtao Mar 20, 2020
4c76631
v6.7.0_PREVIEW_3.7.0-alpha.2_0
rashtao Mar 24, 2020
597b007
Merge branch 'master' into preview
rashtao Apr 2, 2020
74c7561
renamed collection validation to schema
rashtao Apr 16, 2020
8f74095
bugfix validation error response code
rashtao Apr 17, 2020
4b507ce
Merge branch 'master' into preview
rashtao May 19, 2020
d7bf6dc
overwriteMode conflict and ignore
rashtao May 19, 2020
262568f
primarySortCompression
rashtao May 19, 2020
99c3c9a
ArangoSearchProperties storedValues
rashtao May 19, 2020
f7adff3
check db version in ArangoSearchTest
rashtao May 19, 2020
b007c94
added keepNull & mergeObjects parameters for insert-update document
rashtao May 20, 2020
b33f14f
disjoint smart graphs
rashtao May 20, 2020
489accd
docker images matrix upd
rashtao May 20, 2020
599fdd3
bugfix getAndClearSlowQueries test
rashtao May 20, 2020
15f0181
Revert "added keepNull & mergeObjects parameters for insert-update do…
rashtao May 22, 2020
9f2420c
ChangeLog.md upd
rashtao May 22, 2020
d7714a9
ChangeLog.md upd
rashtao May 22, 2020
f2f26d9
added mergeObjects parameters for insert-update document
rashtao May 22, 2020
40693f6
v6.7.0_PREVIEW_3.7.1-alpha.1
rashtao May 22, 2020
b40b24a
gh actions debug containers on tests failure
rashtao May 25, 2020
c57080b
fixed async tests
rashtao Jun 29, 2020
1285877
Merge branch 'master' into preview
rashtao Jun 30, 2020
b36e0ef
javadoc upd
rashtao Jun 30, 2020
c3bf2d5
javadoc upd
rashtao Jun 30, 2020
04578bb
test matrix upd
rashtao Jun 30, 2020
e97d2f5
Merge branch 'master' into preview
rashtao Jul 1, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
satellite graphs (#337)
  • Loading branch information
rashtao authored Mar 24, 2020
commit 4f0a9e1195bc8b0175bc3686716735d3d0efede2
8 changes: 6 additions & 2 deletions src/main/java/com/arangodb/entity/GraphEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class GraphEntity implements Entity {
private Boolean isSmart;
private Integer numberOfShards;
private String smartGraphAttribute;
private Integer replicationFactor;
private ReplicationFactor replicationFactor;
private Integer minReplicationFactor;

public String getName() {
Expand All @@ -62,7 +62,11 @@ public Integer getNumberOfShards() {
}

public Integer getReplicationFactor() {
return replicationFactor;
return replicationFactor.getReplicationFactor();
}

public Boolean getSatellite() {
return this.replicationFactor.getSatellite();
}

public Integer getMinReplicationFactor() {
Expand Down
35 changes: 30 additions & 5 deletions src/main/java/com/arangodb/model/GraphCreateOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package com.arangodb.model;

import com.arangodb.entity.EdgeDefinition;
import com.arangodb.entity.ReplicationFactor;

import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -94,7 +95,7 @@ public GraphCreateOptions isSmart(final Boolean isSmart) {
}

public Integer getReplicationFactor() {
return getOptions().getReplicationFactor();
return getOptions().replicationFactor.getReplicationFactor();
}

/**
Expand All @@ -108,7 +109,22 @@ public Integer getReplicationFactor() {
* @return options
*/
public GraphCreateOptions replicationFactor(final Integer replicationFactor) {
getOptions().setReplicationFactor(replicationFactor);
getOptions().replicationFactor.setReplicationFactor(replicationFactor);
return this;
}

public Boolean getSatellite() {
return getOptions().replicationFactor.getSatellite();
}

/**
* @param satellite If the true the graph is created as a satellite graph. In this case
* {@link #replicationFactor(Integer)} is ignored.
* @return options
* @since ArangoDB 3.7
*/
public GraphCreateOptions satellite(final Boolean satellite) {
getOptions().replicationFactor.setSatellite(satellite);
return this;
}

Expand Down Expand Up @@ -167,21 +183,30 @@ private SmartOptions getOptions() {
}

public static class SmartOptions {
private Integer replicationFactor;
private ReplicationFactor replicationFactor;
private Integer minReplicationFactor;
private Integer numberOfShards;
private String smartGraphAttribute;

public SmartOptions() {
super();
replicationFactor = new ReplicationFactor();
}

public Integer getReplicationFactor() {
return replicationFactor;
return replicationFactor.getReplicationFactor();
}

public void setReplicationFactor(final Integer replicationFactor) {
this.replicationFactor = replicationFactor;
this.replicationFactor.setReplicationFactor(replicationFactor);
}

public Boolean getSatellite() {
return replicationFactor.getSatellite();
}

public void setSatellite(final Boolean satellite) {
replicationFactor.setSatellite(satellite);
}

public Integer getMinReplicationFactor() {
Expand Down
17 changes: 17 additions & 0 deletions src/test/java/com/arangodb/ArangoDatabaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,23 @@ public void createGraph() {
assertThat(result.getName(), is(name));
}

@Test
public void createGraphSatellite() {
assumeTrue(isAtLeastVersion(3, 7));
assumeTrue(isCluster());
assumeTrue(isEnterprise());

String name = "graph-" + rnd();
final GraphEntity result = db.createGraph(name, null, new GraphCreateOptions().satellite(true));
assertThat(result.getSatellite(), is(true));

GraphEntity info = db.graph(name).getInfo();
assertThat(info.getSatellite(), is(true));

GraphEntity graph = db.getGraphs().stream().filter(g -> name.equals(g.getName())).findFirst().get();
assertThat(graph.getSatellite(), is(true));
}

@Test
public void createGraphReplicationFaktor() {
assumeTrue(isCluster());
Expand Down