diff --git a/3.5/deployment-kubernetes-backup-policy-resource.md b/3.5/deployment-kubernetes-backup-policy-resource.md new file mode 100644 index 0000000000..9edcceb469 --- /dev/null +++ b/3.5/deployment-kubernetes-backup-policy-resource.md @@ -0,0 +1,162 @@ +--- +layout: default +description: ArangoBackupPolicy Custom Resource +--- + +# ArangoBackupPolicy Custom Resource + +The ArangoBackupPolicy represents schedule definition for creating ArangoBackup Custom Resources by operator. +This deployment specification is a `CustomResource` following +a `CustomResourceDefinition` created by the operator. + +## Examples: + +### Create schedule for all deployments + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * *" +``` + +Action: + +Create an ArangoBackup Custom Resource for each ArangoBackup every 15 minutes + +### Create schedule for selected deployments + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * *" + selector: + matchLabels: + labelName: "labelValue" +``` + +Action: + +Create an ArangoBackup Custom Resource for selected ArangoBackup every 15 minutes + +### Create schedule for all deployments and upload + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * * " + template: + upload: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" +``` + +Create an ArangoBackup Custom Resource for each ArangoBackup every 15 minutes and upload to repositoryURL + +## ArangoBackup Custom Resource Spec: + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * * " + selector: + matchLabels: + labelName: "labelValue" + matchExpressions: [] + template: + options: + timeout: 3 + force: true + upload: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" +status: + scheduled: "time" + message: "message" +``` + +## `spec: Object` + +Spec of the ArangoBackupPolicy Custom Resource + +Required: true + +Default: {} + +### `spec.schedule: String` + +Schedule definition. Parser from https://godoc.org/github.com/robfig/cron + +Required: true + +Default: "" + +### `spec.selector: Object` + +Selector definition for selecting matching ArangoBackup Custom Resources. Parser from https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector + +Required: false + +Default: {} + +### `spec.template: ArangoBackupTemplate` + +Template for the ArangoBackup Custom Resource + +Required: false + +Default: {} + +### `spec.template.options: ArangoBackup - spec.options` + +ArangoBackup options + +Required: false + +Default: {} + +### `spec.template.upload: ArangoBackup - spec.upload` + +ArangoBackup upload configuration + +Required: false + +Default: {} + +## `status: Object` + +Status of the ArangoBackupPolicy Custom Resource managed by operator + +Required: true + +Default: {} + +### `status.scheduled: TimeStamp` + +Next scheduled time in UTC + +Required: true + +Default: "" + +### `status.message: String` + +Message from the operator in case of failure - schedule not valid, ArangoBackupPolicy not valid + +Required: false + +Default: "" \ No newline at end of file diff --git a/3.5/deployment-kubernetes-backup-resource.md b/3.5/deployment-kubernetes-backup-resource.md new file mode 100644 index 0000000000..0532a63f86 --- /dev/null +++ b/3.5/deployment-kubernetes-backup-resource.md @@ -0,0 +1,462 @@ +--- +layout: default +description: ArangoBackup Custom Resource +--- + +# ArangoBackup Custom Resource + +The ArangoBackup Operator creates and maintains ArangoBackups +in a Kubernetes cluster, given a Backup specification. +This deployment specification is a `CustomResource` following +a `CustomResourceDefinition` created by the operator. + +## Examples: + +### Create simple Backup + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + deployment: + name: "my-deployment" +``` + +Action: + +Create Backup on ArangoDeployment named `my-deployment` + +### Create and upload Backup + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + deployment: + name: "my-deployment" + upload: + repositoryURL: "S3://test/kube-test" + credentialsSecretName: "my-s3-rclone-credentials" +``` + +Action: + +Create Backup on ArangoDeployment named `my-deployment` and upload it to `S3://test/kube-test`. + + +### Download Backup + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + deployment: + name: "my-deployment" + download: + repositoryURL: "S3://test/kube-test" + credentialsSecretName: "my-s3-rclone-credentials" + id: "backup-id" +``` + +Download Backup with id `backup-id` from `S3://test/kube-test` on ArangoDeployment named `my-deployment` + +### Restore + +Information about restoring can be found in [ArangoDeployment](deployment-kubernetes-deployment-resource.html). + +## Advertised fields + +List of custom columns in CRD specification for Kubectl: +- `.spec.policyName` - optional name of the policy +- `.spec.deployment.name` - name of the deployment +- `.status.state` - current ArangoBackup Custom Resource state +- `.status.message` - additional message for current state + +## ArangoBackup Custom Resource Spec: + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + policyName: "my-policy" + deployment: + name: "my-deployment" + options: + timeout: 3 + force: true + download: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" + id: "backup-id" + upload: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" +status: + state: "Ready" + time: "time" + message: "Message details" - + progress: + jobID: "id" + progress: "10%" + backup: + id: "id" + version: "3.6.0-dev" + forced: true + uploaded: true + downloaded: true + createdAt: "time" + sizeInBytes: 1 + numberOfDBServers: 3 + available: true +``` + +## `spec: Object` + +Spec of the ArangoBackup Custom Resource. + +Required: true + +Default: {} + +### `spec.deployment: Object` + +ArangoDeployment specification. + +Field is immutable. + +Required: true + +Default: {} + +#### `spec.deployment.name: String` + +Name of the ArangoDeployment Custom Resource within same namespace as ArangoBackup Custom Resource. + +Field is immutable. + +Required: true + +Default: "" + +#### `spec.policyName: String` + +Name of the ArangoBackupPolicy which created this Custom Resource + +Field is immutable. + +Required: false + +Default: "" + +### `spec.options: Object` + +Backup options. + +Field is immutable. + +Required: false + +Default: {} + +#### `spec.options.timeout: float` + +Timeout for Backup creation request in seconds. + +Field is immutable. + +Required: false + +Default: 30 + +#### `spec.options.allowInconsistent: bool` + +AllowInconsistent flag for Backup creation request. +If this value is set to true, backup is taken even if we are not able to acquire lock. + +Field is immutable. + +Required: false + +Default: false + +### `spec.download: Object` + +Backup download settings. + +Field is immutable. + +Required: false + +Default: {} + +#### `spec.download.repositoryURL: string` + +Field is immutable. Protocol needs to be defined in `spec.download.credentialsSecretName` if protocol is other than local. + +Mode protocols can be found [here](https://rclone.org/){:target="_blank"}. + +Format: `:/` + +Examples: +- `s3://my-bucket/test` +- `azure://test` + +Required: true + +Default: "" + +#### `spec.download.credentialsSecretName: string` + +Field is immutable. Name of the secret used while accessing repository + +Secret structure: + +```yaml +apiVersion: v1 +data: + token: +kind: Secret +metadata: + name: +type: Opaque +``` + +`JSON Token` options are described on the [rClone](https://rclone.org/){:target="_blank"} page. +We can define more than one protocols at same time in one secret. + +This field is defined in json format: + +```json +{ + "": { + "type":"", + ...parameters + } +} +``` + +AWS S3 example - based on [rClone S3](https://rclone.org/s3/){:target="_blank"} documentation and interactive process: + +```json +{ + "S3": { + "type": "s3", # Choose s3 type + "provider": "AWS", # Choose one of the providers + "env_auth": "false", # Define credentials in next step instead of using ENV + "access_key_id": "xxx", + "secret_access_key": "xxx", + "region": "eu-west-2", # Choose region + "acl": "private", # Set permissions on newly created remote object + } +} +``` + +and you can from now use `S3://bucket/path`. + +Required: false + +Default: "" + +#### `spec.download.id: string` + +ID of the ArangoBackup to be downloaded. + +Field is immutable. + +Required: true + +Default: "" + +### `spec.upload: Object` + +Backup upload settings. + +This field can be removed and created again with different values. This operation will trigger upload again. +Fields in Custom Resource Spec Upload are immutable. + +Required: false + +Default: {} + +#### `spec.upload.repositoryURL: string` + +Same structure as `spec.download.repositoryURL`. + +Required: true + +Default: "" + +#### `spec.upload.credentialsSecretName: string` + +Same structure as `spec.download.credentialsSecretName`. + +Required: false + +Default: "" + +## `status: Object` + +Status of the ArangoBackup Custom Resource. This field is managed by subresource and only by operator + +Required: true + +Default: {} + +### `status.state: enum` + +State of the ArangoBackup object. + +Required: true + +Default: "" + +Possible states: +- "" - default state, changed to "Pending" +- "Pending" - state in which Custom Resource is queued. If Backup is possible changed to "Scheduled" +- "Scheduled" - state which will start create/download process +- "Download" - state in which download request will be created on ArangoDB +- "DownloadError" - state when download failed +- "Downloading" - state for downloading progress +- "Create" - state for creation, field available set to true +- "Upload" - state in which upload request will be created on ArangoDB +- "Uploading" - state for uploading progress +- "UploadError" - state when uploading failed +- "Ready" - state when Backup is finished +- "Deleted" - state when Backup was once in ready, but has been deleted +- "Failed" - state for failure +- "Unavailable" - state when Backup is not available on the ArangoDB. It can happen in case of upgrades, node restarts etc. + +### `status.time: timestamp` + +Time in UTC when state of the ArangoBackup Custom Resource changed. + +Required: true + +Default: "" + +### `status.message: string` + +State message of the ArangoBackup Custom Resource. + +Required: false + +Default: "" + +### `status.progress: object` + +Progress info of the uploading and downloading process. + +Required: false + +Default: {} + +#### `status.progress.jobID: string` + +ArangoDB job ID for uploading or downloading. + +Required: true + +Default: "" + +#### `status.progress.progress: string` + +ArangoDeployment job progress. + +Required: true + +Default: "0%" + + +### `status.backup: object` + +ArangoBackup details. + +Required: true + +Default: {} + +#### `status.backup.id: string` + +ArangoBackup ID. + +Required: true + +Default: "" + +#### `status.backup.version: string` + +ArangoBackup version. + +Required: true + +Default: "" + +#### `status.backup.potentiallyInconsistent: bool` + +ArangoBackup potentially inconsistent flag. + +Required: false + +Default: false + +#### `status.backup.uploaded: bool` + +Determines if ArangoBackup has been uploaded. + +Required: false + +Default: false + +#### `status.backup.downloaded: bool` + +Determines if ArangoBackup has been downloaded. + +Required: false + +Default: false + +#### `status.backup.createdAt: TimeStamp` + +ArangoBackup Custom Resource creation time in UTC. + +Required: true + +Default: now() + +#### `status.backup.sizeInBytes: uint64` + +Size of the Backup in ArangoDB. + +Required: true + +Default: 0 + +#### `status.backup.numberOfDBServers: uint` + +Cluster size of the Backup in ArangoDB. + +Required: true + +Default: 0 + +### `status.available: bool` + +Determines if we can restore from ArangoBackup. + +Required: true + +Default: false \ No newline at end of file diff --git a/3.5/deployment-kubernetes-deployment-resource.md b/3.5/deployment-kubernetes-deployment-resource.md index 88f003cc30..a5cfa31f42 100644 --- a/3.5/deployment-kubernetes-deployment-resource.md +++ b/3.5/deployment-kubernetes-deployment-resource.md @@ -101,6 +101,10 @@ Possible values are: - `IfNotPresent` (default) to pull only when the image is not found on the node. - `Always` to always pull the image before using it. +### `spec.imagePullSecrets: []string` + +This setting specifies the list of image pull secrets for the docker image to use for all ArangoDB servers. + ### `spec.storageEngine: string` This setting specifies the type of storage engine used for all servers @@ -144,6 +148,20 @@ The encryption key cannot be changed after the cluster has been created. The secret specified by this setting, must have a data field named 'key' containing an encryption key that is exactly 32 bytes long. +### `spec.networkAttachedVolumes: bool` + +The default of this option is `false`. If set to `true`, and the +deployed ArangoDB version is new enough (>= 3.4.8 for 3.4 and >= 3.5.1 +for 3.5), a `ResignLeaderShip` operation +will be triggered when a dbserver pod is evicted (rather than a +`CleanOutServer` operation). Furthermore, the pod will simply be +redeployed on a different node, rather than cleaned and retired and +replaced by a new member. You must only set this option to `true` if +your persistent volumes are "movable" in the sense that they can be +mounted from a different k8s node, like in the case of network attached +volumes. If your persistent volumes are tied to a specific pod, you +must leave this option on `false`. + ### `spec.externalAccess.type: string` This setting specifies the type of `Service` that will be created to provide @@ -163,6 +181,14 @@ This setting is used when `spec.externalAccess.type` is set to `LoadBalancer` or If you do not specify this setting, an IP will be chosen automatically by the load-balancer provisioner. +### `spec.externalAccess.loadBalancerSourceRanges: []string` + +If specified and supported by the platform (cloud provider), this will restrict traffic through the cloud-provider +load-balancer will be restricted to the specified client IPs. This field will be ignored if the +cloud-provider does not support the feature. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + ### `spec.externalAccess.nodePort: int` This setting specifies the port used to expose the ArangoDB deployment on. @@ -259,6 +285,15 @@ This setting is used when `spec.sync.externalAccess.type` is set to `NodePort` o If you do not specify this setting, a random port will be chosen automatically. +### `spec.sync.externalAccess.loadBalancerSourceRanges: []string` + +If specified and supported by the platform (cloud provider), this will restrict traffic through the cloud-provider +load-balancer will be restricted to the specified client IPs. This field will be ignored if the +cloud-provider does not support the feature. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + + ### `spec.sync.externalAccess.masterEndpoint: []string` This setting specifies the master endpoint(s) advertised by the ArangoSync SyncMasters. @@ -341,6 +376,22 @@ The default is `false`. This setting cannot be changed after the deployment has been created. +### `spec.restoreFrom: string` + +This setting specifies a `ArangoBackup` resource name the cluster should be restored from. + +After a restore or failure to do so, the status of the deployment contains information about the +restore operation in the `restore` key. + +It will contain some of the following fields: +- _requestedFrom_: name of the `ArangoBackup` used to restore from. +- _message_: optional message explaining why the restore failed. +- _state_: state indicating if the restore was successful or not. Possible values: `Restoring`, `Restored`, `RestoreFailed` + +If the `restoreFrom` key is removed from the spec, the `restore` key is deleted as well. + +A new restore attempt is made if and only if either in the status restore is not set or if spec.restoreFrom and status.requestedFrom are different. + ### `spec.license.secretName: string` This setting specifies the name of a kubernetes `Secret` that contains @@ -359,6 +410,54 @@ There are two magic values for the secret name: - `None` specifies no action. This disables root password randomization. This is the default value. (Thus the root password is empty - not recommended) - `Auto` specifies automatic name generation, which is `-root-password`. +### `spec.metrics.enabled: bool` + +If this is set to `true`, the operator runs a sidecar container for +every DBserver pod and every coordinator pod. The sidecar container runs +the ArangoDB-exporter and exposes metrics of the corresponding `arangod` +instance in Prometheus format on port 9101 under path `/metrics`. You +also have to specify a string for `spec.metrics.image`, which is the +Docker image name of the `arangodb-exporter`. At the time of this +writing you should use `arangodb/arangodb-exporter:0.1.6`. See [this +repository](https://github.com/arangodb-helper/arangodb-exporter){:target="_blank"} for +the latest version. If the image name is left empty, the same image as +for the main deployment is used. Note however, that current ArangoDB +releases (<= 3.4.5) do not ship the exporter in their image. This is +going to change in the future. + +In addition to the sidecar containers the operator will deploy a service +to access the exporter ports (from within the k8s cluster), and a +resource of type `ServiceMonitor`, provided the corresponding custom +resource definition is deployed in the k8s cluster. If you are running +Prometheus in the same k8s cluster with the Prometheus operator, this +will be the case. The `ServiceMonitor` will have the following labels +set: + + - `app: arangodb` + - `arango_deployment: YOUR_DEPLOYMENT_NAME` + - `context: metrics` + - `metrics: prometheus` + +This makes it possible that you configure your Prometheus deployment to +automatically start monitoring on the available Prometheus feeds. To +this end, you must configure the `serviceMonitorSelector` in the specs +of your Prometheus deployment to match these labels. For example: + +```yaml + serviceMonitorSelector: + matchLabels: + metrics: prometheus +``` + +would automatically select all pods of all ArangoDB cluster deployments +which have metrics enabled. + +### `spec.metrics.image: string` + +See above, this is the name of the Docker image for the ArangoDB +exporter to expose metrics. If empty, the same image as for the main +deployment is used. + ### `spec..count: number` This setting specifies the number of servers to start for the given group. @@ -386,7 +485,7 @@ The default value is an empty array. This setting specifies the resources required by pods of this group. This includes requests and limits. -See [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/){:target="_blank"} for details. +See https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ for details. ### `spec..volumeClaimTemplate.Spec: PersistentVolumeClaimSpec` @@ -402,10 +501,26 @@ and `iops` is not forwarded to the pods resource requirements. ### `spec..serviceAccountName: string` This setting specifies the `serviceAccountName` for the `Pods` created -for each server of this group. +for each server of this group. If empty, it defaults to using the +`default` service account. Using an alternative `ServiceAccount` is typically used to separate access rights. -The ArangoDB deployments do not require any special rights. +The ArangoDB deployments need some very minimal access rights. With the +deployment of the operator, we grant the following rights for the `default` +service account: + +``` +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - get +``` + +If you are using a different service account, please grant these rights +to that service account. ### `spec..priorityClassName: string` @@ -462,4 +577,4 @@ because servers in these groups do not need persistent storage. Please use VolumeClaimTemplate from now on. This field is not considered if VolumeClaimTemplate is set. Note however, that the information in requests -is completely handed over to the pod in this case. \ No newline at end of file +is completely handed over to the pod in this case. diff --git a/3.5/deployment-kubernetes-helm.md b/3.5/deployment-kubernetes-helm.md index 47f9c7020f..58f2db1d55 100644 --- a/3.5/deployment-kubernetes-helm.md +++ b/3.5/deployment-kubernetes-helm.md @@ -18,13 +18,10 @@ For example you can install the operator in a namespace other than The ArangoDB Kubernetes Operator is contained in two `helm` charts: -- `kube-arangodb` which contains the operator for the `ArangoDeployment` +- `kube-arangodb` which contains the operator for the `ArangoDeployment`, `ArangoLocalStorage` and `ArangoDeploymentReplication` resource types. -- `kube-arangodb-storage` which contains the operator for the `ArangoLocalStorage` - resource type. +- `kube-arangodb-crd` which contains the CRD for the `ArangoDeployment` and `ArangoDeploymentReplication` resource types. -The `kube-arangodb-storage` only has to be installed if your Kubernetes cluster -does not already provide `StorageClasses` that use locally attached SSDs. ## Configurable values for ArangoDB Kubernetes Operator @@ -34,35 +31,101 @@ ArangoDB Kubernetes Operator with `helm`. Values are passed to `helm` using an `--set==` argument passed to the `helm install` or `helm upgrade` command. -### Values applicable to both charts - -| Key | Type | Description -|-------------------|--------|-----| -| Image | string | Override the docker image used by the operators -| ImagePullPolicy | string | Override the image pull policy used by the operators. See [Updating Images](https://kubernetes.io/docs/concepts/containers/images/#updating-images){:target="_blank"} for details. -| RBAC.Create | bool | Set to `true` (default) to create roles & role bindings. - -### Values applicable to the `kube-arangodb` chart - -| Key | Type | Description -|-------------------|--------|-----| -| Deployment.Create | bool | Set to `true` (default) to deploy the `ArangoDeployment` operator -| Deployment.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoDeployment` operator -| Deployment.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoDeployment` operator -| Deployment.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoDeployment` operator -| Deployment.AllowChaos | bool | Set to `true` to allow the introduction of chaos. **Only use for testing, never for production!** Defaults to `false`. -| DeploymentReplication.Create | bool | Set to `true` (default) to deploy the `ArangoDeploymentReplication` operator -| DeploymentReplication.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoDeploymentReplication` operator -| DeploymentReplication.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoDeploymentReplication` operator -| DeploymentReplication.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoDeploymentReplication` operator - -### Values applicable to the `kube-arangodb-storage` chart - -| Key | Type | Description -|-------------------|--------|-----| -| Storage.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoLocalStorage` operator -| Storage.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoLocalStorage` operator -| Storage.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoLocalStorage` operator +### `operator.image` + +Image used for the ArangoDB Operator. + +Default: `arangodb/kube-arangodb:latest` + +### `operator.imagePullPolicy` + +Image pull policy for Operator images. + +Default: `IfNotPresent` + +### `operator.imagePullSecrets` + +List of the Image Pull Secrets for Operator images. + +Default: `[]string` + +### `operator.service.type` + +Type of the Operator service. + +Default: `ClusterIP` + +### `operator.annotations` + +Annotations passed to the Operator Deployment definition. + +Default: `[]string` + +### `operator.resources.limits.cpu` + +CPU limits for operator pods. + +Default: `1` + +### `operator.resources.limits.memory` + +Memory limits for operator pods. + +Default: `256Mi` + +### `operator.resources.requested.cpu` + +Requested CPI by Operator pods. + +Default: `250m` + +### `operator.resources.requested.memory` + +Requested memory for operator pods. + +Default: `256Mi` + +### `operator.replicaCount` + +Replication count for Operator deployment. + +Default: `2` + +### `operator.updateStrategy` + +Update strategy for operator pod. + +Default: `Recreate` + +### `operator.features.deployment` + +Define if ArangoDeployment Operator should be enabled. + +Default: `true` + +### `operator.features.deploymentReplications` + +Define if ArangoDeploymentReplications Operator should be enabled. + +Default: `true` + +### `operator.features.storage` + +Define if ArangoLocalStorage Operator should be enabled. + +Default: `false` + +### `operator.features.backup` + +Define if ArangoBackup Operator should be enabled. + +Default: `false` + +### `rbac.enabled` + +Define if RBAC should be enabled. + +Default: `true` ## Alternate namespaces diff --git a/3.5/deployment-kubernetes-metrics.md b/3.5/deployment-kubernetes-metrics.md index 810ff9801f..37a09a1612 100644 --- a/3.5/deployment-kubernetes-metrics.md +++ b/3.5/deployment-kubernetes-metrics.md @@ -13,3 +13,8 @@ The metrics are exposed through HTTPS on port `8528` under path `/metrics`. Look at [examples/metrics](https://github.com/arangodb/kube-arangodb/tree/master/examples/metrics){:target="_blank"} for examples of `Services` and `ServiceMonitors` you can use to integrate with Prometheus through the [Prometheus-Operator by CoreOS](https://github.com/coreos/prometheus-operator){:target="_blank"}. + +Furthermore, the operator can run sidecar containers for ArangoDB +deployments of type Cluster which expose metrics in Prometheus format. +Use the attribute `spec.metrics` to set this up see the [spec +reference](deployment-kubernetes-deployment-resource.html) for details. diff --git a/3.5/deployment-kubernetes.md b/3.5/deployment-kubernetes.md index 63e8b45348..dde3f0a485 100644 --- a/3.5/deployment-kubernetes.md +++ b/3.5/deployment-kubernetes.md @@ -16,6 +16,8 @@ Each of these uses involves a different custom resource. - Use an [`ArangoDeployment` resource](deployment-kubernetes-deployment-resource.html) to create an ArangoDB database deployment. +- Use an [`ArangoBackup` resource](deployment-kubernetes-backup-resource.html) to + create an ArangoDB backup. - Use an [`ArangoLocalStorage` resource](deployment-kubernetes-storage-resource.html) to provide local `PersistentVolumes` for optimal I/O performance. - Use an [`ArangoDeploymentReplication` resource](deployment-kubernetes-deployment-replication-resource.html) to diff --git a/3.5/drivers/index.md b/3.5/drivers/index.md index 5557bd9dcc..25ee704aa2 100644 --- a/3.5/drivers/index.md +++ b/3.5/drivers/index.md @@ -14,7 +14,6 @@ Official drivers Name | Language | Repository |   -----|----------|------------|------- [ArangoDB-Java-Driver](java.html) | Java | [github.com/arangodb/arangodb-java-driver](https://github.com/arangodb/arangodb-java-driver){:target="_blank"} | [Changelog](https://github.com/arangodb/arangodb-java-driver/blob/master/ChangeLog.md#readme){:target="_blank"} -ArangoDB-Java-Driver-Async | Java | [github.com/arangodb/arangodb-java-driver-async](https://github.com/arangodb/arangodb-java-driver-async){:target="_blank"} | [Changelog](https://github.com/arangodb/arangodb-java-driver-async/blob/master/ChangeLog.md#readme){:target="_blank"} [ArangoJS](js.html) | JavaScript | [github.com/arangodb/arangojs](https://github.com/arangodb/arangojs){:target="_blank"} | [Changelog](https://github.com/arangodb/arangojs/blob/master/CHANGELOG.md#readme){:target="_blank"} [ArangoDB-PHP](php.html) | PHP | [github.com/arangodb/arangodb-php](https://github.com/arangodb/arangodb-php){:target="_blank"} | [Changelog](https://github.com/arangodb/arangodb-php/blob/devel/CHANGELOG.md#readme){:target="_blank"} [Go-Driver](go.html) | Go | [github.com/arangodb/go-driver](https://github.com/arangodb/go-driver){:target="_blank"} | [Changelog](https://github.com/arangodb/go-driver/blob/master/CHANGELOG.md#readme){:target="_blank"} diff --git a/3.5/drivers/java-reference-collection-indexes.md b/3.5/drivers/java-reference-collection-indexes.md index 1edac84a4b..959c701fab 100644 --- a/3.5/drivers/java-reference-collection-indexes.md +++ b/3.5/drivers/java-reference-collection-indexes.md @@ -22,6 +22,11 @@ Creates a hash index for the collection if it does not already exist. - **options**: `HashIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **unique**: `Boolean` If true, then create a unique index @@ -34,6 +39,11 @@ Creates a hash index for the collection if it does not already exist. If false, the de-duplication of array values is turned off. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -59,6 +69,11 @@ Creates a skip-list index for the collection if it does not already exist. - **options**: `SkipListIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **unique**: `Boolean` If true, then create a unique index @@ -71,6 +86,11 @@ Creates a skip-list index for the collection if it does not already exist. If false, the de-duplication of array values is turned off. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -98,12 +118,22 @@ Creates a geo index for the collection if it does not already exist. - **options**: `GeoIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **geoJson**: `Boolean` If a geo-spatial index on a location is constructed and geoJson is true, then the order within the array is longitude followed by latitude. This corresponds to the format described in. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -131,12 +161,22 @@ Creates a fulltext index for the collection if it does not already exist. - **options**: `FulltextIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **minLength**: `Integer` Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -164,6 +204,11 @@ Creates a persistent index for the collection if it does not already exist. - **options**: `PersistentIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **unique**: `Boolean` If true, then create a unique index @@ -172,6 +217,11 @@ Creates a persistent index for the collection if it does not already exist. If true, then create a sparse index + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -183,6 +233,49 @@ IndexEntity index = collection.ensurePersistentIndex(Arrays.asList("a", "b.c")); // the index has been created with the handle `index.getId()` ``` +## ArangoCollection.ensureTtlIndex + +`ArangoCollection.ensureTtlIndex(Iterable fields, TtlIndexOptions options) : IndexEntity` + +Creates a ttl index for the collection if it does not already exist. + +**Arguments** + +- **fields**: `Iterable` + + A list of attribute paths + +- **options**: `PersistentIndexOptions` + + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + + - **expireAfter**: `Integer` + + The time (in seconds) after a document's creation after which the documents count as "expired". + + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + +**Examples** + +```Java +ArangoDB arango = new ArangoDB.Builder().build(); +ArangoDatabase db = arango.db("myDB"); +ArangoCollection collection = db.collection("some-collection"); + +final TtlIndexOptions options = new TtlIndexOptions(); + options.name("myTtlIndex"); + options.expireAfter(3600); + +IndexEntity index = collection.ensureTtlIndex(Arrays.asList("a", "b.c"), options); +// the index has been created with the handle `index.getId()` +``` + ## ArangoCollection.getIndex `ArangoCollection.getIndex(String id) : IndexEntity` diff --git a/3.5/drivers/java-reference-database-queries.md b/3.5/drivers/java-reference-database-queries.md index 9b63a22a1d..2d066ed962 100644 --- a/3.5/drivers/java-reference-database-queries.md +++ b/3.5/drivers/java-reference-database-queries.md @@ -156,6 +156,10 @@ a new _ArangoCursor_ instance for the result list. query statistics, warnings and profiling data will only be available after the query is finished. The default value is false. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + - **type**: `Class` The type of the result (POJO class, `VPackSlice`, `String` for JSON, or `Collection`/`List`/`Map`) diff --git a/3.5/drivers/java-reference-database-stream-transactions.md b/3.5/drivers/java-reference-database-stream-transactions.md new file mode 100644 index 0000000000..87a48903a3 --- /dev/null +++ b/3.5/drivers/java-reference-database-stream-transactions.md @@ -0,0 +1,93 @@ +--- +layout: default +description: See HTTP Interface for Stream Transactions +--- + +# Transactions + +See [HTTP Interface for Stream Transactions](../http/transaction-stream-transaction.html). + + +## ArangoDatabase.beginStreamTransaction + +`ArangoDatabase.beginStreamTransaction(StreamTransactionOptions options) : StreamTransactionEntity` + +Begins a server-side transaction and returns information about it. + +**Arguments** + +- **options**: `StreamTransactionOptions` + + transaction options + + +## ArangoDatabase.getStreamTransaction + +`ArangoDatabase.getStreamTransaction(String id) : StreamTransactionEntity` + +Gets information about a Stream Transaction. + +**Arguments** + +- **id**: `String` + + transaction id + + +## ArangoDatabase.getStreamTransactions + +`ArangoDatabase.getStreamTransactions() : Collection` + +Gets all the currently running Stream Transactions. + + +## ArangoDatabase.commitStreamTransaction + +`ArangoDatabase.commitStreamTransaction(String id) : StreamTransactionEntity` + +Commits a Stream Transaction. + +**Arguments** + +- **id**: `String` + + transaction id + + +## ArangoDatabase.abortStreamTransaction + +`ArangoDatabase.abortStreamTransaction(String id) : StreamTransactionEntity` + +Aborts a Stream Transaction. + +**Arguments** + +- **id**: `String` + + transaction id + + +## Examples + +```Java +ArangoDB arango = new ArangoDB.Builder().build(); +ArangoDatabase db = arango.db("myDB"); + +StreamTransactionEntity tx1 = db.beginStreamTransaction( + new StreamTransactionOptions().readCollections("collection").writeCollections("collection")); +db.collection("collection") + .insertDocument(new BaseDocument(), new DocumentCreateOptions().streamTransactionId(tx1.getId())); +db.commitStreamTransaction(tx1.getId()); +StreamTransactionEntity tx = db.getStreamTransaction(tx1.getId()); +assertThat(tx.getStatus(), is(StreamTransactionEntity.StreamTransactionStatus.committed)); + +StreamTransactionEntity tx2 = db.beginStreamTransaction( + new StreamTransactionOptions().readCollections("collection").writeCollections("collection")); +final Map bindVars = new HashMap<>(); +bindVars.put("@collection", COLLECTION_NAME); +bindVars.put("key", "myKey"); +ArangoCursor cursor = db + .query("FOR doc IN @@collection FILTER doc._key == @key RETURN doc", bindVars, + new AqlQueryOptions().streamTransactionId(tx2.getId()), BaseDocument.class); +db.abortStreamTransaction(tx2.getId()); +``` diff --git a/3.5/drivers/java-reference-graph-edges.md b/3.5/drivers/java-reference-graph-edges.md index d36fcf7479..491b6caf72 100644 --- a/3.5/drivers/java-reference-graph-edges.md +++ b/3.5/drivers/java-reference-graph-edges.md @@ -7,7 +7,7 @@ description: Manipulating edges ## ArangoEdgeCollection.getEdge -`ArangoEdgeCollection.getEdge(String key, Class type, DocumentReadOptions options) : T` +`ArangoEdgeCollection.getEdge(String key, Class type, GraphDocumentReadOptions options) : T` Retrieves the edge document with the given `key` from the collection. @@ -21,7 +21,7 @@ Retrieves the edge document with the given `key` from the collection. The type of the edge-document (POJO class, `VPackSlice` or `String` for JSON) -- **options**: `DocumentReadOptions` +- **options**: `GraphDocumentReadOptions` - **ifNoneMatch**: `String` @@ -35,6 +35,10 @@ Retrieves the edge document with the given `key` from the collection. Whether or not catch possible thrown exceptions + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + ## ArangoEdgeCollection.insertEdge `ArangoEdgeCollection.insertEdge(T value, EdgeCreateOptions options) : EdgeEntity` @@ -93,6 +97,10 @@ a edge and no precondition is violated. Replace a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -140,6 +148,10 @@ edge and no precondition is violated. from the existing document that are contained in the patch document with an attribute value of null. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -174,6 +186,10 @@ Deletes the edge with the given _key_ from the collection. Remove a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java diff --git a/3.5/drivers/java-reference-graph-vertices.md b/3.5/drivers/java-reference-graph-vertices.md index 98ea17b291..2a7f33da37 100644 --- a/3.5/drivers/java-reference-graph-vertices.md +++ b/3.5/drivers/java-reference-graph-vertices.md @@ -7,7 +7,7 @@ description: Manipulating vertices ## ArangoVertexCollection.getVertex -`ArangoVertexCollection.getVertex(String key, Class type, DocumentReadOptions options) : T` +`ArangoVertexCollection.getVertex(String key, Class type, GraphDocumentReadOptions options) : T` Retrieves the vertex document with the given `key` from the collection. @@ -21,7 +21,7 @@ Retrieves the vertex document with the given `key` from the collection. The type of the vertex-document (POJO class, `VPackSlice` or `String` for JSON) -- **options**: `DocumentReadOptions` +- **options**: `GraphDocumentReadOptions` - **ifNoneMatch**: `String` @@ -35,6 +35,10 @@ Retrieves the vertex document with the given `key` from the collection. Whether or not catch possible thrown exceptions + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + ## ArangoVertexCollection.insertVertex `ArangoVertexCollection.insertVertex(T value, VertexCreateOptions options) : VertexEntity` @@ -53,6 +57,14 @@ Creates a new vertex in the collection. Wait until document has been synced to disk. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -93,6 +105,10 @@ a vertex and no precondition is violated. Replace a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -140,6 +156,10 @@ a vertex and no precondition is violated. from the existing document that are contained in the patch document with an attribute value of null. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -174,6 +194,10 @@ Deletes the vertex with the given _key_ from the collection. Remove a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java diff --git a/3.5/drivers/java-reference-graph.md b/3.5/drivers/java-reference-graph.md index 5b0d1156f9..6a3d647ffc 100644 --- a/3.5/drivers/java-reference-graph.md +++ b/3.5/drivers/java-reference-graph.md @@ -48,6 +48,17 @@ name of the graph and a definition of its edges. automatically and one of the servers holding copies take over, usually without an error being reported. + - **minReplicationFactor**: `Integer` + + (optional, default is 1): in a cluster, this + attribute determines how many copies of each shard are required + to be in sync on the different DBServers. If we have less then these + many copies in the cluster a shard will refuse to write. The + minReplicationFactor can not be larger than replicationFactor. + Please note: during server failures this might lead to writes + not being possible until the failover is sorted out and might cause + write slow downs in trade of data durability. + - **numberOfShards**: `Integer` The number of shards that is used for every collection within this graph. @@ -112,17 +123,6 @@ Alternative for [ArangoDatabase.createGraph](#arangodatabasecreategraph). automatically and one of the servers holding copies take over, usually without an error being reported. - - **minReplicationFactor**: `Integer` - - (optional, default is 1): in a cluster, this - attribute determines how many copies of each shard are required - to be in sync on the different DBServers. If we have less then these - many copies in the cluster a shard will refuse to write. The - minReplicationFactor can not be larger than replicationFactor. - Please note: during server failures this might lead to writes - not being possible until the failover is sorted out and might cause - write slow downs in trade of data durability. - - **numberOfShards**: `Integer` The number of shards that is used for every collection within this graph. diff --git a/3.5/drivers/java-reference-view-analyzers.md b/3.5/drivers/java-reference-view-analyzers.md new file mode 100644 index 0000000000..239935b287 --- /dev/null +++ b/3.5/drivers/java-reference-view-analyzers.md @@ -0,0 +1,89 @@ +--- +layout: default +description: HTTP Interface for Analyzers +--- + +# Analyzers + +[HTTP Interface for Analyzers](../http/analyzers.html). + + +## Types + +- **AnalyzerEntity** + + - **name**: `String` + + The analyzer name. + + - **type**: `AnalyzerType` + + The analyzer type. Can be one of: `identity`, `delimiter`, `stem`, `norm`, `ngram`, `text` + + - **properties**: `Map` + + The properties used to configure the specified type. Value may be a string, an object or null. The default value is null. + + - **features**: `Set` + + The set of features to set on the analyzer generated fields. The default value is an empty array. + Values can be: `frequency`, `norm`, `position` + + +## ArangoDatabase.createArangoSearch + +`ArangoDatabase.createAnalyzer(AnalyzerEntity options) : AnalyzerEntity` + +Creates an Analyzer. + + +## ArangoDatabase.getAnalyzer + +`ArangoDatabase.getAnalyzer(String name) : AnalyzerEntity` + +Gets information about an Analyzer + +**Arguments** + +- **name**: `String` + + The name of the analyzer + + +## ArangoDatabase.getAnalyzers + +`ArangoDatabase.getAnalyzers() : Collection` + +Retrieves all analyzers definitions. + + +## ArangoDatabase.deleteAnalyzer + +`ArangoDatabase.deleteAnalyzer(String name) : void` + +Deletes an Analyzer. + +**Arguments** + +- **name**: `String` + + The name of the analyzer + + +## ArangoDatabase.deleteAnalyzer + +`ArangoDatabase.deleteAnalyzer(String name, AnalyzerDeleteOptions options) : void` + +Deletes an Analyzer. + +**Arguments** + +- **name**: `String` + + The name of the analyzer + +- **options**: `AnalyzerDeleteOptions` + + - **force**: `Boolean` + + The analyzer configuration should be removed even if it is in-use. The default value is false. diff --git a/3.5/drivers/java-reference-view-arangosearch.md b/3.5/drivers/java-reference-view-arangosearch.md index 0c7ea593be..ad58f08b9f 100644 --- a/3.5/drivers/java-reference-view-arangosearch.md +++ b/3.5/drivers/java-reference-view-arangosearch.md @@ -2,7 +2,7 @@ layout: default description: These functions implement theHTTP API for ArangoSearch views redirect_from: - - /3.5/java-reference-view-arango-search.html # 3.4 -> 3.5 + - /3.6/java-reference-view-arango-search.html # 3.4 -> 3.5 --- # ArangoSearch API @@ -25,6 +25,24 @@ view information from the server. - **options**: `ArangoSearchCreateOptions` + - **commitIntervalMsec**: `Long` + + Wait at least this many milliseconds between committing view data store changes + and making documents visible to queries (default: 1000, to disable use: 0). For + the case where there are a lot of inserts/updates, a lower value, until commit, + will cause the index not to account for them and memory usage would continue to + grow. For the case where there are a few inserts/updates, a higher value will + impact performance and waste disk space for each commit call without any added + benefits. Background: For data retrieval ArangoSearch views follow the concept + of "eventually-consistent", i.e. eventually all the data in ArangoDB will be + matched by corresponding query expressions. The concept of ArangoSearch view + "commit" operation is introduced to control the upper-bound on the time until + document addition/removals are actually reflected by corresponding query + expressions. Once a "commit" operation is complete all documents added/removed + prior to the start of the "commit" operation will be reflected by queries + invoked in subsequent ArangoDB transactions, in-progress ArangoDB transactions + will still continue to return a repeatable-read state. + - **consolidationIntervalMsec**: `Long` Wait at least this many milliseconds between committing index data changes @@ -61,10 +79,15 @@ view information from the server. Apply the "consolidation" operation if and only if (default: 300): `{segmentThreshold} < number_of_segments` - - **link**: `CollectionLink[]` + - **links**: `CollectionLink[]` A list of linked collections + - **primarySorts**: `CollectionLink[]` + + A list of primary sort objects. When creating an ArangoSearch View, you + can optionally define a default sort order. + **Examples** ```Java diff --git a/3.5/drivers/java-reference.md b/3.5/drivers/java-reference.md index 95ca58f51a..850611481f 100644 --- a/3.5/drivers/java-reference.md +++ b/3.5/drivers/java-reference.md @@ -12,6 +12,7 @@ layout: default - [Queries](java-reference-database-queries.html) - [AQL User Functions](java-reference-database-aql-user-functions.html) - [Transactions](java-reference-database-transactions.html) + - [Stream Transactions](java-reference-database-stream-transactions.html) - [Graph Access](java-reference-database-graph-access.html) - [HTTP Routes](java-reference-database-http-routes.html) - [Collection](java-reference-collection.html) @@ -22,6 +23,7 @@ layout: default - [View](java-reference-view.html) - [View Manipulation](java-reference-view-view-manipulation.html) - [ArangoSearch Views](java-reference-view-arangosearch.html) + - [Analyzers](java-reference-view-analyzers.html) - [Cursor](java-reference-cursor.html) - [Graph](java-reference-graph.html) - [Vertex Collection](java-reference-graph-vertex-collection.html) diff --git a/3.5/drivers/java.md b/3.5/drivers/java.md index 146476d3ef..502a162c55 100644 --- a/3.5/drivers/java.md +++ b/3.5/drivers/java.md @@ -7,13 +7,19 @@ description: The official ArangoDB Java Driver The official ArangoDB Java Driver. +It can be used synchronously as well as asynchronously. The formerly separate async +driver with the same API as the synchronous driver, except that it returned a +`CompletableFuture` instead of the result `T` directly, was merged into this +driver in version 6.2.0. See +[async examples](https://github.com/arangodb/arangodb-java-driver/tree/master/src/test/java/com/arangodb/async/example){:target="_blank"}. + - [Getting Started](java-getting-started.html) - [Reference](java-reference.html) ## See Also -- [ChangeLog](https://raw.githubusercontent.com/arangodb/arangodb-java-driver/master/ChangeLog.md){:target="_blank"} -- [Examples](https://github.com/arangodb/arangodb-java-driver/tree/master/src/test/java/com/arangodb/example){:target="_blank"} -- [Tutorial](https://www.arangodb.com/tutorials/tutorial-sync-java-driver/){:target="_blank"} -- [JavaDoc](http://arangodb.github.io/arangodb-java-driver/javadoc-4_3/index.html){:target="_blank"} -- [JavaDoc VelocyPack](http://arangodb.github.io/java-velocypack/javadoc-1_0/index.html){:target="_blank"} +- [ChangeLog](https://raw.githubusercontent.com/arangodb/arangodb-java-driver/master/ChangeLog.md) +- [Examples](https://github.com/arangodb/arangodb-java-driver/tree/master/src/test/java/com/arangodb/example) +- [Tutorial](https://www.arangodb.com/tutorials/tutorial-sync-java-driver/) +- [JavaDoc](http://arangodb.github.io/arangodb-java-driver/javadoc-6_4/index.html) +- [JavaDoc VelocyPack](http://arangodb.github.io/java-velocypack/javadoc-1_0/index.html) diff --git a/3.5/drivers/js-reference-analyzer.md b/3.5/drivers/js-reference-analyzer.md new file mode 100644 index 0000000000..51ab2bb103 --- /dev/null +++ b/3.5/drivers/js-reference-analyzer.md @@ -0,0 +1,176 @@ +--- +layout: default +description: These functions implement theHTTP API for manipulating analyzers +--- + +# Analyzer API + +These functions implement the +[HTTP API for manipulating analyzers](../http/analyzers.html). + +{% hint 'info' %} +Analyzers were introduced in ArangoDB 3.5 and are not supported by earlier +versions of ArangoDB. +{% endhint %} + +## analyzer.exists + +`async analyzer.exists(): boolean` + +Checks whether the analyzer exists. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +const result = await analyzer.exists(); +// result indicates whether the analyzer exists +``` + +### analyzer.get + +`async analyzer.get(): Object` + +Retrieves the analyzer definition for the analyzer. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +const definition = await analyzer.get(); +// definition contains the analyzer definition +``` + +## analyzer.create + +`async analyzer.create([options]): Object` + +Creates an analyzer with the given _options_, then returns the new analyzer +definition. + +**Arguments** + +- **options**: `Object` (optional) + + An object with the following properties: + + - **features**: `string` (optional) + + The features to enable for this analyzer. + + - **type**: `string` + + The type of analyzer to create. + Can be `"identity"`, `"delimiter"`, `"stem"`, `"norm"`, `"ngram"` or + `"text"`. + + - **properties**: `any` + + Additional properties for the given analyzer type. + + If the type is `"identity"`, the _properties_ are optional or can be + `undefined` or `null`. + + If the type is `"delimiter"`, the _properties_ must be an object with the + following property: + + - **delimiter**: `string` + + Delimiter to use to split text into tokens as specified in RFC 4180, + without starting new records on newlines. + + If the type is `"stem"`, the _properties_ must be an object with the + following property: + + - **locale**: `string` + + Text locale. Format: `language[_COUNTRY][.encoding][@variant]`. + + If the type is `"norm"`, the _properties_ must be an object with the + following properties: + + - **locale**: `string` + + Text locale. Format: `language[_COUNTRY][.encoding][@variant]`. + + - **case**: `string` (Default: `"lower"`) + + Case conversion. Can be `"lower"`, `"none"` or `"upper"`. + + - **accent**: `boolean` (Default: `false`) + + Preserve accent in returned words. + + If the type is `"ngram"`, the _properties_ must be an object with the + following properties: + + - **max**: `number` + + Maximum n-gram length. + + - **min**: `number` + + Minimum n-gram length. + + - **preserveOriginal**: `boolean` + + Output the original value as well. + + If the type is `"text"`, the _properties_ must be an object with the + following properties: + + - **locale**: `string` + + Text locale. Format: `language[_COUNTRY][.encoding][@variant]`. + + - **case**: `string` (Default: `"lower"`) + + Case conversion. Can be `"lower"`, `"none"` or `"upper"`. + + - **stopwords**: `Array` (optional) + + Words to omit from result. Defaults to the words loaded from the file at + _stopwordsPath_. + + - **stopwordsPath**: `string` (optional) + + Path with a `language` sub-directory containing files with words to omit. + + Defaults to the path specified in the server-side environment variable + `IRESEARCH_TEXT_STOPWORD_PATH` or the current working directory of the + ArangoDB process. + + - **accent**: `boolean` (Default: `false`) + + Preserve accent in returned words. + + - **stemming**: `boolean` (Default: `true`) + + Apply stemming on returned words. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("potatoes"); +await analyzer.create({ type: "identity" }); +// the identity analyzer "potatoes" now exists +``` + +## analyzer.drop + +`async analyzer.drop(): Object` + +Deletes the analyzer from the database, then returns an object with the _name_ +of the analyzer that was dropped. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +await analyzer.drop(); +// the analyzer "some-analyzer" no longer exists +``` diff --git a/3.5/drivers/js-reference-collection.md b/3.5/drivers/js-reference-collection.md index b3deb6ca3b..d2ecdbc8d3 100644 --- a/3.5/drivers/js-reference-collection.md +++ b/3.5/drivers/js-reference-collection.md @@ -31,7 +31,7 @@ Checks whether the collection exists. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const result = await collection.exists(); // result indicates whether the collection exists ``` @@ -46,11 +46,35 @@ Retrieves general information about the collection. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.get(); // data contains general information about the collection ``` +### collection.getResponsibleShard + +`async collection.getResponsibleShard(document): string` + +Retrieves the `shardId` of the shard responsible for the given document. + +**Arguments** + +- **document**: `Object` + + Document to look up the responsible shard for. This can either be a full + document or an object with at least those attributes present, which are + used as shard key for the collection (Default: `_key`). + +**Examples** + +```js +const doc = await collection.document("abc123"); +const shardId = await collection.getResponsibleShard(doc); +// -- or -- +// Assuming the collection shard key is "_key" (the default) +const shardId = await collection.getResponsibleShard({ _key: "abc123" }); +``` + ### collection.properties `async collection.properties(): Object` @@ -61,7 +85,7 @@ Retrieves the collection's properties. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.properties(); // data contains the collection's properties ``` @@ -76,7 +100,7 @@ Retrieves information about the number of documents in a collection. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.count(); // data contains the collection's count ``` @@ -91,7 +115,7 @@ Retrieves statistics for a collection. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.figures(); // data contains the collection's figures ``` @@ -106,7 +130,7 @@ Retrieves the collection revision ID. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.revision(); // data contains the collection's revision ``` @@ -128,7 +152,7 @@ Retrieves the collection checksum. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.checksum(); // data contains the collection's checksum ``` diff --git a/3.5/drivers/js-reference-database-analyzer-access.md b/3.5/drivers/js-reference-database-analyzer-access.md new file mode 100644 index 0000000000..f927efb1e6 --- /dev/null +++ b/3.5/drivers/js-reference-database-analyzer-access.md @@ -0,0 +1,59 @@ +--- +layout: default +description: These functions implement theHTTP API for accessing analyzers +--- + +# Accessing analyzers + +These functions implement the +[HTTP API for accessing analyzers](../http/analyzers.html). + +{% hint 'info' %} +Analyzers were introduced in ArangoDB 3.5 and are not supported by earlier +versions of ArangoDB. +{% endhint %} + +## database.analyzer + +`database.analyzer(analyzerName): Analyzer` + +Returns an _Analyzer_ instance representing the analyzer with the given analyzer +name. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +const info = await analyzer.get(); +``` + +## database.listAnalyzers + +`async database.listAnalyzers(): Array` + +Fetches all analyzers visible in the database and returns an array of analyzer +descriptions. + +**Examples** + +```js +const db = new Database(); +const analyzers = await db.listAnalyzers(); +// analyzers is an array of analyzer descriptions +``` + +## database.analyzers + +`async database.analyzers(): Array` + +Fetches all analyzers visible in the database and returns an array of _Analyzer_ +instances for those analyzers. + +**Examples** + +```js +const db = new Database(); +const analyzers = await db.analyzers(); +// analyzers is an array of Analyzer instances +``` diff --git a/3.5/drivers/js-reference-database-graph-access.md b/3.5/drivers/js-reference-database-graph-access.md index cd5d982a34..6f15b657a9 100644 --- a/3.5/drivers/js-reference-database-graph-access.md +++ b/3.5/drivers/js-reference-database-graph-access.md @@ -33,7 +33,7 @@ const graphs = await db.listGraphs(); `async database.graphs(): Array` Fetches all graphs from the database and returns an array of _Graph_ instances -for the graphs. +for those graphs. **Examples** diff --git a/3.5/drivers/js-reference-database-transactions.md b/3.5/drivers/js-reference-database-transactions.md index 5a50d78d91..403ee416e3 100644 --- a/3.5/drivers/js-reference-database-transactions.md +++ b/3.5/drivers/js-reference-database-transactions.md @@ -1,16 +1,17 @@ --- layout: default -description: This function implements theHTTP API for transactions +description: These functions implement theHTTP API for transactions --- # Transactions -This function implements the +These functions implement the [HTTP API for transactions](../http/transaction.html). +Also see [ArangoDB Transactions](../transactions.html). -## database.transaction +## database.executeTransaction -`async database.transaction(collections, action, [params, [options]]): Object` +`async database.executeTransaction(collections, action, [options]): Object` Performs a server-side transaction and returns its return value. @@ -20,36 +21,52 @@ Performs a server-side transaction and returns its return value. An object with the following properties: - - **read**: `Array` (optional) + - **read**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + read from during the transaction. + + - **write**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. + + If ArangoDB is using the RocksDB storage engine, write access to the + collections will be shared, i.e. other writes to the collections may run in + parallel. - An array of names (or a single name) of collections that will be read from - during the transaction. + If ArangoDB is using the MMFiles engine, this option is synonymous with + _collections.exclusive_, i.e. no other writes will run in parallel. - - **write**: `Array` (optional) + - **exclusive**: `Array | string | Collection` (optional) - An array of names (or a single name) of collections that will be written to - or read from during the transaction. + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. Write access will be + exclusive to the collection, i.e. no other writes will be run in parallel. - **action**: `string` A string evaluating to a JavaScript function to be executed on the server. - {% hint 'warning' %} + {% hint 'warning ' %} This function will be executed on the server inside ArangoDB and can not use - the arangojs driver or any variables other than those passed as _params_. + the arangojs driver or any values other than those passed as _params_. For accessing the database from within ArangoDB, see the documentation for the [`@arangodb` module in ArangoDB](../appendix-java-script-modules-arango-db.html). {% endhint %} -- **params**: `Object` (optional) - - Available as variable `params` when the _action_ function is being executed on - server. Check the example below. - - **options**: `Object` (optional) An object with any of the following properties: + - **params**: `any` (optional) + + Available as the first argument to the _action_ function when it is executed on the + server. Check the example below. + - **lockTimeout**: `number` (optional) Determines how long the database will wait while attempting to gain locks on @@ -73,7 +90,7 @@ Performs a server-side transaction and returns its return value. Determine the maximum total size of operations after which an intermediate commit is performed automatically. Honored by the RocksDB storage engine only. -If _collections_ is an array or string, it will be treated as +If _collections_ is an array, string or `Collection`, it will be treated as _collections.write_. Please note that while _action_ should be a string evaluating to a well-formed @@ -81,27 +98,304 @@ JavaScript function, it's not possible to pass in a JavaScript function directly because the function needs to be evaluated on the server and will be transmitted in plain text. -For more information on transactions, see the -[HTTP API documentation for transactions](../http/transaction.html). - **Examples** ```js const db = new Database(); + const action = String(function(params) { // This code will be executed inside ArangoDB! - const db = require("@arangodb").db; - return db - ._query( - aql` - FOR user IN _users - FILTER user.age > ${params.age} - RETURN u.user - ` - ) - .toArray(); + const { query } = require("@arangodb"); + return query` + FOR user IN _users + FILTER user.age > ${params.age} + RETURN u.user + `.toArray(); }); -const result = await db.transaction({ read: "_users" }, action, { age: 12 }); +const result = await db.executeTransaction("_users", action, { + params: { age: 12 } +}); // result contains the return value of the action ``` + +## database.transaction + +`database.transaction(id): Transaction` + +Returns a `Transaction` instance for an existing transaction with the given +_id_. + +{% hint 'warning' %} +For backwards-compatibility with arangojs 6.10 and earlier, this method will +behave like _executeTransaction_ when passed the following arguments: + +- **collections**: `Object` + + See _collections_ in _executeTransaction_. + +- **action**: `string` + + See _action_ in _executeTransaction_. + +- **params**: `any` (optional) + + See _options.params_ in _executeTransaction_. + +- **options**: `Object` (optional) + + See _options_ in _executeTransaction_. + +If _params_ or _options_ is a `number`, it will be treated as +_options.lockTimeout_. + +This behavior is deprecated and will be removed in arangojs 7. +{% endhint %} + +- **id**: `string` + + The _id_ of an existing stream transaction. + +**Examples** + +```js +const trx1 = await db.beginTransaction(collections); +const id = trx1.id; +// later +const trx2 = db.transaction(id); +await trx2.commit(); +``` + +## database.beginTransaction + +`async database.beginTransaction(collections, [options]): Transaction` + +Begins a new streaming transaction for the given collections, then returns a +`Transaction` instance for the transaction. + +**Arguments** + +- **collections**: `Object` + + An object with the following properties: + + - **read**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + read from during the transaction. + + - **write**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. + + If ArangoDB is using the RocksDB storage engine, write access to the + collections will be shared, i.e. other writes to the collections may run in + parallel. + + If ArangoDB is using the MMFiles engine, this option is synonymous with + _collections.exclusive_, i.e. no other writes will run in parallel. + + - **exclusive**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. Write access will be + exclusive to the collection, i.e. no other writes will be run in parallel. + +- **options**: `Object` (optional) + + An object with the following properties: + + - **lockTimeout**: `number` (optional) + + Determines how long the database will wait while attempting to gain locks on + collections used by the transaction before timing out. + + - **waitForSync**: `boolean` (optional) + + Determines whether to force the transaction to write all data to disk before returning. + + - **maxTransactionSize**: `number` (optional) + + Determines the transaction size limit in bytes. Honored by the RocksDB storage engine only. + + - **intermediateCommitCount**: `number` (optional) + + Determines the maximum number of operations after which an intermediate commit is + performed automatically. Honored by the RocksDB storage engine only. + + - **intermediateCommitSize**: `number` (optional) + + Determine the maximum total size of operations after which an intermediate commit is + performed automatically. Honored by the RocksDB storage engine only. + +If _collections_ is an array, string or `Collection`, it will be treated as +_collections.write_. + +**Examples** + +```js +const vertices = db.collection("vertices"); +const edges = db.collection("edges"); +const trx = await db.beginTransaction({ + read: ["vertices"], + write: [edges] // collection instances can be passed directly +}); +const start = await trx.run(() => vertices.document("a")); +const end = await trx.run(() => vertices.document("b")); +await trx.run(() => edges.save({ _from: start._id, _to: end._id })); +await trx.commit(); +``` + +## transaction.exists + +`async transaction.exists(): boolean` + +Checks whether the transaction exists. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.exists(); +// result indicates whether the transaction exists +``` + +## transaction.get + +`async transaction.get(): Object` + +Retrieves general information about the transaction. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.get(); +// result indicates the transaction id and status +``` + +## transaction.commit + +`async transaction.commit(): Object` + +Attempts to commit the transaction to the database, then returns an object +indicating the transaction's id and updated status. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.commit(); +// result indicates the transaction id and updated status +``` + +## transaction.abort + +`async transaction.abort(): Object` + +Attempts to abort the transaction in the database, then returns an object +indicating the transaction's id and updated status. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.abort(); +// result indicates the transaction id and updated status +``` + +## transaction.run + +`async transaction.run(fn): any` + +Executes the given function locally within the transaction and returns a promise +for its result. + +**Arguments** + +- **fn**: `Function` + + A function to be executed locally as part of the transaction. + + {% hint 'warning' %} + If the given function contains asynchronous logic, only the synchronous part + of the function will be run in the transaction. E.g. when using async/await + only the code up to the first await will run in the transaction. + Pay attention to the examples below. + {% endhint %} + +Unlike _executeTransaction_, functions passed to _run_ will be executed locally +on the client, not on the server. + +**Examples** + +```js +const col1 = db.collection(name1); +const col2 = db.collection(name2); +const trx = await db.beginTransaction(collections); + +// The following code will run in the transaction +const meta1 = await trx.run(() => col1.save({ data: "doc1" })); +const meta2 = await trx.run(() => col1.save({ data: "doc2" })); + +// Results from preceding actions can be used normally +await trx.run(() => + col2.save({ _from: meta1._id, to: meta2._id, data: "edge1" }) +); + +// Promise.all can be used to run multiple actions in parallel +await Promise.all([ + trx.run(() => col2.save({ _from: meta1._id, _to: meta2._id, data: "edge2" })), + trx.run(() => col2.save({ _from: meta1._id, _to: meta2._id, data: "edge3" })) +]); +await trx.run(() => + Promise.all([ + col2.save({ _from: meta1._id, _to: meta2._id, data: "edge4" }), + col2.save({ _from: meta1._id, _to: meta2._id, data: "edge5" }) + ]) +); + +// DANGER! The following examples demonstrate common mistakes! + +await trx.run(async () => { + // The first line runs in the transaction + await col1.save({ data: "doc3" }); + // The next line will run outside the transaction because it comes + // after the first await and is executed asynchronously! + await col1.save({ data: "doc4" }); +}); + +await trx.run(() => + // The first line runs in the transaction + col1 + .save({ data: "doc5" }) + // The next line will run outside the transaction because + // it is executed in an asynchronous callback! + .then(() => col1.save({ data: "doc6" })) +); + +// While not an error, wrapping synchronous methods in "run" is unnecessary. +await trx.run(() => db.collection(name1)); + +await trx.run(() => { + // This method returns a promise but we forget to return it. Note that the + // request will still be executed, we just don't know when/if it completed. + col1.save({ data: "doc7" }); +}); + +// Remember to always wait for all actions to resolve before committing. +// The following line is missing the "await" and creates a race condition. +trx.run(() => col1.save({ data: "doc8" })); + +// All actions run as part of a stream transaction will only take effect if +// the transaction is committed. Make sure to always call "commit" or "abort". +await trx.commit(); +``` diff --git a/3.5/drivers/js-reference-view.md b/3.5/drivers/js-reference-view.md new file mode 100644 index 0000000000..65b8b8597d --- /dev/null +++ b/3.5/drivers/js-reference-view.md @@ -0,0 +1,159 @@ +--- +layout: default +description: These functions implement the HTTP API for manipulating views +--- + +# View API + +These functions implement the +[HTTP API for manipulating views](../http/views.html). + +{% hint 'info' %} +Views were introduced in ArangoDB 3.4 and are not supported by earlier versions +of ArangoDB. +{% endhint %} + +## view.exists + +`async view.exists(): boolean` + +Checks whether the view exists. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.exists(); +// result indicates whether the view exists +``` + +### view.get + +`async view.get(): Object` + +Retrieves general information about the view. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const data = await view.get(); +// data contains general information about the view +``` + +### view.properties + +`async view.properties(): Object` + +Retrieves the view's properties. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const data = await view.properties(); +// data contains the view's properties +``` + +## view.create + +`async view.create([properties]): Object` + +Creates a view with the given _properties_ for this view's name, +then returns the server response. + +**Arguments** + +- **properties**: `Object` (optional) + + For more information on the _properties_ object, see the + [HTTP API documentation for creating views](../http/views-arango-search.html). + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("potatoes"); +await view.create(); +// the arangosearch view "potatoes" now exists +``` + +## view.setProperties + +`async view.setProperties(properties): Object` + +Updates the properties of the view. + +**Arguments** + +- **properties**: `Object` + + For information on the _properties_ argument see the + [HTTP API for modifying views](../http/views-arango-search.html). + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.setProperties({ consolidationIntervalMsec: 123 }); +assert.equal(result.consolidationIntervalMsec, 123); +``` + +## view.replaceProperties + +`async view.replaceProperties(properties): Object` + +Replaces the properties of the view. + +**Arguments** + +- **properties**: `Object` + + For information on the _properties_ argument see the + [HTTP API for modifying views](../http/views-arango-search.html). + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.replaceProperties({ consolidationIntervalMsec: 234 }); +assert.equal(result.consolidationIntervalMsec, 234); +``` + +## view.rename + +`async view.rename(name): Object` + +Renames the view. The _View_ instance will automatically update its +name when the rename succeeds. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.rename("new-view-name"); +assert.equal(result.name, "new-view-name"); +assert.equal(view.name, result.name); +// result contains additional information about the view +``` + +## view.drop + +`async view.drop(): Object` + +Deletes the view from the database. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +await view.drop(); +// the view "some-view" no longer exists +``` diff --git a/3.5/drivers/js-reference.md b/3.5/drivers/js-reference.md index b14f0eea14..4bdabfb7c8 100644 --- a/3.5/drivers/js-reference.md +++ b/3.5/drivers/js-reference.md @@ -12,6 +12,7 @@ layout: default - [AQL User Functions](js-reference-database-aql-user-functions.html) - [Transactions](js-reference-database-transactions.html) - [Graph Access](js-reference-database-graph-access.html) + - [Analyzer Access](js-reference-database-analyzer-access.html) - [Foxx Services](js-reference-database-foxx-services.html) - [HTTP Routes](js-reference-database-http-routes.html) - [Collection](js-reference-collection.html) @@ -23,7 +24,8 @@ layout: default - [Simple Queries](js-reference-collection-simple-queries.html) - [Bulk Import](js-reference-collection-bulk-import.html) - [AQL Helpers](js-reference-aql.html) -- [View Manipulation](js-reference-view-manipulation.html) +- [View](js-reference-view.html) +- [Analyzer](js-reference-analyzer.html) - [Cursor](js-reference-cursor.html) - [Graph](js-reference-graph.html) - [Vertices](js-reference-graph-vertices.html) diff --git a/3.5/drivers/spring-data-getting-started.md b/3.5/drivers/spring-data-getting-started.md index cb9baa922d..27c3952de9 100644 --- a/3.5/drivers/spring-data-getting-started.md +++ b/3.5/drivers/spring-data-getting-started.md @@ -7,11 +7,11 @@ description: Spring Data ArangoDB requires ArangoDB 3 ## Supported versions -| Spring Data ArangoDB | Spring Data | ArangoDB | -| -------------------- | ----------- | ----------- | -| 1.3.x | 1.13.x | 3.0\*, 3.1+ | -| 2.3.x | 2.0.x | 3.0\*, 3.1+ | -| 3.0.x | 2.0.x | 3.0\*, 3.1+ | +| Spring Data ArangoDB | Spring Data | ArangoDB | +| -------------------- | ----------- | ---------------------- | +| 1.3.x | 1.13.x | 3.0\*, 3.1+ | +| 2.x.x | 2.x.x | 3.0.x, 3.1+ | +| 3.x.x | 2.x.x | 3.3.x, 3.4.x, 3.5.x | Spring Data ArangoDB requires ArangoDB 3.0 or higher - which you can download [here](https://www.arangodb.com/download/){:target="_blank"} - and Java 8 or higher. diff --git a/3.6/deployment-kubernetes-backup-policy-resource.md b/3.6/deployment-kubernetes-backup-policy-resource.md new file mode 100644 index 0000000000..9edcceb469 --- /dev/null +++ b/3.6/deployment-kubernetes-backup-policy-resource.md @@ -0,0 +1,162 @@ +--- +layout: default +description: ArangoBackupPolicy Custom Resource +--- + +# ArangoBackupPolicy Custom Resource + +The ArangoBackupPolicy represents schedule definition for creating ArangoBackup Custom Resources by operator. +This deployment specification is a `CustomResource` following +a `CustomResourceDefinition` created by the operator. + +## Examples: + +### Create schedule for all deployments + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * *" +``` + +Action: + +Create an ArangoBackup Custom Resource for each ArangoBackup every 15 minutes + +### Create schedule for selected deployments + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * *" + selector: + matchLabels: + labelName: "labelValue" +``` + +Action: + +Create an ArangoBackup Custom Resource for selected ArangoBackup every 15 minutes + +### Create schedule for all deployments and upload + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * * " + template: + upload: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" +``` + +Create an ArangoBackup Custom Resource for each ArangoBackup every 15 minutes and upload to repositoryURL + +## ArangoBackup Custom Resource Spec: + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackupPolicy" +metadata: + name: "example-arangodb-backup-policy" +spec: + schedule: "*/15 * * * * " + selector: + matchLabels: + labelName: "labelValue" + matchExpressions: [] + template: + options: + timeout: 3 + force: true + upload: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" +status: + scheduled: "time" + message: "message" +``` + +## `spec: Object` + +Spec of the ArangoBackupPolicy Custom Resource + +Required: true + +Default: {} + +### `spec.schedule: String` + +Schedule definition. Parser from https://godoc.org/github.com/robfig/cron + +Required: true + +Default: "" + +### `spec.selector: Object` + +Selector definition for selecting matching ArangoBackup Custom Resources. Parser from https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector + +Required: false + +Default: {} + +### `spec.template: ArangoBackupTemplate` + +Template for the ArangoBackup Custom Resource + +Required: false + +Default: {} + +### `spec.template.options: ArangoBackup - spec.options` + +ArangoBackup options + +Required: false + +Default: {} + +### `spec.template.upload: ArangoBackup - spec.upload` + +ArangoBackup upload configuration + +Required: false + +Default: {} + +## `status: Object` + +Status of the ArangoBackupPolicy Custom Resource managed by operator + +Required: true + +Default: {} + +### `status.scheduled: TimeStamp` + +Next scheduled time in UTC + +Required: true + +Default: "" + +### `status.message: String` + +Message from the operator in case of failure - schedule not valid, ArangoBackupPolicy not valid + +Required: false + +Default: "" \ No newline at end of file diff --git a/3.6/deployment-kubernetes-backup-resource.md b/3.6/deployment-kubernetes-backup-resource.md new file mode 100644 index 0000000000..0532a63f86 --- /dev/null +++ b/3.6/deployment-kubernetes-backup-resource.md @@ -0,0 +1,462 @@ +--- +layout: default +description: ArangoBackup Custom Resource +--- + +# ArangoBackup Custom Resource + +The ArangoBackup Operator creates and maintains ArangoBackups +in a Kubernetes cluster, given a Backup specification. +This deployment specification is a `CustomResource` following +a `CustomResourceDefinition` created by the operator. + +## Examples: + +### Create simple Backup + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + deployment: + name: "my-deployment" +``` + +Action: + +Create Backup on ArangoDeployment named `my-deployment` + +### Create and upload Backup + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + deployment: + name: "my-deployment" + upload: + repositoryURL: "S3://test/kube-test" + credentialsSecretName: "my-s3-rclone-credentials" +``` + +Action: + +Create Backup on ArangoDeployment named `my-deployment` and upload it to `S3://test/kube-test`. + + +### Download Backup + + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + deployment: + name: "my-deployment" + download: + repositoryURL: "S3://test/kube-test" + credentialsSecretName: "my-s3-rclone-credentials" + id: "backup-id" +``` + +Download Backup with id `backup-id` from `S3://test/kube-test` on ArangoDeployment named `my-deployment` + +### Restore + +Information about restoring can be found in [ArangoDeployment](deployment-kubernetes-deployment-resource.html). + +## Advertised fields + +List of custom columns in CRD specification for Kubectl: +- `.spec.policyName` - optional name of the policy +- `.spec.deployment.name` - name of the deployment +- `.status.state` - current ArangoBackup Custom Resource state +- `.status.message` - additional message for current state + +## ArangoBackup Custom Resource Spec: + +```yaml +apiVersion: "backup.arangodb.com/v1alpha" +kind: "ArangoBackup" +metadata: + name: "example-arangodb-backup" + namespace: "arangodb" +spec: + policyName: "my-policy" + deployment: + name: "my-deployment" + options: + timeout: 3 + force: true + download: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" + id: "backup-id" + upload: + repositoryURL: "s3:/..." + credentialsSecretName: "secret-name" +status: + state: "Ready" + time: "time" + message: "Message details" - + progress: + jobID: "id" + progress: "10%" + backup: + id: "id" + version: "3.6.0-dev" + forced: true + uploaded: true + downloaded: true + createdAt: "time" + sizeInBytes: 1 + numberOfDBServers: 3 + available: true +``` + +## `spec: Object` + +Spec of the ArangoBackup Custom Resource. + +Required: true + +Default: {} + +### `spec.deployment: Object` + +ArangoDeployment specification. + +Field is immutable. + +Required: true + +Default: {} + +#### `spec.deployment.name: String` + +Name of the ArangoDeployment Custom Resource within same namespace as ArangoBackup Custom Resource. + +Field is immutable. + +Required: true + +Default: "" + +#### `spec.policyName: String` + +Name of the ArangoBackupPolicy which created this Custom Resource + +Field is immutable. + +Required: false + +Default: "" + +### `spec.options: Object` + +Backup options. + +Field is immutable. + +Required: false + +Default: {} + +#### `spec.options.timeout: float` + +Timeout for Backup creation request in seconds. + +Field is immutable. + +Required: false + +Default: 30 + +#### `spec.options.allowInconsistent: bool` + +AllowInconsistent flag for Backup creation request. +If this value is set to true, backup is taken even if we are not able to acquire lock. + +Field is immutable. + +Required: false + +Default: false + +### `spec.download: Object` + +Backup download settings. + +Field is immutable. + +Required: false + +Default: {} + +#### `spec.download.repositoryURL: string` + +Field is immutable. Protocol needs to be defined in `spec.download.credentialsSecretName` if protocol is other than local. + +Mode protocols can be found [here](https://rclone.org/){:target="_blank"}. + +Format: `:/` + +Examples: +- `s3://my-bucket/test` +- `azure://test` + +Required: true + +Default: "" + +#### `spec.download.credentialsSecretName: string` + +Field is immutable. Name of the secret used while accessing repository + +Secret structure: + +```yaml +apiVersion: v1 +data: + token: +kind: Secret +metadata: + name: +type: Opaque +``` + +`JSON Token` options are described on the [rClone](https://rclone.org/){:target="_blank"} page. +We can define more than one protocols at same time in one secret. + +This field is defined in json format: + +```json +{ + "": { + "type":"", + ...parameters + } +} +``` + +AWS S3 example - based on [rClone S3](https://rclone.org/s3/){:target="_blank"} documentation and interactive process: + +```json +{ + "S3": { + "type": "s3", # Choose s3 type + "provider": "AWS", # Choose one of the providers + "env_auth": "false", # Define credentials in next step instead of using ENV + "access_key_id": "xxx", + "secret_access_key": "xxx", + "region": "eu-west-2", # Choose region + "acl": "private", # Set permissions on newly created remote object + } +} +``` + +and you can from now use `S3://bucket/path`. + +Required: false + +Default: "" + +#### `spec.download.id: string` + +ID of the ArangoBackup to be downloaded. + +Field is immutable. + +Required: true + +Default: "" + +### `spec.upload: Object` + +Backup upload settings. + +This field can be removed and created again with different values. This operation will trigger upload again. +Fields in Custom Resource Spec Upload are immutable. + +Required: false + +Default: {} + +#### `spec.upload.repositoryURL: string` + +Same structure as `spec.download.repositoryURL`. + +Required: true + +Default: "" + +#### `spec.upload.credentialsSecretName: string` + +Same structure as `spec.download.credentialsSecretName`. + +Required: false + +Default: "" + +## `status: Object` + +Status of the ArangoBackup Custom Resource. This field is managed by subresource and only by operator + +Required: true + +Default: {} + +### `status.state: enum` + +State of the ArangoBackup object. + +Required: true + +Default: "" + +Possible states: +- "" - default state, changed to "Pending" +- "Pending" - state in which Custom Resource is queued. If Backup is possible changed to "Scheduled" +- "Scheduled" - state which will start create/download process +- "Download" - state in which download request will be created on ArangoDB +- "DownloadError" - state when download failed +- "Downloading" - state for downloading progress +- "Create" - state for creation, field available set to true +- "Upload" - state in which upload request will be created on ArangoDB +- "Uploading" - state for uploading progress +- "UploadError" - state when uploading failed +- "Ready" - state when Backup is finished +- "Deleted" - state when Backup was once in ready, but has been deleted +- "Failed" - state for failure +- "Unavailable" - state when Backup is not available on the ArangoDB. It can happen in case of upgrades, node restarts etc. + +### `status.time: timestamp` + +Time in UTC when state of the ArangoBackup Custom Resource changed. + +Required: true + +Default: "" + +### `status.message: string` + +State message of the ArangoBackup Custom Resource. + +Required: false + +Default: "" + +### `status.progress: object` + +Progress info of the uploading and downloading process. + +Required: false + +Default: {} + +#### `status.progress.jobID: string` + +ArangoDB job ID for uploading or downloading. + +Required: true + +Default: "" + +#### `status.progress.progress: string` + +ArangoDeployment job progress. + +Required: true + +Default: "0%" + + +### `status.backup: object` + +ArangoBackup details. + +Required: true + +Default: {} + +#### `status.backup.id: string` + +ArangoBackup ID. + +Required: true + +Default: "" + +#### `status.backup.version: string` + +ArangoBackup version. + +Required: true + +Default: "" + +#### `status.backup.potentiallyInconsistent: bool` + +ArangoBackup potentially inconsistent flag. + +Required: false + +Default: false + +#### `status.backup.uploaded: bool` + +Determines if ArangoBackup has been uploaded. + +Required: false + +Default: false + +#### `status.backup.downloaded: bool` + +Determines if ArangoBackup has been downloaded. + +Required: false + +Default: false + +#### `status.backup.createdAt: TimeStamp` + +ArangoBackup Custom Resource creation time in UTC. + +Required: true + +Default: now() + +#### `status.backup.sizeInBytes: uint64` + +Size of the Backup in ArangoDB. + +Required: true + +Default: 0 + +#### `status.backup.numberOfDBServers: uint` + +Cluster size of the Backup in ArangoDB. + +Required: true + +Default: 0 + +### `status.available: bool` + +Determines if we can restore from ArangoBackup. + +Required: true + +Default: false \ No newline at end of file diff --git a/3.6/deployment-kubernetes-deployment-resource.md b/3.6/deployment-kubernetes-deployment-resource.md index 88f003cc30..a5cfa31f42 100644 --- a/3.6/deployment-kubernetes-deployment-resource.md +++ b/3.6/deployment-kubernetes-deployment-resource.md @@ -101,6 +101,10 @@ Possible values are: - `IfNotPresent` (default) to pull only when the image is not found on the node. - `Always` to always pull the image before using it. +### `spec.imagePullSecrets: []string` + +This setting specifies the list of image pull secrets for the docker image to use for all ArangoDB servers. + ### `spec.storageEngine: string` This setting specifies the type of storage engine used for all servers @@ -144,6 +148,20 @@ The encryption key cannot be changed after the cluster has been created. The secret specified by this setting, must have a data field named 'key' containing an encryption key that is exactly 32 bytes long. +### `spec.networkAttachedVolumes: bool` + +The default of this option is `false`. If set to `true`, and the +deployed ArangoDB version is new enough (>= 3.4.8 for 3.4 and >= 3.5.1 +for 3.5), a `ResignLeaderShip` operation +will be triggered when a dbserver pod is evicted (rather than a +`CleanOutServer` operation). Furthermore, the pod will simply be +redeployed on a different node, rather than cleaned and retired and +replaced by a new member. You must only set this option to `true` if +your persistent volumes are "movable" in the sense that they can be +mounted from a different k8s node, like in the case of network attached +volumes. If your persistent volumes are tied to a specific pod, you +must leave this option on `false`. + ### `spec.externalAccess.type: string` This setting specifies the type of `Service` that will be created to provide @@ -163,6 +181,14 @@ This setting is used when `spec.externalAccess.type` is set to `LoadBalancer` or If you do not specify this setting, an IP will be chosen automatically by the load-balancer provisioner. +### `spec.externalAccess.loadBalancerSourceRanges: []string` + +If specified and supported by the platform (cloud provider), this will restrict traffic through the cloud-provider +load-balancer will be restricted to the specified client IPs. This field will be ignored if the +cloud-provider does not support the feature. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + ### `spec.externalAccess.nodePort: int` This setting specifies the port used to expose the ArangoDB deployment on. @@ -259,6 +285,15 @@ This setting is used when `spec.sync.externalAccess.type` is set to `NodePort` o If you do not specify this setting, a random port will be chosen automatically. +### `spec.sync.externalAccess.loadBalancerSourceRanges: []string` + +If specified and supported by the platform (cloud provider), this will restrict traffic through the cloud-provider +load-balancer will be restricted to the specified client IPs. This field will be ignored if the +cloud-provider does not support the feature. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + + ### `spec.sync.externalAccess.masterEndpoint: []string` This setting specifies the master endpoint(s) advertised by the ArangoSync SyncMasters. @@ -341,6 +376,22 @@ The default is `false`. This setting cannot be changed after the deployment has been created. +### `spec.restoreFrom: string` + +This setting specifies a `ArangoBackup` resource name the cluster should be restored from. + +After a restore or failure to do so, the status of the deployment contains information about the +restore operation in the `restore` key. + +It will contain some of the following fields: +- _requestedFrom_: name of the `ArangoBackup` used to restore from. +- _message_: optional message explaining why the restore failed. +- _state_: state indicating if the restore was successful or not. Possible values: `Restoring`, `Restored`, `RestoreFailed` + +If the `restoreFrom` key is removed from the spec, the `restore` key is deleted as well. + +A new restore attempt is made if and only if either in the status restore is not set or if spec.restoreFrom and status.requestedFrom are different. + ### `spec.license.secretName: string` This setting specifies the name of a kubernetes `Secret` that contains @@ -359,6 +410,54 @@ There are two magic values for the secret name: - `None` specifies no action. This disables root password randomization. This is the default value. (Thus the root password is empty - not recommended) - `Auto` specifies automatic name generation, which is `-root-password`. +### `spec.metrics.enabled: bool` + +If this is set to `true`, the operator runs a sidecar container for +every DBserver pod and every coordinator pod. The sidecar container runs +the ArangoDB-exporter and exposes metrics of the corresponding `arangod` +instance in Prometheus format on port 9101 under path `/metrics`. You +also have to specify a string for `spec.metrics.image`, which is the +Docker image name of the `arangodb-exporter`. At the time of this +writing you should use `arangodb/arangodb-exporter:0.1.6`. See [this +repository](https://github.com/arangodb-helper/arangodb-exporter){:target="_blank"} for +the latest version. If the image name is left empty, the same image as +for the main deployment is used. Note however, that current ArangoDB +releases (<= 3.4.5) do not ship the exporter in their image. This is +going to change in the future. + +In addition to the sidecar containers the operator will deploy a service +to access the exporter ports (from within the k8s cluster), and a +resource of type `ServiceMonitor`, provided the corresponding custom +resource definition is deployed in the k8s cluster. If you are running +Prometheus in the same k8s cluster with the Prometheus operator, this +will be the case. The `ServiceMonitor` will have the following labels +set: + + - `app: arangodb` + - `arango_deployment: YOUR_DEPLOYMENT_NAME` + - `context: metrics` + - `metrics: prometheus` + +This makes it possible that you configure your Prometheus deployment to +automatically start monitoring on the available Prometheus feeds. To +this end, you must configure the `serviceMonitorSelector` in the specs +of your Prometheus deployment to match these labels. For example: + +```yaml + serviceMonitorSelector: + matchLabels: + metrics: prometheus +``` + +would automatically select all pods of all ArangoDB cluster deployments +which have metrics enabled. + +### `spec.metrics.image: string` + +See above, this is the name of the Docker image for the ArangoDB +exporter to expose metrics. If empty, the same image as for the main +deployment is used. + ### `spec..count: number` This setting specifies the number of servers to start for the given group. @@ -386,7 +485,7 @@ The default value is an empty array. This setting specifies the resources required by pods of this group. This includes requests and limits. -See [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/){:target="_blank"} for details. +See https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ for details. ### `spec..volumeClaimTemplate.Spec: PersistentVolumeClaimSpec` @@ -402,10 +501,26 @@ and `iops` is not forwarded to the pods resource requirements. ### `spec..serviceAccountName: string` This setting specifies the `serviceAccountName` for the `Pods` created -for each server of this group. +for each server of this group. If empty, it defaults to using the +`default` service account. Using an alternative `ServiceAccount` is typically used to separate access rights. -The ArangoDB deployments do not require any special rights. +The ArangoDB deployments need some very minimal access rights. With the +deployment of the operator, we grant the following rights for the `default` +service account: + +``` +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - get +``` + +If you are using a different service account, please grant these rights +to that service account. ### `spec..priorityClassName: string` @@ -462,4 +577,4 @@ because servers in these groups do not need persistent storage. Please use VolumeClaimTemplate from now on. This field is not considered if VolumeClaimTemplate is set. Note however, that the information in requests -is completely handed over to the pod in this case. \ No newline at end of file +is completely handed over to the pod in this case. diff --git a/3.6/deployment-kubernetes-helm.md b/3.6/deployment-kubernetes-helm.md index 47f9c7020f..58f2db1d55 100644 --- a/3.6/deployment-kubernetes-helm.md +++ b/3.6/deployment-kubernetes-helm.md @@ -18,13 +18,10 @@ For example you can install the operator in a namespace other than The ArangoDB Kubernetes Operator is contained in two `helm` charts: -- `kube-arangodb` which contains the operator for the `ArangoDeployment` +- `kube-arangodb` which contains the operator for the `ArangoDeployment`, `ArangoLocalStorage` and `ArangoDeploymentReplication` resource types. -- `kube-arangodb-storage` which contains the operator for the `ArangoLocalStorage` - resource type. +- `kube-arangodb-crd` which contains the CRD for the `ArangoDeployment` and `ArangoDeploymentReplication` resource types. -The `kube-arangodb-storage` only has to be installed if your Kubernetes cluster -does not already provide `StorageClasses` that use locally attached SSDs. ## Configurable values for ArangoDB Kubernetes Operator @@ -34,35 +31,101 @@ ArangoDB Kubernetes Operator with `helm`. Values are passed to `helm` using an `--set==` argument passed to the `helm install` or `helm upgrade` command. -### Values applicable to both charts - -| Key | Type | Description -|-------------------|--------|-----| -| Image | string | Override the docker image used by the operators -| ImagePullPolicy | string | Override the image pull policy used by the operators. See [Updating Images](https://kubernetes.io/docs/concepts/containers/images/#updating-images){:target="_blank"} for details. -| RBAC.Create | bool | Set to `true` (default) to create roles & role bindings. - -### Values applicable to the `kube-arangodb` chart - -| Key | Type | Description -|-------------------|--------|-----| -| Deployment.Create | bool | Set to `true` (default) to deploy the `ArangoDeployment` operator -| Deployment.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoDeployment` operator -| Deployment.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoDeployment` operator -| Deployment.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoDeployment` operator -| Deployment.AllowChaos | bool | Set to `true` to allow the introduction of chaos. **Only use for testing, never for production!** Defaults to `false`. -| DeploymentReplication.Create | bool | Set to `true` (default) to deploy the `ArangoDeploymentReplication` operator -| DeploymentReplication.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoDeploymentReplication` operator -| DeploymentReplication.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoDeploymentReplication` operator -| DeploymentReplication.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoDeploymentReplication` operator - -### Values applicable to the `kube-arangodb-storage` chart - -| Key | Type | Description -|-------------------|--------|-----| -| Storage.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoLocalStorage` operator -| Storage.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoLocalStorage` operator -| Storage.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoLocalStorage` operator +### `operator.image` + +Image used for the ArangoDB Operator. + +Default: `arangodb/kube-arangodb:latest` + +### `operator.imagePullPolicy` + +Image pull policy for Operator images. + +Default: `IfNotPresent` + +### `operator.imagePullSecrets` + +List of the Image Pull Secrets for Operator images. + +Default: `[]string` + +### `operator.service.type` + +Type of the Operator service. + +Default: `ClusterIP` + +### `operator.annotations` + +Annotations passed to the Operator Deployment definition. + +Default: `[]string` + +### `operator.resources.limits.cpu` + +CPU limits for operator pods. + +Default: `1` + +### `operator.resources.limits.memory` + +Memory limits for operator pods. + +Default: `256Mi` + +### `operator.resources.requested.cpu` + +Requested CPI by Operator pods. + +Default: `250m` + +### `operator.resources.requested.memory` + +Requested memory for operator pods. + +Default: `256Mi` + +### `operator.replicaCount` + +Replication count for Operator deployment. + +Default: `2` + +### `operator.updateStrategy` + +Update strategy for operator pod. + +Default: `Recreate` + +### `operator.features.deployment` + +Define if ArangoDeployment Operator should be enabled. + +Default: `true` + +### `operator.features.deploymentReplications` + +Define if ArangoDeploymentReplications Operator should be enabled. + +Default: `true` + +### `operator.features.storage` + +Define if ArangoLocalStorage Operator should be enabled. + +Default: `false` + +### `operator.features.backup` + +Define if ArangoBackup Operator should be enabled. + +Default: `false` + +### `rbac.enabled` + +Define if RBAC should be enabled. + +Default: `true` ## Alternate namespaces diff --git a/3.6/deployment-kubernetes-metrics.md b/3.6/deployment-kubernetes-metrics.md index 810ff9801f..37a09a1612 100644 --- a/3.6/deployment-kubernetes-metrics.md +++ b/3.6/deployment-kubernetes-metrics.md @@ -13,3 +13,8 @@ The metrics are exposed through HTTPS on port `8528` under path `/metrics`. Look at [examples/metrics](https://github.com/arangodb/kube-arangodb/tree/master/examples/metrics){:target="_blank"} for examples of `Services` and `ServiceMonitors` you can use to integrate with Prometheus through the [Prometheus-Operator by CoreOS](https://github.com/coreos/prometheus-operator){:target="_blank"}. + +Furthermore, the operator can run sidecar containers for ArangoDB +deployments of type Cluster which expose metrics in Prometheus format. +Use the attribute `spec.metrics` to set this up see the [spec +reference](deployment-kubernetes-deployment-resource.html) for details. diff --git a/3.6/deployment-kubernetes.md b/3.6/deployment-kubernetes.md index 63e8b45348..dde3f0a485 100644 --- a/3.6/deployment-kubernetes.md +++ b/3.6/deployment-kubernetes.md @@ -16,6 +16,8 @@ Each of these uses involves a different custom resource. - Use an [`ArangoDeployment` resource](deployment-kubernetes-deployment-resource.html) to create an ArangoDB database deployment. +- Use an [`ArangoBackup` resource](deployment-kubernetes-backup-resource.html) to + create an ArangoDB backup. - Use an [`ArangoLocalStorage` resource](deployment-kubernetes-storage-resource.html) to provide local `PersistentVolumes` for optimal I/O performance. - Use an [`ArangoDeploymentReplication` resource](deployment-kubernetes-deployment-replication-resource.html) to diff --git a/3.6/drivers/index.md b/3.6/drivers/index.md index 5557bd9dcc..25ee704aa2 100644 --- a/3.6/drivers/index.md +++ b/3.6/drivers/index.md @@ -14,7 +14,6 @@ Official drivers Name | Language | Repository |   -----|----------|------------|------- [ArangoDB-Java-Driver](java.html) | Java | [github.com/arangodb/arangodb-java-driver](https://github.com/arangodb/arangodb-java-driver){:target="_blank"} | [Changelog](https://github.com/arangodb/arangodb-java-driver/blob/master/ChangeLog.md#readme){:target="_blank"} -ArangoDB-Java-Driver-Async | Java | [github.com/arangodb/arangodb-java-driver-async](https://github.com/arangodb/arangodb-java-driver-async){:target="_blank"} | [Changelog](https://github.com/arangodb/arangodb-java-driver-async/blob/master/ChangeLog.md#readme){:target="_blank"} [ArangoJS](js.html) | JavaScript | [github.com/arangodb/arangojs](https://github.com/arangodb/arangojs){:target="_blank"} | [Changelog](https://github.com/arangodb/arangojs/blob/master/CHANGELOG.md#readme){:target="_blank"} [ArangoDB-PHP](php.html) | PHP | [github.com/arangodb/arangodb-php](https://github.com/arangodb/arangodb-php){:target="_blank"} | [Changelog](https://github.com/arangodb/arangodb-php/blob/devel/CHANGELOG.md#readme){:target="_blank"} [Go-Driver](go.html) | Go | [github.com/arangodb/go-driver](https://github.com/arangodb/go-driver){:target="_blank"} | [Changelog](https://github.com/arangodb/go-driver/blob/master/CHANGELOG.md#readme){:target="_blank"} diff --git a/3.6/drivers/java-reference-collection-indexes.md b/3.6/drivers/java-reference-collection-indexes.md index 1edac84a4b..959c701fab 100644 --- a/3.6/drivers/java-reference-collection-indexes.md +++ b/3.6/drivers/java-reference-collection-indexes.md @@ -22,6 +22,11 @@ Creates a hash index for the collection if it does not already exist. - **options**: `HashIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **unique**: `Boolean` If true, then create a unique index @@ -34,6 +39,11 @@ Creates a hash index for the collection if it does not already exist. If false, the de-duplication of array values is turned off. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -59,6 +69,11 @@ Creates a skip-list index for the collection if it does not already exist. - **options**: `SkipListIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **unique**: `Boolean` If true, then create a unique index @@ -71,6 +86,11 @@ Creates a skip-list index for the collection if it does not already exist. If false, the de-duplication of array values is turned off. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -98,12 +118,22 @@ Creates a geo index for the collection if it does not already exist. - **options**: `GeoIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **geoJson**: `Boolean` If a geo-spatial index on a location is constructed and geoJson is true, then the order within the array is longitude followed by latitude. This corresponds to the format described in. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -131,12 +161,22 @@ Creates a fulltext index for the collection if it does not already exist. - **options**: `FulltextIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **minLength**: `Integer` Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index. + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -164,6 +204,11 @@ Creates a persistent index for the collection if it does not already exist. - **options**: `PersistentIndexOptions` + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + - **unique**: `Boolean` If true, then create a unique index @@ -172,6 +217,11 @@ Creates a persistent index for the collection if it does not already exist. If true, then create a sparse index + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + **Examples** ```Java @@ -183,6 +233,49 @@ IndexEntity index = collection.ensurePersistentIndex(Arrays.asList("a", "b.c")); // the index has been created with the handle `index.getId()` ``` +## ArangoCollection.ensureTtlIndex + +`ArangoCollection.ensureTtlIndex(Iterable fields, TtlIndexOptions options) : IndexEntity` + +Creates a ttl index for the collection if it does not already exist. + +**Arguments** + +- **fields**: `Iterable` + + A list of attribute paths + +- **options**: `PersistentIndexOptions` + + - **name**: `String` + + Specify a custom name during index creation (optional). When running AQL queries you might then refer + to these name as your preferred index for lookups (e.g. Index Hints). + + - **expireAfter**: `Integer` + + The time (in seconds) after a document's creation after which the documents count as "expired". + + - **inBackground**: `Boolean` + + Indexes created with the 'inBackground' option, will not hold an exclusive collection + lock for the entire index creation period (rocksdb only). + +**Examples** + +```Java +ArangoDB arango = new ArangoDB.Builder().build(); +ArangoDatabase db = arango.db("myDB"); +ArangoCollection collection = db.collection("some-collection"); + +final TtlIndexOptions options = new TtlIndexOptions(); + options.name("myTtlIndex"); + options.expireAfter(3600); + +IndexEntity index = collection.ensureTtlIndex(Arrays.asList("a", "b.c"), options); +// the index has been created with the handle `index.getId()` +``` + ## ArangoCollection.getIndex `ArangoCollection.getIndex(String id) : IndexEntity` diff --git a/3.6/drivers/java-reference-database-queries.md b/3.6/drivers/java-reference-database-queries.md index 9b63a22a1d..2d066ed962 100644 --- a/3.6/drivers/java-reference-database-queries.md +++ b/3.6/drivers/java-reference-database-queries.md @@ -156,6 +156,10 @@ a new _ArangoCursor_ instance for the result list. query statistics, warnings and profiling data will only be available after the query is finished. The default value is false. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + - **type**: `Class` The type of the result (POJO class, `VPackSlice`, `String` for JSON, or `Collection`/`List`/`Map`) diff --git a/3.6/drivers/java-reference-database-stream-transactions.md b/3.6/drivers/java-reference-database-stream-transactions.md new file mode 100644 index 0000000000..87a48903a3 --- /dev/null +++ b/3.6/drivers/java-reference-database-stream-transactions.md @@ -0,0 +1,93 @@ +--- +layout: default +description: See HTTP Interface for Stream Transactions +--- + +# Transactions + +See [HTTP Interface for Stream Transactions](../http/transaction-stream-transaction.html). + + +## ArangoDatabase.beginStreamTransaction + +`ArangoDatabase.beginStreamTransaction(StreamTransactionOptions options) : StreamTransactionEntity` + +Begins a server-side transaction and returns information about it. + +**Arguments** + +- **options**: `StreamTransactionOptions` + + transaction options + + +## ArangoDatabase.getStreamTransaction + +`ArangoDatabase.getStreamTransaction(String id) : StreamTransactionEntity` + +Gets information about a Stream Transaction. + +**Arguments** + +- **id**: `String` + + transaction id + + +## ArangoDatabase.getStreamTransactions + +`ArangoDatabase.getStreamTransactions() : Collection` + +Gets all the currently running Stream Transactions. + + +## ArangoDatabase.commitStreamTransaction + +`ArangoDatabase.commitStreamTransaction(String id) : StreamTransactionEntity` + +Commits a Stream Transaction. + +**Arguments** + +- **id**: `String` + + transaction id + + +## ArangoDatabase.abortStreamTransaction + +`ArangoDatabase.abortStreamTransaction(String id) : StreamTransactionEntity` + +Aborts a Stream Transaction. + +**Arguments** + +- **id**: `String` + + transaction id + + +## Examples + +```Java +ArangoDB arango = new ArangoDB.Builder().build(); +ArangoDatabase db = arango.db("myDB"); + +StreamTransactionEntity tx1 = db.beginStreamTransaction( + new StreamTransactionOptions().readCollections("collection").writeCollections("collection")); +db.collection("collection") + .insertDocument(new BaseDocument(), new DocumentCreateOptions().streamTransactionId(tx1.getId())); +db.commitStreamTransaction(tx1.getId()); +StreamTransactionEntity tx = db.getStreamTransaction(tx1.getId()); +assertThat(tx.getStatus(), is(StreamTransactionEntity.StreamTransactionStatus.committed)); + +StreamTransactionEntity tx2 = db.beginStreamTransaction( + new StreamTransactionOptions().readCollections("collection").writeCollections("collection")); +final Map bindVars = new HashMap<>(); +bindVars.put("@collection", COLLECTION_NAME); +bindVars.put("key", "myKey"); +ArangoCursor cursor = db + .query("FOR doc IN @@collection FILTER doc._key == @key RETURN doc", bindVars, + new AqlQueryOptions().streamTransactionId(tx2.getId()), BaseDocument.class); +db.abortStreamTransaction(tx2.getId()); +``` diff --git a/3.6/drivers/java-reference-graph-edges.md b/3.6/drivers/java-reference-graph-edges.md index d36fcf7479..491b6caf72 100644 --- a/3.6/drivers/java-reference-graph-edges.md +++ b/3.6/drivers/java-reference-graph-edges.md @@ -7,7 +7,7 @@ description: Manipulating edges ## ArangoEdgeCollection.getEdge -`ArangoEdgeCollection.getEdge(String key, Class type, DocumentReadOptions options) : T` +`ArangoEdgeCollection.getEdge(String key, Class type, GraphDocumentReadOptions options) : T` Retrieves the edge document with the given `key` from the collection. @@ -21,7 +21,7 @@ Retrieves the edge document with the given `key` from the collection. The type of the edge-document (POJO class, `VPackSlice` or `String` for JSON) -- **options**: `DocumentReadOptions` +- **options**: `GraphDocumentReadOptions` - **ifNoneMatch**: `String` @@ -35,6 +35,10 @@ Retrieves the edge document with the given `key` from the collection. Whether or not catch possible thrown exceptions + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + ## ArangoEdgeCollection.insertEdge `ArangoEdgeCollection.insertEdge(T value, EdgeCreateOptions options) : EdgeEntity` @@ -93,6 +97,10 @@ a edge and no precondition is violated. Replace a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -140,6 +148,10 @@ edge and no precondition is violated. from the existing document that are contained in the patch document with an attribute value of null. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -174,6 +186,10 @@ Deletes the edge with the given _key_ from the collection. Remove a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java diff --git a/3.6/drivers/java-reference-graph-vertices.md b/3.6/drivers/java-reference-graph-vertices.md index 98ea17b291..2a7f33da37 100644 --- a/3.6/drivers/java-reference-graph-vertices.md +++ b/3.6/drivers/java-reference-graph-vertices.md @@ -7,7 +7,7 @@ description: Manipulating vertices ## ArangoVertexCollection.getVertex -`ArangoVertexCollection.getVertex(String key, Class type, DocumentReadOptions options) : T` +`ArangoVertexCollection.getVertex(String key, Class type, GraphDocumentReadOptions options) : T` Retrieves the vertex document with the given `key` from the collection. @@ -21,7 +21,7 @@ Retrieves the vertex document with the given `key` from the collection. The type of the vertex-document (POJO class, `VPackSlice` or `String` for JSON) -- **options**: `DocumentReadOptions` +- **options**: `GraphDocumentReadOptions` - **ifNoneMatch**: `String` @@ -35,6 +35,10 @@ Retrieves the vertex document with the given `key` from the collection. Whether or not catch possible thrown exceptions + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + ## ArangoVertexCollection.insertVertex `ArangoVertexCollection.insertVertex(T value, VertexCreateOptions options) : VertexEntity` @@ -53,6 +57,14 @@ Creates a new vertex in the collection. Wait until document has been synced to disk. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -93,6 +105,10 @@ a vertex and no precondition is violated. Replace a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -140,6 +156,10 @@ a vertex and no precondition is violated. from the existing document that are contained in the patch document with an attribute value of null. + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java @@ -174,6 +194,10 @@ Deletes the vertex with the given _key_ from the collection. Remove a document based on target revision + - **streamTransactionId**: `String` + + If set, the operation will be executed within the transaction + **Examples** ```Java diff --git a/3.6/drivers/java-reference-graph.md b/3.6/drivers/java-reference-graph.md index 5b0d1156f9..6a3d647ffc 100644 --- a/3.6/drivers/java-reference-graph.md +++ b/3.6/drivers/java-reference-graph.md @@ -48,6 +48,17 @@ name of the graph and a definition of its edges. automatically and one of the servers holding copies take over, usually without an error being reported. + - **minReplicationFactor**: `Integer` + + (optional, default is 1): in a cluster, this + attribute determines how many copies of each shard are required + to be in sync on the different DBServers. If we have less then these + many copies in the cluster a shard will refuse to write. The + minReplicationFactor can not be larger than replicationFactor. + Please note: during server failures this might lead to writes + not being possible until the failover is sorted out and might cause + write slow downs in trade of data durability. + - **numberOfShards**: `Integer` The number of shards that is used for every collection within this graph. @@ -112,17 +123,6 @@ Alternative for [ArangoDatabase.createGraph](#arangodatabasecreategraph). automatically and one of the servers holding copies take over, usually without an error being reported. - - **minReplicationFactor**: `Integer` - - (optional, default is 1): in a cluster, this - attribute determines how many copies of each shard are required - to be in sync on the different DBServers. If we have less then these - many copies in the cluster a shard will refuse to write. The - minReplicationFactor can not be larger than replicationFactor. - Please note: during server failures this might lead to writes - not being possible until the failover is sorted out and might cause - write slow downs in trade of data durability. - - **numberOfShards**: `Integer` The number of shards that is used for every collection within this graph. diff --git a/3.6/drivers/java-reference-view-analyzers.md b/3.6/drivers/java-reference-view-analyzers.md new file mode 100644 index 0000000000..239935b287 --- /dev/null +++ b/3.6/drivers/java-reference-view-analyzers.md @@ -0,0 +1,89 @@ +--- +layout: default +description: HTTP Interface for Analyzers +--- + +# Analyzers + +[HTTP Interface for Analyzers](../http/analyzers.html). + + +## Types + +- **AnalyzerEntity** + + - **name**: `String` + + The analyzer name. + + - **type**: `AnalyzerType` + + The analyzer type. Can be one of: `identity`, `delimiter`, `stem`, `norm`, `ngram`, `text` + + - **properties**: `Map` + + The properties used to configure the specified type. Value may be a string, an object or null. The default value is null. + + - **features**: `Set` + + The set of features to set on the analyzer generated fields. The default value is an empty array. + Values can be: `frequency`, `norm`, `position` + + +## ArangoDatabase.createArangoSearch + +`ArangoDatabase.createAnalyzer(AnalyzerEntity options) : AnalyzerEntity` + +Creates an Analyzer. + + +## ArangoDatabase.getAnalyzer + +`ArangoDatabase.getAnalyzer(String name) : AnalyzerEntity` + +Gets information about an Analyzer + +**Arguments** + +- **name**: `String` + + The name of the analyzer + + +## ArangoDatabase.getAnalyzers + +`ArangoDatabase.getAnalyzers() : Collection` + +Retrieves all analyzers definitions. + + +## ArangoDatabase.deleteAnalyzer + +`ArangoDatabase.deleteAnalyzer(String name) : void` + +Deletes an Analyzer. + +**Arguments** + +- **name**: `String` + + The name of the analyzer + + +## ArangoDatabase.deleteAnalyzer + +`ArangoDatabase.deleteAnalyzer(String name, AnalyzerDeleteOptions options) : void` + +Deletes an Analyzer. + +**Arguments** + +- **name**: `String` + + The name of the analyzer + +- **options**: `AnalyzerDeleteOptions` + + - **force**: `Boolean` + + The analyzer configuration should be removed even if it is in-use. The default value is false. diff --git a/3.6/drivers/java-reference-view-arangosearch.md b/3.6/drivers/java-reference-view-arangosearch.md index daf4d7b154..ad58f08b9f 100644 --- a/3.6/drivers/java-reference-view-arangosearch.md +++ b/3.6/drivers/java-reference-view-arangosearch.md @@ -25,6 +25,24 @@ view information from the server. - **options**: `ArangoSearchCreateOptions` + - **commitIntervalMsec**: `Long` + + Wait at least this many milliseconds between committing view data store changes + and making documents visible to queries (default: 1000, to disable use: 0). For + the case where there are a lot of inserts/updates, a lower value, until commit, + will cause the index not to account for them and memory usage would continue to + grow. For the case where there are a few inserts/updates, a higher value will + impact performance and waste disk space for each commit call without any added + benefits. Background: For data retrieval ArangoSearch views follow the concept + of "eventually-consistent", i.e. eventually all the data in ArangoDB will be + matched by corresponding query expressions. The concept of ArangoSearch view + "commit" operation is introduced to control the upper-bound on the time until + document addition/removals are actually reflected by corresponding query + expressions. Once a "commit" operation is complete all documents added/removed + prior to the start of the "commit" operation will be reflected by queries + invoked in subsequent ArangoDB transactions, in-progress ArangoDB transactions + will still continue to return a repeatable-read state. + - **consolidationIntervalMsec**: `Long` Wait at least this many milliseconds between committing index data changes @@ -61,10 +79,15 @@ view information from the server. Apply the "consolidation" operation if and only if (default: 300): `{segmentThreshold} < number_of_segments` - - **link**: `CollectionLink[]` + - **links**: `CollectionLink[]` A list of linked collections + - **primarySorts**: `CollectionLink[]` + + A list of primary sort objects. When creating an ArangoSearch View, you + can optionally define a default sort order. + **Examples** ```Java diff --git a/3.6/drivers/java-reference.md b/3.6/drivers/java-reference.md index 95ca58f51a..850611481f 100644 --- a/3.6/drivers/java-reference.md +++ b/3.6/drivers/java-reference.md @@ -12,6 +12,7 @@ layout: default - [Queries](java-reference-database-queries.html) - [AQL User Functions](java-reference-database-aql-user-functions.html) - [Transactions](java-reference-database-transactions.html) + - [Stream Transactions](java-reference-database-stream-transactions.html) - [Graph Access](java-reference-database-graph-access.html) - [HTTP Routes](java-reference-database-http-routes.html) - [Collection](java-reference-collection.html) @@ -22,6 +23,7 @@ layout: default - [View](java-reference-view.html) - [View Manipulation](java-reference-view-view-manipulation.html) - [ArangoSearch Views](java-reference-view-arangosearch.html) + - [Analyzers](java-reference-view-analyzers.html) - [Cursor](java-reference-cursor.html) - [Graph](java-reference-graph.html) - [Vertex Collection](java-reference-graph-vertex-collection.html) diff --git a/3.6/drivers/java.md b/3.6/drivers/java.md index 146476d3ef..502a162c55 100644 --- a/3.6/drivers/java.md +++ b/3.6/drivers/java.md @@ -7,13 +7,19 @@ description: The official ArangoDB Java Driver The official ArangoDB Java Driver. +It can be used synchronously as well as asynchronously. The formerly separate async +driver with the same API as the synchronous driver, except that it returned a +`CompletableFuture` instead of the result `T` directly, was merged into this +driver in version 6.2.0. See +[async examples](https://github.com/arangodb/arangodb-java-driver/tree/master/src/test/java/com/arangodb/async/example){:target="_blank"}. + - [Getting Started](java-getting-started.html) - [Reference](java-reference.html) ## See Also -- [ChangeLog](https://raw.githubusercontent.com/arangodb/arangodb-java-driver/master/ChangeLog.md){:target="_blank"} -- [Examples](https://github.com/arangodb/arangodb-java-driver/tree/master/src/test/java/com/arangodb/example){:target="_blank"} -- [Tutorial](https://www.arangodb.com/tutorials/tutorial-sync-java-driver/){:target="_blank"} -- [JavaDoc](http://arangodb.github.io/arangodb-java-driver/javadoc-4_3/index.html){:target="_blank"} -- [JavaDoc VelocyPack](http://arangodb.github.io/java-velocypack/javadoc-1_0/index.html){:target="_blank"} +- [ChangeLog](https://raw.githubusercontent.com/arangodb/arangodb-java-driver/master/ChangeLog.md) +- [Examples](https://github.com/arangodb/arangodb-java-driver/tree/master/src/test/java/com/arangodb/example) +- [Tutorial](https://www.arangodb.com/tutorials/tutorial-sync-java-driver/) +- [JavaDoc](http://arangodb.github.io/arangodb-java-driver/javadoc-6_4/index.html) +- [JavaDoc VelocyPack](http://arangodb.github.io/java-velocypack/javadoc-1_0/index.html) diff --git a/3.6/drivers/js-reference-analyzer.md b/3.6/drivers/js-reference-analyzer.md new file mode 100644 index 0000000000..51ab2bb103 --- /dev/null +++ b/3.6/drivers/js-reference-analyzer.md @@ -0,0 +1,176 @@ +--- +layout: default +description: These functions implement theHTTP API for manipulating analyzers +--- + +# Analyzer API + +These functions implement the +[HTTP API for manipulating analyzers](../http/analyzers.html). + +{% hint 'info' %} +Analyzers were introduced in ArangoDB 3.5 and are not supported by earlier +versions of ArangoDB. +{% endhint %} + +## analyzer.exists + +`async analyzer.exists(): boolean` + +Checks whether the analyzer exists. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +const result = await analyzer.exists(); +// result indicates whether the analyzer exists +``` + +### analyzer.get + +`async analyzer.get(): Object` + +Retrieves the analyzer definition for the analyzer. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +const definition = await analyzer.get(); +// definition contains the analyzer definition +``` + +## analyzer.create + +`async analyzer.create([options]): Object` + +Creates an analyzer with the given _options_, then returns the new analyzer +definition. + +**Arguments** + +- **options**: `Object` (optional) + + An object with the following properties: + + - **features**: `string` (optional) + + The features to enable for this analyzer. + + - **type**: `string` + + The type of analyzer to create. + Can be `"identity"`, `"delimiter"`, `"stem"`, `"norm"`, `"ngram"` or + `"text"`. + + - **properties**: `any` + + Additional properties for the given analyzer type. + + If the type is `"identity"`, the _properties_ are optional or can be + `undefined` or `null`. + + If the type is `"delimiter"`, the _properties_ must be an object with the + following property: + + - **delimiter**: `string` + + Delimiter to use to split text into tokens as specified in RFC 4180, + without starting new records on newlines. + + If the type is `"stem"`, the _properties_ must be an object with the + following property: + + - **locale**: `string` + + Text locale. Format: `language[_COUNTRY][.encoding][@variant]`. + + If the type is `"norm"`, the _properties_ must be an object with the + following properties: + + - **locale**: `string` + + Text locale. Format: `language[_COUNTRY][.encoding][@variant]`. + + - **case**: `string` (Default: `"lower"`) + + Case conversion. Can be `"lower"`, `"none"` or `"upper"`. + + - **accent**: `boolean` (Default: `false`) + + Preserve accent in returned words. + + If the type is `"ngram"`, the _properties_ must be an object with the + following properties: + + - **max**: `number` + + Maximum n-gram length. + + - **min**: `number` + + Minimum n-gram length. + + - **preserveOriginal**: `boolean` + + Output the original value as well. + + If the type is `"text"`, the _properties_ must be an object with the + following properties: + + - **locale**: `string` + + Text locale. Format: `language[_COUNTRY][.encoding][@variant]`. + + - **case**: `string` (Default: `"lower"`) + + Case conversion. Can be `"lower"`, `"none"` or `"upper"`. + + - **stopwords**: `Array` (optional) + + Words to omit from result. Defaults to the words loaded from the file at + _stopwordsPath_. + + - **stopwordsPath**: `string` (optional) + + Path with a `language` sub-directory containing files with words to omit. + + Defaults to the path specified in the server-side environment variable + `IRESEARCH_TEXT_STOPWORD_PATH` or the current working directory of the + ArangoDB process. + + - **accent**: `boolean` (Default: `false`) + + Preserve accent in returned words. + + - **stemming**: `boolean` (Default: `true`) + + Apply stemming on returned words. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("potatoes"); +await analyzer.create({ type: "identity" }); +// the identity analyzer "potatoes" now exists +``` + +## analyzer.drop + +`async analyzer.drop(): Object` + +Deletes the analyzer from the database, then returns an object with the _name_ +of the analyzer that was dropped. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +await analyzer.drop(); +// the analyzer "some-analyzer" no longer exists +``` diff --git a/3.6/drivers/js-reference-collection.md b/3.6/drivers/js-reference-collection.md index b3deb6ca3b..d2ecdbc8d3 100644 --- a/3.6/drivers/js-reference-collection.md +++ b/3.6/drivers/js-reference-collection.md @@ -31,7 +31,7 @@ Checks whether the collection exists. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const result = await collection.exists(); // result indicates whether the collection exists ``` @@ -46,11 +46,35 @@ Retrieves general information about the collection. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.get(); // data contains general information about the collection ``` +### collection.getResponsibleShard + +`async collection.getResponsibleShard(document): string` + +Retrieves the `shardId` of the shard responsible for the given document. + +**Arguments** + +- **document**: `Object` + + Document to look up the responsible shard for. This can either be a full + document or an object with at least those attributes present, which are + used as shard key for the collection (Default: `_key`). + +**Examples** + +```js +const doc = await collection.document("abc123"); +const shardId = await collection.getResponsibleShard(doc); +// -- or -- +// Assuming the collection shard key is "_key" (the default) +const shardId = await collection.getResponsibleShard({ _key: "abc123" }); +``` + ### collection.properties `async collection.properties(): Object` @@ -61,7 +85,7 @@ Retrieves the collection's properties. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.properties(); // data contains the collection's properties ``` @@ -76,7 +100,7 @@ Retrieves information about the number of documents in a collection. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.count(); // data contains the collection's count ``` @@ -91,7 +115,7 @@ Retrieves statistics for a collection. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.figures(); // data contains the collection's figures ``` @@ -106,7 +130,7 @@ Retrieves the collection revision ID. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.revision(); // data contains the collection's revision ``` @@ -128,7 +152,7 @@ Retrieves the collection checksum. ```js const db = new Database(); -const collection = db.collection('some-collection'); +const collection = db.collection("some-collection"); const data = await collection.checksum(); // data contains the collection's checksum ``` diff --git a/3.6/drivers/js-reference-database-analyzer-access.md b/3.6/drivers/js-reference-database-analyzer-access.md new file mode 100644 index 0000000000..f927efb1e6 --- /dev/null +++ b/3.6/drivers/js-reference-database-analyzer-access.md @@ -0,0 +1,59 @@ +--- +layout: default +description: These functions implement theHTTP API for accessing analyzers +--- + +# Accessing analyzers + +These functions implement the +[HTTP API for accessing analyzers](../http/analyzers.html). + +{% hint 'info' %} +Analyzers were introduced in ArangoDB 3.5 and are not supported by earlier +versions of ArangoDB. +{% endhint %} + +## database.analyzer + +`database.analyzer(analyzerName): Analyzer` + +Returns an _Analyzer_ instance representing the analyzer with the given analyzer +name. + +**Examples** + +```js +const db = new Database(); +const analyzer = db.analyzer("some-analyzer"); +const info = await analyzer.get(); +``` + +## database.listAnalyzers + +`async database.listAnalyzers(): Array` + +Fetches all analyzers visible in the database and returns an array of analyzer +descriptions. + +**Examples** + +```js +const db = new Database(); +const analyzers = await db.listAnalyzers(); +// analyzers is an array of analyzer descriptions +``` + +## database.analyzers + +`async database.analyzers(): Array` + +Fetches all analyzers visible in the database and returns an array of _Analyzer_ +instances for those analyzers. + +**Examples** + +```js +const db = new Database(); +const analyzers = await db.analyzers(); +// analyzers is an array of Analyzer instances +``` diff --git a/3.6/drivers/js-reference-database-graph-access.md b/3.6/drivers/js-reference-database-graph-access.md index cd5d982a34..6f15b657a9 100644 --- a/3.6/drivers/js-reference-database-graph-access.md +++ b/3.6/drivers/js-reference-database-graph-access.md @@ -33,7 +33,7 @@ const graphs = await db.listGraphs(); `async database.graphs(): Array` Fetches all graphs from the database and returns an array of _Graph_ instances -for the graphs. +for those graphs. **Examples** diff --git a/3.6/drivers/js-reference-database-transactions.md b/3.6/drivers/js-reference-database-transactions.md index 5a50d78d91..403ee416e3 100644 --- a/3.6/drivers/js-reference-database-transactions.md +++ b/3.6/drivers/js-reference-database-transactions.md @@ -1,16 +1,17 @@ --- layout: default -description: This function implements theHTTP API for transactions +description: These functions implement theHTTP API for transactions --- # Transactions -This function implements the +These functions implement the [HTTP API for transactions](../http/transaction.html). +Also see [ArangoDB Transactions](../transactions.html). -## database.transaction +## database.executeTransaction -`async database.transaction(collections, action, [params, [options]]): Object` +`async database.executeTransaction(collections, action, [options]): Object` Performs a server-side transaction and returns its return value. @@ -20,36 +21,52 @@ Performs a server-side transaction and returns its return value. An object with the following properties: - - **read**: `Array` (optional) + - **read**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + read from during the transaction. + + - **write**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. + + If ArangoDB is using the RocksDB storage engine, write access to the + collections will be shared, i.e. other writes to the collections may run in + parallel. - An array of names (or a single name) of collections that will be read from - during the transaction. + If ArangoDB is using the MMFiles engine, this option is synonymous with + _collections.exclusive_, i.e. no other writes will run in parallel. - - **write**: `Array` (optional) + - **exclusive**: `Array | string | Collection` (optional) - An array of names (or a single name) of collections that will be written to - or read from during the transaction. + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. Write access will be + exclusive to the collection, i.e. no other writes will be run in parallel. - **action**: `string` A string evaluating to a JavaScript function to be executed on the server. - {% hint 'warning' %} + {% hint 'warning ' %} This function will be executed on the server inside ArangoDB and can not use - the arangojs driver or any variables other than those passed as _params_. + the arangojs driver or any values other than those passed as _params_. For accessing the database from within ArangoDB, see the documentation for the [`@arangodb` module in ArangoDB](../appendix-java-script-modules-arango-db.html). {% endhint %} -- **params**: `Object` (optional) - - Available as variable `params` when the _action_ function is being executed on - server. Check the example below. - - **options**: `Object` (optional) An object with any of the following properties: + - **params**: `any` (optional) + + Available as the first argument to the _action_ function when it is executed on the + server. Check the example below. + - **lockTimeout**: `number` (optional) Determines how long the database will wait while attempting to gain locks on @@ -73,7 +90,7 @@ Performs a server-side transaction and returns its return value. Determine the maximum total size of operations after which an intermediate commit is performed automatically. Honored by the RocksDB storage engine only. -If _collections_ is an array or string, it will be treated as +If _collections_ is an array, string or `Collection`, it will be treated as _collections.write_. Please note that while _action_ should be a string evaluating to a well-formed @@ -81,27 +98,304 @@ JavaScript function, it's not possible to pass in a JavaScript function directly because the function needs to be evaluated on the server and will be transmitted in plain text. -For more information on transactions, see the -[HTTP API documentation for transactions](../http/transaction.html). - **Examples** ```js const db = new Database(); + const action = String(function(params) { // This code will be executed inside ArangoDB! - const db = require("@arangodb").db; - return db - ._query( - aql` - FOR user IN _users - FILTER user.age > ${params.age} - RETURN u.user - ` - ) - .toArray(); + const { query } = require("@arangodb"); + return query` + FOR user IN _users + FILTER user.age > ${params.age} + RETURN u.user + `.toArray(); }); -const result = await db.transaction({ read: "_users" }, action, { age: 12 }); +const result = await db.executeTransaction("_users", action, { + params: { age: 12 } +}); // result contains the return value of the action ``` + +## database.transaction + +`database.transaction(id): Transaction` + +Returns a `Transaction` instance for an existing transaction with the given +_id_. + +{% hint 'warning' %} +For backwards-compatibility with arangojs 6.10 and earlier, this method will +behave like _executeTransaction_ when passed the following arguments: + +- **collections**: `Object` + + See _collections_ in _executeTransaction_. + +- **action**: `string` + + See _action_ in _executeTransaction_. + +- **params**: `any` (optional) + + See _options.params_ in _executeTransaction_. + +- **options**: `Object` (optional) + + See _options_ in _executeTransaction_. + +If _params_ or _options_ is a `number`, it will be treated as +_options.lockTimeout_. + +This behavior is deprecated and will be removed in arangojs 7. +{% endhint %} + +- **id**: `string` + + The _id_ of an existing stream transaction. + +**Examples** + +```js +const trx1 = await db.beginTransaction(collections); +const id = trx1.id; +// later +const trx2 = db.transaction(id); +await trx2.commit(); +``` + +## database.beginTransaction + +`async database.beginTransaction(collections, [options]): Transaction` + +Begins a new streaming transaction for the given collections, then returns a +`Transaction` instance for the transaction. + +**Arguments** + +- **collections**: `Object` + + An object with the following properties: + + - **read**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + read from during the transaction. + + - **write**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. + + If ArangoDB is using the RocksDB storage engine, write access to the + collections will be shared, i.e. other writes to the collections may run in + parallel. + + If ArangoDB is using the MMFiles engine, this option is synonymous with + _collections.exclusive_, i.e. no other writes will run in parallel. + + - **exclusive**: `Array | string | Collection` (optional) + + An array of names (or a single name) of collections, or an array of + `Collection` instances (or a single `Collection` instance), that will be + written to or read from during the transaction. Write access will be + exclusive to the collection, i.e. no other writes will be run in parallel. + +- **options**: `Object` (optional) + + An object with the following properties: + + - **lockTimeout**: `number` (optional) + + Determines how long the database will wait while attempting to gain locks on + collections used by the transaction before timing out. + + - **waitForSync**: `boolean` (optional) + + Determines whether to force the transaction to write all data to disk before returning. + + - **maxTransactionSize**: `number` (optional) + + Determines the transaction size limit in bytes. Honored by the RocksDB storage engine only. + + - **intermediateCommitCount**: `number` (optional) + + Determines the maximum number of operations after which an intermediate commit is + performed automatically. Honored by the RocksDB storage engine only. + + - **intermediateCommitSize**: `number` (optional) + + Determine the maximum total size of operations after which an intermediate commit is + performed automatically. Honored by the RocksDB storage engine only. + +If _collections_ is an array, string or `Collection`, it will be treated as +_collections.write_. + +**Examples** + +```js +const vertices = db.collection("vertices"); +const edges = db.collection("edges"); +const trx = await db.beginTransaction({ + read: ["vertices"], + write: [edges] // collection instances can be passed directly +}); +const start = await trx.run(() => vertices.document("a")); +const end = await trx.run(() => vertices.document("b")); +await trx.run(() => edges.save({ _from: start._id, _to: end._id })); +await trx.commit(); +``` + +## transaction.exists + +`async transaction.exists(): boolean` + +Checks whether the transaction exists. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.exists(); +// result indicates whether the transaction exists +``` + +## transaction.get + +`async transaction.get(): Object` + +Retrieves general information about the transaction. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.get(); +// result indicates the transaction id and status +``` + +## transaction.commit + +`async transaction.commit(): Object` + +Attempts to commit the transaction to the database, then returns an object +indicating the transaction's id and updated status. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.commit(); +// result indicates the transaction id and updated status +``` + +## transaction.abort + +`async transaction.abort(): Object` + +Attempts to abort the transaction in the database, then returns an object +indicating the transaction's id and updated status. + +**Examples** + +```js +const db = new Database(); +const transaction = db.transaction("some-transaction"); +const result = await transaction.abort(); +// result indicates the transaction id and updated status +``` + +## transaction.run + +`async transaction.run(fn): any` + +Executes the given function locally within the transaction and returns a promise +for its result. + +**Arguments** + +- **fn**: `Function` + + A function to be executed locally as part of the transaction. + + {% hint 'warning' %} + If the given function contains asynchronous logic, only the synchronous part + of the function will be run in the transaction. E.g. when using async/await + only the code up to the first await will run in the transaction. + Pay attention to the examples below. + {% endhint %} + +Unlike _executeTransaction_, functions passed to _run_ will be executed locally +on the client, not on the server. + +**Examples** + +```js +const col1 = db.collection(name1); +const col2 = db.collection(name2); +const trx = await db.beginTransaction(collections); + +// The following code will run in the transaction +const meta1 = await trx.run(() => col1.save({ data: "doc1" })); +const meta2 = await trx.run(() => col1.save({ data: "doc2" })); + +// Results from preceding actions can be used normally +await trx.run(() => + col2.save({ _from: meta1._id, to: meta2._id, data: "edge1" }) +); + +// Promise.all can be used to run multiple actions in parallel +await Promise.all([ + trx.run(() => col2.save({ _from: meta1._id, _to: meta2._id, data: "edge2" })), + trx.run(() => col2.save({ _from: meta1._id, _to: meta2._id, data: "edge3" })) +]); +await trx.run(() => + Promise.all([ + col2.save({ _from: meta1._id, _to: meta2._id, data: "edge4" }), + col2.save({ _from: meta1._id, _to: meta2._id, data: "edge5" }) + ]) +); + +// DANGER! The following examples demonstrate common mistakes! + +await trx.run(async () => { + // The first line runs in the transaction + await col1.save({ data: "doc3" }); + // The next line will run outside the transaction because it comes + // after the first await and is executed asynchronously! + await col1.save({ data: "doc4" }); +}); + +await trx.run(() => + // The first line runs in the transaction + col1 + .save({ data: "doc5" }) + // The next line will run outside the transaction because + // it is executed in an asynchronous callback! + .then(() => col1.save({ data: "doc6" })) +); + +// While not an error, wrapping synchronous methods in "run" is unnecessary. +await trx.run(() => db.collection(name1)); + +await trx.run(() => { + // This method returns a promise but we forget to return it. Note that the + // request will still be executed, we just don't know when/if it completed. + col1.save({ data: "doc7" }); +}); + +// Remember to always wait for all actions to resolve before committing. +// The following line is missing the "await" and creates a race condition. +trx.run(() => col1.save({ data: "doc8" })); + +// All actions run as part of a stream transaction will only take effect if +// the transaction is committed. Make sure to always call "commit" or "abort". +await trx.commit(); +``` diff --git a/3.6/drivers/js-reference-view.md b/3.6/drivers/js-reference-view.md new file mode 100644 index 0000000000..65b8b8597d --- /dev/null +++ b/3.6/drivers/js-reference-view.md @@ -0,0 +1,159 @@ +--- +layout: default +description: These functions implement the HTTP API for manipulating views +--- + +# View API + +These functions implement the +[HTTP API for manipulating views](../http/views.html). + +{% hint 'info' %} +Views were introduced in ArangoDB 3.4 and are not supported by earlier versions +of ArangoDB. +{% endhint %} + +## view.exists + +`async view.exists(): boolean` + +Checks whether the view exists. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.exists(); +// result indicates whether the view exists +``` + +### view.get + +`async view.get(): Object` + +Retrieves general information about the view. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const data = await view.get(); +// data contains general information about the view +``` + +### view.properties + +`async view.properties(): Object` + +Retrieves the view's properties. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const data = await view.properties(); +// data contains the view's properties +``` + +## view.create + +`async view.create([properties]): Object` + +Creates a view with the given _properties_ for this view's name, +then returns the server response. + +**Arguments** + +- **properties**: `Object` (optional) + + For more information on the _properties_ object, see the + [HTTP API documentation for creating views](../http/views-arango-search.html). + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("potatoes"); +await view.create(); +// the arangosearch view "potatoes" now exists +``` + +## view.setProperties + +`async view.setProperties(properties): Object` + +Updates the properties of the view. + +**Arguments** + +- **properties**: `Object` + + For information on the _properties_ argument see the + [HTTP API for modifying views](../http/views-arango-search.html). + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.setProperties({ consolidationIntervalMsec: 123 }); +assert.equal(result.consolidationIntervalMsec, 123); +``` + +## view.replaceProperties + +`async view.replaceProperties(properties): Object` + +Replaces the properties of the view. + +**Arguments** + +- **properties**: `Object` + + For information on the _properties_ argument see the + [HTTP API for modifying views](../http/views-arango-search.html). + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.replaceProperties({ consolidationIntervalMsec: 234 }); +assert.equal(result.consolidationIntervalMsec, 234); +``` + +## view.rename + +`async view.rename(name): Object` + +Renames the view. The _View_ instance will automatically update its +name when the rename succeeds. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +const result = await view.rename("new-view-name"); +assert.equal(result.name, "new-view-name"); +assert.equal(view.name, result.name); +// result contains additional information about the view +``` + +## view.drop + +`async view.drop(): Object` + +Deletes the view from the database. + +**Examples** + +```js +const db = new Database(); +const view = db.arangoSearchView("some-view"); +await view.drop(); +// the view "some-view" no longer exists +``` diff --git a/3.6/drivers/js-reference.md b/3.6/drivers/js-reference.md index b14f0eea14..4bdabfb7c8 100644 --- a/3.6/drivers/js-reference.md +++ b/3.6/drivers/js-reference.md @@ -12,6 +12,7 @@ layout: default - [AQL User Functions](js-reference-database-aql-user-functions.html) - [Transactions](js-reference-database-transactions.html) - [Graph Access](js-reference-database-graph-access.html) + - [Analyzer Access](js-reference-database-analyzer-access.html) - [Foxx Services](js-reference-database-foxx-services.html) - [HTTP Routes](js-reference-database-http-routes.html) - [Collection](js-reference-collection.html) @@ -23,7 +24,8 @@ layout: default - [Simple Queries](js-reference-collection-simple-queries.html) - [Bulk Import](js-reference-collection-bulk-import.html) - [AQL Helpers](js-reference-aql.html) -- [View Manipulation](js-reference-view-manipulation.html) +- [View](js-reference-view.html) +- [Analyzer](js-reference-analyzer.html) - [Cursor](js-reference-cursor.html) - [Graph](js-reference-graph.html) - [Vertices](js-reference-graph-vertices.html) diff --git a/3.6/drivers/spring-data-getting-started.md b/3.6/drivers/spring-data-getting-started.md index cb9baa922d..27c3952de9 100644 --- a/3.6/drivers/spring-data-getting-started.md +++ b/3.6/drivers/spring-data-getting-started.md @@ -7,11 +7,11 @@ description: Spring Data ArangoDB requires ArangoDB 3 ## Supported versions -| Spring Data ArangoDB | Spring Data | ArangoDB | -| -------------------- | ----------- | ----------- | -| 1.3.x | 1.13.x | 3.0\*, 3.1+ | -| 2.3.x | 2.0.x | 3.0\*, 3.1+ | -| 3.0.x | 2.0.x | 3.0\*, 3.1+ | +| Spring Data ArangoDB | Spring Data | ArangoDB | +| -------------------- | ----------- | ---------------------- | +| 1.3.x | 1.13.x | 3.0\*, 3.1+ | +| 2.x.x | 2.x.x | 3.0.x, 3.1+ | +| 3.x.x | 2.x.x | 3.3.x, 3.4.x, 3.5.x | Spring Data ArangoDB requires ArangoDB 3.0 or higher - which you can download [here](https://www.arangodb.com/download/){:target="_blank"} - and Java 8 or higher. diff --git a/_data/3.5-drivers.yml b/_data/3.5-drivers.yml index b763393527..be230500e5 100644 --- a/_data/3.5-drivers.yml +++ b/_data/3.5-drivers.yml @@ -26,6 +26,8 @@ href: java-reference-database-aql-user-functions.html - text: Transactions href: java-reference-database-transactions.html + - text: Stream Transactions + href: java-reference-database-stream-transactions.html - text: Graph Access href: java-reference-database-graph-access.html - text: HTTP Routes @@ -48,6 +50,8 @@ href: java-reference-view-view-manipulation.html - text: ArangoSearch Views href: java-reference-view-arangosearch.html + - text: Analyzers + href: java-reference-view-analyzers.html - text: Cursor href: java-reference-cursor.html - text: Graph @@ -82,6 +86,8 @@ href: js-reference-database-collection-access.html - text: View Access href: js-reference-database-view-access.html + - text: Analyzer Access + href: js-reference-database-analyzer-access.html - text: Queries href: js-reference-database-queries.html - text: AQL User Functions @@ -113,8 +119,13 @@ href: js-reference-collection-bulk-import.html - text: AQL Helpers href: js-reference-aql.html - - text: View Manipulation - href: js-reference-view-manipulation.html + - text: Views + href: js-reference-view.html + children: + - text: View Manipulation + href: js-reference-view-manipulation.html + - text: Analyzers + href: js-reference-analyzer.html - text: Cursor href: js-reference-cursor.html - text: Graph diff --git a/_data/3.5-manual.yml b/_data/3.5-manual.yml index c5e52248fa..1ddb80c542 100644 --- a/_data/3.5-manual.yml +++ b/_data/3.5-manual.yml @@ -607,6 +607,10 @@ href: deployment-kubernetes-dashboards.html - text: Deployment Resource Reference href: deployment-kubernetes-deployment-resource.html + - text: Backup Resource + href: deployment-kubernetes-backup-resource.html + - text: BackupPolicy Resource + href: deployment-kubernetes-backup-policy-resource.html - text: Driver Configuration href: deployment-kubernetes-driver-configuration.html - text: Helm diff --git a/_data/3.6-drivers.yml b/_data/3.6-drivers.yml index b763393527..be230500e5 100644 --- a/_data/3.6-drivers.yml +++ b/_data/3.6-drivers.yml @@ -26,6 +26,8 @@ href: java-reference-database-aql-user-functions.html - text: Transactions href: java-reference-database-transactions.html + - text: Stream Transactions + href: java-reference-database-stream-transactions.html - text: Graph Access href: java-reference-database-graph-access.html - text: HTTP Routes @@ -48,6 +50,8 @@ href: java-reference-view-view-manipulation.html - text: ArangoSearch Views href: java-reference-view-arangosearch.html + - text: Analyzers + href: java-reference-view-analyzers.html - text: Cursor href: java-reference-cursor.html - text: Graph @@ -82,6 +86,8 @@ href: js-reference-database-collection-access.html - text: View Access href: js-reference-database-view-access.html + - text: Analyzer Access + href: js-reference-database-analyzer-access.html - text: Queries href: js-reference-database-queries.html - text: AQL User Functions @@ -113,8 +119,13 @@ href: js-reference-collection-bulk-import.html - text: AQL Helpers href: js-reference-aql.html - - text: View Manipulation - href: js-reference-view-manipulation.html + - text: Views + href: js-reference-view.html + children: + - text: View Manipulation + href: js-reference-view-manipulation.html + - text: Analyzers + href: js-reference-analyzer.html - text: Cursor href: js-reference-cursor.html - text: Graph diff --git a/_data/3.6-manual.yml b/_data/3.6-manual.yml index ec5dd90c82..be074239d4 100644 --- a/_data/3.6-manual.yml +++ b/_data/3.6-manual.yml @@ -605,6 +605,10 @@ href: deployment-kubernetes-dashboards.html - text: Deployment Resource Reference href: deployment-kubernetes-deployment-resource.html + - text: Backup Resource + href: deployment-kubernetes-backup-resource.html + - text: BackupPolicy Resource + href: deployment-kubernetes-backup-policy-resource.html - text: Driver Configuration href: deployment-kubernetes-driver-configuration.html - text: Helm