couchbase

Slower Insert Performance in Couchbase Cluster

橙三吉。 提交于 2019-12-13 02:16:55
问题 I am new to Couchbase. I was in the process of checking raw performance of INSERTs with various Couchbase setups (single node, 2-node, 5-node etc.) I am using VMs on Windows Azure to do my testing since I do not have enough hardware to test it on my servers. I am using the .NET client library provided by Couchbase to write my C# based test application that does record insertion in a loop. Also, I am not using any bulk insert options (if any exist!) Here are the results of inserts thus far:

Couchbase: possible reasons for 10x difference in cbs-pillowfight latency test, when running in a cluster mode

帅比萌擦擦* 提交于 2019-12-13 00:53:24
问题 So I've started a simple test, cbs-pillowfight -h localhost -b default -i 1 -I 10000 -T Got: [10717.252368] Run +---------+---------+---------+---------+ [ 20 - 29]us |## - 257 [ 30 - 39]us |# - 106 [ 40 - 49]us |###################### - 2173 [ 50 - 59]us |################ - 1539 [ 60 - 69]us |######################################## - 3809 [ 70 - 79]us |################ - 1601 [ 80 - 89]us |## - 254 [ 90 - 99]us |# - 101 [100 - 109]us | - 43 [110 - 119]us | - 17 [120 - 129]us | - 48 [130 -

Python Couchbase CFFI - `AssertionError: backend.__version__ == __version__[:3])`

一曲冷凌霜 提交于 2019-12-13 00:44:12
问题 Full error text: No module named couchbase._libcouchbase Traceback (most recent call last): File "app_main.py", line 75, in run_toplevel File "runtests.py", line 12, in <module> mod = __import__(t, globals(), locals(), ['suite']) File "/home/travis/build/ardydedase/pycouchbase/tests/test_pycouchbase.py", line 15, in <module> from pycouchbase.utils import * File "/home/travis/build/ardydedase/pycouchbase/pycouchbase/__init__.py", line 11, in <module> import couchbase_ffi as couchase File "

Restoring data to couchbase due to fresh couchbase installation

有些话、适合烂在心里 提交于 2019-12-12 16:33:16
问题 We have a couchbase server that somehow had a fresh installation and all our data that was there is lost. I had managed to take the backup of /opt/couchbase/var/lib/couchbase/data/ … Now when i try to copy the data back it is not showing the couchbase server.Any help is appreciated. 来源: https://stackoverflow.com/questions/49644532/restoring-data-to-couchbase-due-to-fresh-couchbase-installation

Couchbase - return distinct values

二次信任 提交于 2019-12-12 15:24:16
问题 I have a list of small JSON documents in the format: { "name":"Kate", "event":"read" }, { "name":"Jon", "event":"delete" },... My map function is this: function(doc, meta){ emit(doc.event, null); } As a result I get a list of all events, including duplicates. How do I reduce the resultset to distinct values only? Thank you 回答1: This is the answer from the other question, modified to suit this question. I hope this helps someone! The reduce function: function(keys, values, rereduce) { return

How to insert a documents in bulk in Couchbase?

纵饮孤独 提交于 2019-12-12 14:47:12
问题 I didn't see any way to insert documents in bulk using Couchbase Python client. Any example of how to insert documents in bulk using REST api? 回答1: I am answering here for Couchbase only, as you probably know they are 2 different project with different features. The Python SDK does not have a way to bulk load the data. So to do that you can use: - the standard set/add methods - the cbdocloader command line tool that allows you to inject data from the file system into Couchbase Server see :

Couchbase document dates search - DateTime.Now()

荒凉一梦 提交于 2019-12-12 14:07:34
问题 I have a document in CB which has two dates, a start date and an end date. Let's say, a product's price discount. 10% off starting from today and ends next Friday. How can I get all the documents from CB which have a valid discount today? I made a view and have the following in it: var dt = new Date(); Which gets today's date. Then I can do a simple if(doc.FromDate < dt && doc.ToDate > dt){ emit([ ..... ]); This filters the documents how I want. But... Question Is this a good approach re view

ElasticSearch - Using FilterBuilders

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 07:36:19
问题 I am new to ElasticSearch and Couchbase. I am building a sample Java application to learn more about ElasticSearch and Couchbase. Reading the ElasticSearch Java API, Filters are better used in cases where sort on score is not necessary and for caching. I still haven't figured out how to use FilterBuilders and have following questions: Can FilterBuilders be used alone to search? Or Do they always have to be used with a Query ? ( If true, can someone please list an example? ) Going through a

Setting Couchbase obsPollInterval & obsPollMax in .NET client

拜拜、爱过 提交于 2019-12-12 05:59:20
问题 In Couchbase Java client there are obsPollInterval & obsPollMax parameters that can be set on the client. How do I set the equivalent in .NET client? obsPollInterval & obsPollMax 回答1: Not exactly, the two clients have slightly different implementations. The closest thing would be the ObserveTimeout configuration value which defaults to 1 minute and internally the observe will happen every 500ms until either the timeout is reached or operation succeeds. More information regarding

How to perform Update and Delete operations in a bucket using Couchbase and Nodejs sdk

有些话、适合烂在心里 提交于 2019-12-12 05:01:41
问题 I am moving from mongodb to Couchbase using Node.js. I want to perform the CRUD operations. Insert(create) and Get are working fine, but when I want to perform Update and Delete getting some error messages (Here update purpose using 'upsert','replace' are used) like: TypeError: Cannot read property 'replace' of undefined Here is code: db.js // Instantiate Couchbase and Ottoman var couchbase=require('couchbase'); var ottoman=require('ottoman'); // Build my cluster object and open a new cluster