Git Product home page Git Product logo

elasticsearch-transport-couchbase's Introduction

Couchbase Transport Plugin for ElasticSearch

For a pre-built binary package and instruction manual, see the Couchbase Product Page

This plugin makes your ElasticSearch node appear like a Couchbase Server node. After installation you can use the Cross-datacenter Replication (XDCR) feature of Couchbase Server 2.0 to transfer data continuously.

Installation

In order to install the plugin, download the zip file from the Downloads page, then run:

bin/plugin -install transport-couchbase \
-url http://packages.couchbase.com.s3.amazonaws.com/releases/elastic-search-adapter/1.3.0/elasticsearch-transport-couchbase-1.3.0.zip

Version Compatibility:

+------------------------------------------------------------------+
|  Plugin                       |  Couchbase    | ElasticSearch    |
+------------------------------------------------------------------+
| master                        |  3.x          | 1.3.0            |
+------------------------------------------------------------------+
| 1.3.0                         |  2.5.x        | 1.1.0            |
+------------------------------------------------------------------+
| 1.2.0                         |  2.2          | 0.90.5           |
+------------------------------------------------------------------+
| 1.1.0                         |  2.0          | 0.90.2           |
+------------------------------------------------------------------+
| 1.0.0-dp                      |  2.0 (beta)   | 0.19.9           |
+------------------------------------------------------------------+
| 1.0.0-beta                    |  2.0.0        | 0.20.2           |
+------------------------------------------------------------------+
| 1.0.0                         |  2.0.0        | 0.20.2           |
+------------------------------------------------------------------+

Configuration

  • couchbase.port - the port the plugin will listen on, default 9091
  • couchbase.username - the username for HTTP basic auth, default Administrator
  • couchbase.password - the password for HTTP basic auth, no default
  • couchbase.defaultDocumentType - the document type to store documents as, defaults to "couchbaseDocument"
  • couchbase.checkpointDocumentType - the document type to store replication checkpoint documents as defaults to "couchbaseCheckpoint"
  • couchbase.num_vbuckets - the number of vbuckets that ElasticSearch should pretent to have (default on Mac is 64, 1024 on all other platforms) This value MUST match the number of vbuckets on the source Couchbase cluster.
  • couchbase.maxConcurrentRequests - the number of concurrent requests that the plug-in will allow, default 1024 (lower this if the load on the machine gets too high)

Couchbase Document Expiration

If you use the document expiration feature of Couchbase Server to expire documents after a specified TTL, you must enable the corresponding feature in your ElasticSearch mapping. There is some cost associated with enabling this feature, so it is left disabled by default.

See this page in the ElasticSearch guide for more information about enabling this feature:

http://www.elasticsearch.org/guide/reference/mapping/ttl-field.html

Usage

Preparing ElasticSearch

  1. Install the plugin on each node in your cluster.
  2. Install the Couchbase template curl -XPUT http://localhost:9200/_template/couchbase -d @plugins/transport-couchbase/couchbase_template.json
  3. Create an ElasticSearch index to store the data from Couchbase (ie. default)

Preparing Couchbase

  1. Navigate to the Couchbase Server admin interface.
  2. Select the Replications tab.
  3. Press the button labeled "Create Cluster Reference"
  4. Choose a name for your ElasticSearch cluster
  5. In the IP/Hostname and field provide an address and port of one of the nodes in your ES cluster (127.0.0.1:9091)
  6. Enter the Username and Password corresponding to your "couchbase.username" and "couchbase.password" settings in ElasticSearch
  7. Press the "Save" button

Starting Data Transfer

  1. Press the button labeled "Create Replication"
  2. Select the bucket from source cluster you wish to send to ElasticSearch
  3. Next select the cluster you defined in step 4.
  4. Type in the name of the ElasticSearch index you wish to store the data in. This index must already exist.
  5. If you are using Couchbase Server 2.2 or later, click Advanced settings and change the XDCR Protocol setting to Version 1

Building

This module is built using maven. It depends on another project which is not in any public maven repositories, see https://github.com/couchbaselabs/couchbase-capi-server and run mvn install on that first.

Then in this project run

mvn package

The final plugin package will be in the target/releases folder.

elasticsearch-transport-couchbase's People

Contributors

mschoch avatar dadoonet avatar raf64flo avatar weilliu avatar

Watchers

James Cloos avatar Franklin Wise avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.