Skip to content

Commit 3f3036c

Browse files
committed
Merge branch 'preview'
2 parents e506f6b + e97d2f5 commit 3f3036c

26 files changed

+885
-30
lines changed

.github/workflows/maven.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- preview
78
push:
89
branches:
910
- master
11+
- preview
1012

1113
jobs:
1214
package:
@@ -30,14 +32,12 @@ jobs:
3032
fail-fast: false
3133
matrix:
3234
docker-img:
33-
- docker.io/arangodb:3.4.9
34-
- docker.io/arangodb:3.5.4
35-
- docker.io/arangodb:3.6.2
36-
- docker.io/arangodb/arangodb-preview:3.7.0-alpha.2
37-
- docker.io/arangodb/enterprise:3.4.9
38-
- docker.io/arangodb/enterprise:3.5.4
39-
- docker.io/arangodb/enterprise:3.6.2
40-
- docker.io/arangodb/enterprise-preview:3.7.0-alpha.2
35+
- docker.io/arangodb:3.5.5
36+
- docker.io/arangodb:3.6.4
37+
- docker.io/arangodb/arangodb-preview:3.7.1-rc.1
38+
- docker.io/arangodb/enterprise:3.5.5
39+
- docker.io/arangodb/enterprise:3.6.4
40+
- docker.io/arangodb/enterprise-preview:3.7.1-rc.1
4141
topology:
4242
- single
4343
- cluster
@@ -54,3 +54,6 @@ jobs:
5454
ARANGO_LICENSE_KEY: ${{ secrets.ARANGO_LICENSE_KEY }}
5555
- name: Test
5656
run: mvn --no-transfer-progress test
57+
- name: Debug containers
58+
if: ${{ cancelled() || failure() }}
59+
run: ./docker/debug_containers_${{ matrix.topology }}.sh

ChangeLog.md

+15
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [6.7.0_PREVIEW_3.7.1-alpha.1] - 2020-05-22
10+
11+
- added support of `DisjointSmartGraphs` and `SatelliteGraphs` (ArangoDB v3.7)
12+
- added support of `storedValues` in `ArangoSearchProperties` (ArangoDB v3.7)
13+
- added support of `primarySortCompression` in `ArangoSearchProperties` (ArangoDB v3.7)
14+
- added support of `overwriteMode` on document creation, to allow `insert-ignore`, `insert-replace` and `insert-update` (ArangoDB v3.7)
15+
- added support of `mergeObjects` for insert document with `overwriteMode: update` (ArangoDB v3.7)
16+
- velocypack v2.3.1
17+
918
## [6.6.3] - 2020-05-06
1019

1120
- velocypack v2.3.1
@@ -14,6 +23,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
1423

1524
- bugfix VelocyJack deserialization
1625
- bugfix `allowImplicit` parameter in stream transactions
26+
27+
## [6.7.0_PREVIEW_3.7.0-alpha.2_0] - 2020-03-24
28+
29+
- added `overwriteMode` parameter to support insert-update (ArangoDB v3.7)
30+
- satellite graphs support (ArangoDB v3.7)
31+
- schema validation (ArangoDB v3.7)
1732
- added `peakMemoryUsage` to aql statistics
1833

1934
## [6.6.1] - 2020-03-18

docker/debug_containers_cluster.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
debug_container() {
2+
echo "=== === === ==="
3+
echo "=== $1"
4+
5+
running=$(docker inspect -f '{{.State.Running}}' "$1")
6+
7+
if [ "$running" = false ]; then
8+
echo "=== $1 IS NOT RUNNING!"
9+
fi
10+
11+
echo "=== === === ==="
12+
13+
docker logs "$1"
14+
}
15+
16+
for c in agent1 \
17+
agent2 \
18+
agent3 \
19+
dbserver1 \
20+
dbserver2 \
21+
coordinator1 \
22+
coordinator2; do
23+
debug_container $c
24+
done

docker/debug_containers_single.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
container_name="arangodb"
2+
3+
debug_container() {
4+
echo "=== === === ==="
5+
echo "=== $1"
6+
7+
running=$(docker inspect -f '{{.State.Running}}' "$1")
8+
9+
if [ "$running" = false ]; then
10+
echo "=== $1 IS NOT RUNNING!"
11+
fi
12+
13+
echo "=== === === ==="
14+
15+
docker logs "$1"
16+
}
17+
18+
debug_container $container_name

docker/start_db_single.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ docker pull "$1"
1111

