secondary/

directory
v0.0.0-...-b800c40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2017 License: Apache-2.0

README

Secondary Index Repository

All production secondary index related components (code, design, documentation) live here.

###Setup and Build Instructions

$ mkdir -p $GOPATH/src/github.com/couchbase
$ cd $GOPATH/src/github.com/couchbase
$ git clone git@github.com:couchbase/indexing.git
$ cd indexing/secondary
$ go get -d -v ./...
$ ./build.sh

Note: Following dependencies need to be installed beforehand:

If build is successful, indexing/secondary/bin will have the binaries for projector and indexer.

####Starting Projector

Projector can be started with below command line options:

bin > ./projector
Usage : ./projector [OPTIONS] <cluster-addr> 
  -adminport="localhost:9999": adminport address
  -loglevel=debug: choose logging level
  -kvaddrs="127.0.0.1:12000": comma separated list of kvaddrs

E.g. projector can be started in trace mode against Couchbase server running with cluster_run mode with the command:

./projector -trace localhost:9000

Projector has a sample test program which can be run using:

go run tools/datapath.go

####Starting Indexer

Projector can be started with below command line options:

bin > ./indexer -h
Usage of ./indexer:
  -loglevel=info|debug|trace
  -projector="http://localhost:9999": Projector Admin Port Address
  -vbuckets=1024: Number of vbuckets configured in Couchbase

E,g. indexer can be started for 8 vbuckets and log level of Info with the below command:

./indexer -vbuckets 8 -log 1

Currently the only entry point for Indexer is tuqtng command line shell. Follow the instructions for setting up the tuqtng project:

https://github.com/couchbaselabs/tuqtng#developers

Instead of the master branch, index-preview branch needs to be built. Rest of the instructions remain the same.

And on the cbq shell, creating an index of type "forestdb" will allocate a new index in the Indexer:

cbq> create index idx1 on default(field1) using forestdb;

Directories

Path Synopsis
Package adminport provides admin-port client/server library that can be used by system components to talk with each other.
Package adminport provides admin-port client/server library that can be used by system components to talk with each other.
cmd
Package collatejson supplies Encoding and Decoding function to transform JSON text into binary representation without loosing information.
Package collatejson supplies Encoding and Decoding function to transform JSON text into binary representation without loosing information.
@author Couchbase <info@couchbase.com> @copyright 2015 Couchbase, Inc.
@author Couchbase <info@couchbase.com> @copyright 2015 Couchbase, Inc.
json
Package json implements encoding and decoding of JSON as defined in RFC 4627.
Package json implements encoding and decoding of JSON as defined in RFC 4627.
dcp
Package couchbase provides a smart client for go.
Package couchbase provides a smart client for go.
examples/upr_bench
Tool receives raw events from dcp client.
Tool receives raw events from dcp client.
transport
Package transport is binary protocol packet formats and constants.
Package transport is binary protocol packet formats and constants.
transport/client
Package memcached provides a memcached binary protocol client.
Package memcached provides a memcached binary protocol client.
transport/debug
Package mcdebug provides memcached client op statistics via expvar.
Package mcdebug provides memcached client op statistics via expvar.
transport/server
Package memcached provides useful functions for building your own memcached server.
Package memcached provides useful functions for building your own memcached server.
fdb
ForestDB bindings for go
ForestDB bindings for go
@author Couchbase <info@couchbase.com> @copyright 2015 Couchbase, Inc.
@author Couchbase <info@couchbase.com> @copyright 2015 Couchbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package natsort provides an implementation of the natural sorting algorithm.
Package natsort provides an implementation of the natural sorting algorithm.
protobuf
data
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
projector
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
query
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
tests
plasmatests
Copyright (c) 2017 Couchbase, Inc.
Copyright (c) 2017 Couchbase, Inc.
tools
fdb
ts
upr
Tool receives raw events from dcp-client.
Tool receives raw events from dcp-client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL