Bundle org.nuxeo.elasticsearch.seqgen
Documentation
-
README.md
nuxeo-elasticsearch-seqgen
About
This project provides a sequence number generator based on Elasticsearch by contributing to the
sequencers
extension point of theUIDGeneratorService
.Why this module?
The Elasticsearch backend for the Nuxeo Audit service
ESAuditBackend
needs to generate sequence ids.It seems bad to use a SQL database just for handling these sequences: that's why this ES based implementation does exist.
How it works
The implementation is based on the Blog post "ElasticSearch::Sequence - a blazing fast ticket server".
Basically, it uses an index with a single entry where the revision number is used as current value of the sequence.
Using it
UIDGeneratorService service = Framework.getService(UIDGeneratorService.class); UIDSequencer seq = service.getSequencer(); // The previous call assumes the `uidgen` contribution is the default one, else you need to specify the sequencer name explicitely: // UIDSequencer seq = service.getSequencer("uidgen"); int number = seq.getNext(key);
Building
To build and run the tests, simply run the Maven build:
mvn clean install
-
Parent Documentation: README.md
nuxeo-elasticsearch
About
This project aims at providing Nuxeo bundles to integrate Elasticsearch with the Nuxeo Platform.
The idea is to index/query Nuxeo Documents to/from Elasticsearch.
Building
To build and run the tests, simply start the Maven build:
mvn clean install
Running tests
Using the embedded Elasticsearch
With the default
RestClient
:mvn -nsu test # -Dnuxeo.test.elasticsearch.client=RestClient is set by default
Or with the
TransportClient
mvn -nsu test -Dnuxeo.test.elasticsearch.client=TransportClient
Using an external Elasticsearch
- Start an Elasticsearch using docker:
docker run -p 9400:9200 -p 9600:9300 docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.3
2.a Run the test with
RestClient
:mvn -nsu test -Dnuxeo.test.elasticsearch.addressList=http://localhost:9400
2.b Or run the test with
TransportClient
:mvn -nsu test -Dnuxeo.test.elasticsearch.client=TransportClient -Dnuxeo.test.elasticsearch.clusterName=docker-cluster -Dnuxeo.test.elasticsearch.addressList=localhost:9600
Links
- Administration: http://doc.nuxeo.com/x/UBY5AQ
- Configuring mapping: http://doc.nuxeo.com/x/WxI5AQ
- Overview: http://doc.nuxeo.com/x/iYElAQ
- Open jira tikets
Resolution Order
You can influence this order by adding "require" tags in the component declaration, to make sure it is resolved after another component. It will also impact the order in which contributions are registered on their target extension point (see "Registration Order" on contributions).
Components
Maven Artifact
File | nuxeo-elasticsearch-seqgen-2021.58.6.jar |
---|---|
Group Id | org.nuxeo.elasticsearch |
Artifact Id | nuxeo-elasticsearch-seqgen |
Version | 2021.58.6 |
Manifest
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: root
Build-Jdk: 11.0.23
Bundle-ManifestVersion: 1
Bundle-Version: 1.0.0
Bundle-Name: ElasticSearch Sequence Generator
Bundle-SymbolicName: org.nuxeo.elasticsearch.seqgen;singleton:=true
Nuxeo-Component: OSGI-INF/elasticsearch-uidgen-sequencer-contrib.xml
Exports
- Json Export Default Json serialization
- Json Graph Json dependency graph
- Json Contribution Stats Json statistics for contributions
- CSV Contribution Stats CSV statistics for contributions
Charts
-
Raw Data: Json Contribution Stats