1212
docker network create arangodb --subnet 172.28.0.0/16
1313

14-
docker run -d -p 8529:8529 -e ARANGO_ROOT_PASSWORD=test -e ARANGO_LICENSE_KEY="$ARANGO_LICENSE_KEY" --network arangodb --ip 172.28.3.1 "$1"
14+
docker run -d -p 8529:8529 -e ARANGO_ROOT_PASSWORD=test -e ARANGO_LICENSE_KEY="$ARANGO_LICENSE_KEY" --network arangodb --ip 172.28.3.1 --name arangodb "$1"
1515

1616
echo "waiting for arangodb ..."
1717

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.arangodb</groupId>
77
<artifactId>arangodb-java-driver</artifactId>
8-
<version>6.6.3</version>
8+
<version>6.7.0_PREVIEW_3.7.1-alpha.1</version>
99
<inceptionYear>2016</inceptionYear>
1010
<packaging>jar</packaging>
1111

src/main/java/com/arangodb/entity/CollectionEntity.java

+11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
package com.arangodb.entity;
2222

23+
import com.arangodb.model.CollectionSchema;
24+
2325
/**
2426
* @author Mark Vollmary
2527
* @see <a href="https://www.arangodb.com/docs/stable/http/collection-creating.html">API Documentation</a>
@@ -33,6 +35,7 @@ public class CollectionEntity implements Entity {
3335
private Boolean isSystem;
3436
private CollectionStatus status;
3537
private CollectionType type;
38+
private CollectionSchema schema;
3639

3740
public CollectionEntity() {
3841
super();
@@ -66,4 +69,12 @@ public CollectionType getType() {
6669
return type;
6770
}
6871

72+
/**
73+
* @return Optional object that specifies the collection level schema for documents.
74+
* @since ArangoDB 3.7
75+
*/
76+
public CollectionSchema getSchema() {
77+
return schema;
78+
}
79+
6980
}

src/main/java/com/arangodb/entity/GraphEntity.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ public class GraphEntity implements Entity {
3636
private Collection<EdgeDefinition> edgeDefinitions;
3737
private Collection<String> orphanCollections;
3838
private Boolean isSmart;
39+
private Boolean isDisjoint;
3940
private Integer numberOfShards;
4041
private String smartGraphAttribute;
41-
private Integer replicationFactor;
42+
private ReplicationFactor replicationFactor;
4243
private Integer minReplicationFactor;
4344

4445
public String getName() {
@@ -57,12 +58,20 @@ public Boolean getIsSmart() {
5758
return isSmart;
5859
}
5960

61+
public Boolean getIsDisjoint() {
62+
return isDisjoint;
63+
}
64+
6065
public Integer getNumberOfShards() {
6166
return numberOfShards;
6267
}
6368

6469
public Integer getReplicationFactor() {
65-
return replicationFactor;
70+
return replicationFactor.getReplicationFactor();
71+
}
72+
73+
public Boolean getSatellite() {
74+
return this.replicationFactor.getSatellite();
6675
}
6776

6877
public Integer getMinReplicationFactor() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* DISCLAIMER
3+
*
4+
* Copyright 2016 ArangoDB GmbH, Cologne, Germany
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* Copyright holder is ArangoDB GmbH, Cologne, Germany
19+
*/
20+
21+
package com.arangodb.entity.arangosearch;
22+
23+
24+
/**
25+
* @author Michele Rastelli
26+
* @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
27+
* @since ArangoDB 3.7
28+
*/
29+
public enum ArangoSearchCompression {
30+
31+
/**
32+
* (default): use LZ4 fast compression.
33+
*/
34+
lz4("lz4"),
35+
36+
/**
37+
* disable compression to trade space for speed.
38+
*/
39+
none("none");
40+
41+
private final String value;
42+
43+
ArangoSearchCompression(String value) {
44+
this.value = value;
45+
}
46+
47+
public String getValue() {
48+
return value;
49+
}
50+
51+
}

src/main/java/com/arangodb/entity/arangosearch/ArangoSearchProperties.java

+33
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
/**
2828
* @author Mark Vollmary
2929
* @author Heiko Kernbach
30+
* @author Michele Rastelli
31+
* @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
3032
*/
3133
public class ArangoSearchProperties {
3234

@@ -36,11 +38,14 @@ public class ArangoSearchProperties {
3638
private ConsolidationPolicy consolidationPolicy;
3739
private final Collection<PrimarySort> primarySorts;
3840
private final Collection<CollectionLink> links;
41+
private ArangoSearchCompression primarySortCompression;
42+
private final Collection<StoredValue> storedValues;
3943

4044
public ArangoSearchProperties() {
4145
super();
4246
links = new ArrayList<>();
4347
primarySorts = new ArrayList<>();
48+
storedValues = new ArrayList<>();
4449
}
4550

4651
public Long getCommitIntervalMsec() {
@@ -90,4 +95,32 @@ public Collection<PrimarySort> getPrimarySort() {
9095
public void addPrimarySort(final PrimarySort... primarySorts) {
9196
this.primarySorts.addAll(Arrays.asList(primarySorts));
9297
}
98+
99+
/**
100+
* @return Defines how to compress the primary sort data (introduced in v3.7.0). ArangoDB v3.5 and v3.6 always
101+
* compress the index using LZ4.
102+
* @since ArangoDB 3.7
103+
*/
104+
public ArangoSearchCompression getPrimarySortCompression() {
105+
return primarySortCompression;
106+
}
107+
108+
public void setPrimarySortCompression(ArangoSearchCompression primarySortCompression) {
109+
this.primarySortCompression = primarySortCompression;
110+
}
111+
112+
/**
113+
* @return An array of objects to describe which document attributes to store in the View index. It can then cover
114+
* search queries, which means the data can be taken from the index directly and accessing the storage engine can be
115+
* avoided.
116+
* @since ArangoDB 3.7
117+
*/
118+
public Collection<StoredValue> getStoredValues() {
119+
return storedValues;
120+
}
121+
122+
public void addStoredValues(final StoredValue... storedValues) {
123+
this.storedValues.addAll(Arrays.asList(storedValues));
124+
}
125+
93126
}

src/main/java/com/arangodb/entity/arangosearch/ArangoSearchPropertiesEntity.java

+22
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
/**
2929
* @author Mark Vollmary
30+
* @author Michele Rastelli
31+
* @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
3032
*/
3133
public class ArangoSearchPropertiesEntity extends ViewEntity {
3234

@@ -94,4 +96,24 @@ public Collection<CollectionLink> getLinks() {
9496
public Collection<PrimarySort> getPrimarySort() {
9597
return properties.getPrimarySort();
9698
}
99+
100+
/**
101+
* @return Defines how to compress the primary sort data (introduced in v3.7.0). ArangoDB v3.5 and v3.6 always
102+
* compress the index using LZ4.
103+
* @since ArangoDB 3.7
104+
*/
105+
public ArangoSearchCompression getPrimarySortCompression() {
106+
return properties.getPrimarySortCompression();
107+
}
108+
109+
/**
110+
* @return An array of objects to describe which document attributes to store in the View index. It can then cover
111+
* search queries, which means the data can be taken from the index directly and accessing the storage engine can be
112+
* avoided.
113+
* @since ArangoDB 3.7
114+
*/
115+
public Collection<StoredValue> getStoredValues() {
116+
return properties.getStoredValues();
117+
}
118+
97119
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* DISCLAIMER
3+
*
4+
* Copyright 2016 ArangoDB GmbH, Cologne, Germany
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* Copyright holder is ArangoDB GmbH, Cologne, Germany
19+
*/
20+
21+
package com.arangodb.entity.arangosearch;
22+
23+
24+
import java.util.List;
25+
26+
/**
27+
* @author Michele Rastelli
28+
* @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
29+
* @since ArangoDB 3.7
30+
*/
31+
public class StoredValue {
32+
33+
private final List<String> fields;
34+
private final ArangoSearchCompression compression;
35+
36+
public StoredValue(List<String> fields, ArangoSearchCompression compression) {
37+
this.fields = fields;
38+
this.compression = compression;
39+
}
40+
41+
public StoredValue(List<String> fields) {
42+
this(fields, null);
43+
}
44+
45+
/**
46+
* @return an array of strings with one or more document attribute paths. The specified attributes are placed into a
47+
* single column of the index. A column with all fields that are involved in common search queries is ideal for
48+
* performance. The column should not include too many unneeded fields however.
49+
*/
50+
public List<String> getFields() {
51+
return fields;
52+
}
53+
54+
/**
55+
* @return defines the compression type used for the internal column-store
56+
*/
57+
public ArangoSearchCompression getCompression() {
58+
return compression;
59+
}
60+
61+
}

0 commit comments

Comments
 (0)