Create IntelliJ project

Change-Id: I245642268cab556f2e00757b70e8559151edc3f2
Reviewed-on: http://review.couchbase.org/27627
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reformat all code

Cleanup broken whitespace changes.

Change-Id: I40700b6f369a54a62699341db0e6439bd76c40d3
Reviewed-on: http://review.couchbase.org/27628
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Fix warnings reported by IntelliJ

Fixup various warnings reported by running analyze from
IntelliJ.

Change-Id: I9bca5f7950d04c64ac6c71aa416eb7e6bd056433
Reviewed-on: http://review.couchbase.org/27629
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Fixup more warnings reported by IntelliJ

Change-Id: I210f7dc679c7d9ebbb6c07f2f662934010fda3e6
Reviewed-on: http://review.couchbase.org/27676
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Refactor Getopt class

Fixup some warnings from IntelliJ

Change-Id: Ib05f366fd5e9b1a11713902eda45121038cace08
Reviewed-on: http://review.couchbase.org/27677
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
IntelliJ fixups

This removes the majority of the warnings reported by analyze
in IntelliJ

Change-Id: I0b4692e53e67eede50628399e218fa058f3410a5
Reviewed-on: http://review.couchbase.org/27679
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Don't use System.out from tests

Change-Id: I9bda97d0262945d65cd6c66f0ba9ca179216a60c
Reviewed-on: http://review.couchbase.org/27705
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Fix test failures on Mac OS X

By default Mac OS X doesn't allow the process to use a lot of
file descriptors, so lets use fewer in the test case on these
limited os's..

Change-Id: I3627a0463aa634af9dca36ec1892e4e2e349a08c
Reviewed-on: http://review.couchbase.org/27706
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Add support for stats uuid

Change-Id: I3773916af7baf59b73cea07dfb50ef2aa68231f1
Reviewed-on: http://review.couchbase.org/27708
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Refactor HarakiriMonitor into its own package

Change-Id: I5f74d33bfa36e351c32fbe869bef13cc6367201f
Reviewed-on: http://review.couchbase.org/27117
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Implement GETL and UNL

Change-Id: Ifde96afbd760f59d6f01b57ee5f26f0eb42013ab
Reviewed-on: http://review.couchbase.org/27118
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
New JSON harakiri protocol

This defines a new simple JSON protocol for harakiri. This allows
commands to be sent as JSON and to receive appropriate responses. The
protocol is not "streaming" per se as JSON objects are still delimited
via newlines, however it should be simple enough to extract the
responses.

See http://www.couchbase.com/wiki/display/couchbase/CouchbaseMock
and subpages for more information on the specs of this protocol.

Change-Id: Ibbfa2b356804f0b40ff8b1b2ad89c05b04bbe903
Reviewed-on: http://review.couchbase.org/27120
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fixup typo in class name

Change-Id: Ie910f0e42446771a448e3e0260f8bc1d218be563
Reviewed-on: http://review.couchbase.org/27728
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Don't compare bool value to false

Change-Id: Ia1c24f78d804cf6f2ab5d81555f356d3f1f54317
Reviewed-on: http://review.couchbase.org/27727
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Add more words to the dictionary

Change-Id: Ifeada5faba4b5563fe7f06da3930b88ce799fc37
Reviewed-on: http://review.couchbase.org/27726
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Update AUTHORS file

Change-Id: Ief6ad1fc08f0e45d97ccfba4711d9be764016a76
Reviewed-on: http://review.couchbase.org/27725
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Updated IntelliJ project files

Change-Id: I2aaced9b0f60b0254f51a98032c0c453cdcf555f
Reviewed-on: http://review.couchbase.org/27724
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Introduce "Replica", "Cache", and "Dist" semantics

Each node now has a "Cache" and "Disk" layer (though we don't actually
save anything to the disk, they exist as independent domains).

Each vBucket now has a configurable amount of replicas plus a master.

Change-Id: I3172bed02ac6d5635aa90d0200096c8465f966b2
Reviewed-on: http://review.couchbase.org/27711
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
implement GET_REPLICA

Change-Id: I7f836c9dfee1b09dbd3142f354af1e8047eed6fe
Reviewed-on: http://review.couchbase.org/27712
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Fix test failure on Mac OS X

The code returns an error if the requested vbuckets isn't a
power of two

Change-Id: Idd728478db0f66f244c278ef0718e7d167f94f57
Reviewed-on: http://review.couchbase.org/27739
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>