Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 11 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
pull_request:
branches:
- master
- preview
push:
branches:
- master
- preview

jobs:
package:
Expand All @@ -30,14 +32,12 @@ jobs:
fail-fast: false
matrix:
docker-img:
- docker.io/arangodb:3.4.9
- docker.io/arangodb:3.5.4
- docker.io/arangodb:3.6.2
- docker.io/arangodb/arangodb-preview:3.7.0-alpha.2
- docker.io/arangodb/enterprise:3.4.9
- docker.io/arangodb/enterprise:3.5.4
- docker.io/arangodb/enterprise:3.6.2
- docker.io/arangodb/enterprise-preview:3.7.0-alpha.2
- docker.io/arangodb:3.5.5
- docker.io/arangodb:3.6.4
- docker.io/arangodb/arangodb-preview:3.7.1-rc.1
- docker.io/arangodb/enterprise:3.5.5
- docker.io/arangodb/enterprise:3.6.4
- docker.io/arangodb/enterprise-preview:3.7.1-rc.1
topology:
- single
- cluster
Expand All @@ -54,3 +54,6 @@ jobs:
ARANGO_LICENSE_KEY: ${{ secrets.ARANGO_LICENSE_KEY }}
- name: Test
run: mvn --no-transfer-progress test
- name: Debug containers
if: ${{ cancelled() || failure() }}
run: ./docker/debug_containers_${{ matrix.topology }}.sh
15 changes: 15 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

## [6.7.0_PREVIEW_3.7.1-alpha.1] - 2020-05-22

- added support of `DisjointSmartGraphs` and `SatelliteGraphs` (ArangoDB v3.7)
- added support of `storedValues` in `ArangoSearchProperties` (ArangoDB v3.7)
- added support of `primarySortCompression` in `ArangoSearchProperties` (ArangoDB v3.7)
- added support of `overwriteMode` on document creation, to allow `insert-ignore`, `insert-replace` and `insert-update` (ArangoDB v3.7)
- added support of `mergeObjects` for insert document with `overwriteMode: update` (ArangoDB v3.7)
- velocypack v2.3.1

## [6.6.3] - 2020-05-06

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

- bugfix VelocyJack deserialization
- bugfix `allowImplicit` parameter in stream transactions

## [6.7.0_PREVIEW_3.7.0-alpha.2_0] - 2020-03-24

- added `overwriteMode` parameter to support insert-update (ArangoDB v3.7)
- satellite graphs support (ArangoDB v3.7)
- schema validation (ArangoDB v3.7)
- added `peakMemoryUsage` to aql statistics

## [6.6.1] - 2020-03-18
Expand Down
24 changes: 24 additions & 0 deletions docker/debug_containers_cluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
debug_container() {
echo "=== === === ==="
echo "=== $1"

running=$(docker inspect -f '{{.State.Running}}' "$1")

if [ "$running" = false ]; then
echo "=== $1 IS NOT RUNNING!"
fi

echo "=== === === ==="

docker logs "$1"
}

for c in agent1 \
agent2 \
agent3 \
dbserver1 \
dbserver2 \
coordinator1 \
coordinator2; do
debug_container $c
done
18 changes: 18 additions & 0 deletions docker/debug_containers_single.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
container_name="arangodb"

debug_container() {
echo "=== === === ==="
echo "=== $1"

running=$(docker inspect -f '{{.State.Running}}' "$1")

if [ "$running" = false ]; then
echo "=== $1 IS NOT RUNNING!"
fi

echo "=== === === ==="

docker logs "$1"
}

debug_container $container_name
2 changes: 1 addition & 1 deletion docker/start_db_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ docker pull "$1"

docker network create arangodb --subnet 172.28.0.0/16

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"
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"

echo "waiting for arangodb ..."

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.arangodb</groupId>
<artifactId>arangodb-java-driver</artifactId>
<version>6.6.3</version>
<version>6.7.0_PREVIEW_3.7.1-alpha.1</version>
<inceptionYear>2016</inceptionYear>
<packaging>jar</packaging>

Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/arangodb/entity/CollectionEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

package com.arangodb.entity;

import com.arangodb.model.CollectionSchema;

/**
* @author Mark Vollmary
* @see <a href="https://www.arangodb.com/docs/stable/http/collection-creating.html">API Documentation</a>
Expand All @@ -33,6 +35,7 @@ public class CollectionEntity implements Entity {
private Boolean isSystem;
private CollectionStatus status;
private CollectionType type;
private CollectionSchema schema;

public CollectionEntity() {
super();
Expand Down Expand Up @@ -66,4 +69,12 @@ public CollectionType getType() {
return type;
}

/**
* @return Optional object that specifies the collection level schema for documents.
* @since ArangoDB 3.7
*/
public CollectionSchema getSchema() {
return schema;
}

}
13 changes: 11 additions & 2 deletions src/main/java/com/arangodb/entity/GraphEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ public class GraphEntity implements Entity {
private Collection<EdgeDefinition> edgeDefinitions;
private Collection<String> orphanCollections;
private Boolean isSmart;
private Boolean isDisjoint;
private Integer numberOfShards;
private String smartGraphAttribute;
private Integer replicationFactor;
private ReplicationFactor replicationFactor;
private Integer minReplicationFactor;

public String getName() {
Expand All @@ -57,12 +58,20 @@ public Boolean getIsSmart() {
return isSmart;
}

public Boolean getIsDisjoint() {
return isDisjoint;
}

public Integer getNumberOfShards() {
return numberOfShards;
}

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

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

public Integer getMinReplicationFactor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* DISCLAIMER
*
* Copyright 2016 ArangoDB GmbH, Cologne, Germany
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright holder is ArangoDB GmbH, Cologne, Germany
*/

package com.arangodb.entity.arangosearch;


/**
* @author Michele Rastelli
* @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
* @since ArangoDB 3.7
*/
public enum ArangoSearchCompression {

/**
* (default): use LZ4 fast compression.
*/
lz4("lz4"),

/**
* disable compression to trade space for speed.
*/
none("none");

private final String value;

ArangoSearchCompression(String value) {
this.value = value;
}

public String getValue() {
return value;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
/**
* @author Mark Vollmary
* @author Heiko Kernbach
* @author Michele Rastelli
* @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
*/
public class ArangoSearchProperties {

Expand All @@ -36,11 +38,14 @@ public class ArangoSearchProperties {
private ConsolidationPolicy consolidationPolicy;
private final Collection<PrimarySort> primarySorts;
private final Collection<CollectionLink> links;
private ArangoSearchCompression primarySortCompression;
private final Collection<StoredValue> storedValues;

public ArangoSearchProperties() {
super();
links = new ArrayList<>();
primarySorts = new ArrayList<>();
storedValues = new ArrayList<>();
}

public Long getCommitIntervalMsec() {
Expand Down Expand Up @@ -90,4 +95,32 @@ public Collection<PrimarySort> getPrimarySort() {
public void addPrimarySort(final PrimarySort... primarySorts) {
this.primarySorts.addAll(Arrays.asList(primarySorts));
}

/**
* @return Defines how to compress the primary sort data (introduced in v3.7.0). ArangoDB v3.5 and v3.6 always
* compress the index using LZ4.
* @since ArangoDB 3.7
*/
public ArangoSearchCompression getPrimarySortCompression() {
return primarySortCompression;
}

public void setPrimarySortCompression(ArangoSearchCompression primarySortCompression) {
this.primarySortCompression = primarySortCompression;
}

/**
* @return An array of objects to describe which document attributes to store in the View index. It can then cover
* search queries, which means the data can be taken from the index directly and accessing the storage engine can be
* avoided.
* @since ArangoDB 3.7
*/
public Collection<StoredValue> getStoredValues() {
return storedValues;
}

public void addStoredValues(final StoredValue... storedValues) {
this.storedValues.addAll(Arrays.asList(storedValues));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

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

Expand Down Expand Up @@ -94,4 +96,24 @@ public Collection<CollectionLink> getLinks() {
public Collection<PrimarySort> getPrimarySort() {
return properties.getPrimarySort();
}

/**
* @return Defines how to compress the primary sort data (introduced in v3.7.0). ArangoDB v3.5 and v3.6 always
* compress the index using LZ4.
* @since ArangoDB 3.7
*/
public ArangoSearchCompression getPrimarySortCompression() {
return properties.getPrimarySortCompression();
}

/**
* @return An array of objects to describe which document attributes to store in the View index. It can then cover
* search queries, which means the data can be taken from the index directly and accessing the storage engine can be
* avoided.
* @since ArangoDB 3.7
*/
public Collection<StoredValue> getStoredValues() {
return properties.getStoredValues();
}

}
61 changes: 61 additions & 0 deletions src/main/java/com/arangodb/entity/arangosearch/StoredValue.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* DISCLAIMER
*
* Copyright 2016 ArangoDB GmbH, Cologne, Germany
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright holder is ArangoDB GmbH, Cologne, Germany
*/

package com.arangodb.entity.arangosearch;


import java.util.List;

/**
* @author Michele Rastelli
* @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
* @since ArangoDB 3.7
*/
public class StoredValue {

private final List<String> fields;
private final ArangoSearchCompression compression;

public StoredValue(List<String> fields, ArangoSearchCompression compression) {
this.fields = fields;
this.compression = compression;
}

public StoredValue(List<String> fields) {
this(fields, null);
}

/**
* @return an array of strings with one or more document attribute paths. The specified attributes are placed into a
* single column of the index. A column with all fields that are involved in common search queries is ideal for
* performance. The column should not include too many unneeded fields however.
*/
public List<String> getFields() {
return fields;
}

/**
* @return defines the compression type used for the internal column-store
*/
public ArangoSearchCompression getCompression() {
return compression;
}

}
Loading