Questions tagged [couchbase-java-api]

The Couchbase Java SDK provides API to working with JSON documents using the Data, N1QL Query, Full-Text Search, Analytics Query and Views Queries available from Couchbase Server.

This Java native client library also has an RxJava based asynchronous API, has built in metrics exposed through an event bus API.

Resources:

172 questions
1
vote
0 answers

Large number of KV operations(insert, upsert) on a couchbase bucket leads to concurrent.timeout.Exception

I am trying to insert/upsert documents into couchbase database using Java JDK client 2.4.7 and couchbase server 5.0.1. The couchbase cluster is setup on AWS EC2 with 6 data nodes of type m4.2xLarge and two index/query nodes of type m4.xLarge. The…
Onkaar Singh
  • 10,187
  • 3
  • 14
  • 26
1
vote
1 answer

Is CouchbaseQueue by default thread safe?

Is CouchbaseQueue API in http://docs.couchbase.com/sdk-api/couchbase-java-client-2.5.5/com/couchbase/client/java/datastructures/collections/CouchbaseQueue.html 1 thread safe? Or can i achieve the similar behavior by Bucket.getAsync().queuePop()? I…
yami
  • 871
  • 1
  • 9
  • 14
1
vote
1 answer

Couchbase cluster - discover unavailable servers for Java SDK2

In Java SDK1, one can get addresses of unavailable nodes: CouchbaseClient couchbaseClient; //... Collection unAvailableServers = couchbaseClient.getUnavailableServers(); What is the equivalent in Java SDK2?
Ori Dar
  • 18,687
  • 5
  • 58
  • 72
1
vote
1 answer

Does couchbase persist data?

I am planning to store data into the couch-base cluster. I would like to know what will happen if my couch base goes down for the following scenarios: [Consider that there were no active transactions happening] A node goes down from the…
Apurv Nerlekar
  • 2,310
  • 1
  • 21
  • 29
1
vote
2 answers

Couchbase SDK cannot decode binary document

I am trying to fetch BinaryDocuments uploaded by cbworkloadgen from Couchbase 4.0.0-4051 Community Edition. Couchbase Java client version is 2.4.1. The exception given by decoder is - WARNING: Decoding of document with BinaryTranscoder failed.…
Pranav
  • 66
  • 5
1
vote
1 answer

How do I increase the N1QL index scan timeout?

As part of an ETL process, I am attempting to read all document key ids from a Couchbase bucket (Couchbase Enterprise 4.5). This bucket may have tens of millions of documents. To test this (at this stage I'm just trying to see if this approach will…
user65839
1
vote
1 answer

Couchbase Client Java SDK does not use another cluster node when first doesn't respond

So according to this page: http://developer.couchbase.com/documentation/server/current/sdk/java/start-using-sdk.html // Connects to a cluster on 10.0.0.1 and tries 10.0.0.2 // if the other one does not respond during bootstrap. Cluster cluster =…
1
vote
2 answers

Null values not persisted to Couchbase using spring-data-couchbase

When I try to persist @Document using CrudRepository, all null fields in the object does not get written to the database. Example (Object obj): { "field1": { "field11": 123 }, "field2": null, "field3":…
prettyvoid
  • 3,446
  • 6
  • 36
  • 60
1
vote
1 answer

Couchbase get from replica

I use couchbase 4.0.1 with Java SDK. This is my code: bucket.async() .get(key) .onErrorResumeNext(throwable -> { if (throwable instanceof TimeoutException) { return…
Ido Barash
  • 4,856
  • 11
  • 41
  • 78
1
vote
1 answer

Working with CRUD operations in Couchbase

I am novice User to Couchbase, I am trying to insert the documents into the default bucket like below. I found the following 2 ways to insert the json documents in the bucket: 1) Inserting by preparing JsonDocument and upsert into the bucket …
User
  • 173
  • 1
  • 12
1
vote
1 answer

Couchbase - deleting old documents based on TTL

I have a couchbase bucket which has a number of documents. Over a period of time , I see that these documents are rapidly taking up a lot of storage space. I am now working on setting TTL for all the new documents that will be stored. Is there way…
Punter Vicky
  • 15,954
  • 56
  • 188
  • 315
1
vote
1 answer

Do Couchbase reactive clients guarantee order of rows in view query result

I use Couchbase Java SDK 2.2.6 with Couchbase server 4.1. I query my view with the following code public List findDocuments(ViewQuery query, String bucketAlias, Class clazz) { // We specifically set reduce false and include docs to…
1
vote
3 answers

How can we update documents transactionally in couchbase?

I have a use case in which there are three documents and I want to update them transactionally i.e. if any of them fails then other too should not get updated in the database. I was looking for an option but didn't find one in JavaSDK. So is there…
1
vote
0 answers

Couchbase async data

I have written code to get async data from Couchbase views: This is the Implementation Class AsyncViewResult viewResult = offerCouchDao.findViewResultAsync(DDN, VIEWNAME).toBlocking().single(); if (viewResult.success()) { …
1
vote
2 answers

Couchbase N1QL Java SDK Pagination and Sorting issue

I have started using couchbase recently. I am using Spring-Data couchbase for inserting Java POJOs in Couchbase. Since, Pagination and Sorting is not supported by Spring Data Couchbase project, I have tried to use couchbase java client 2.2.0-dp2. I…
Pritish Shah
  • 611
  • 3
  • 11
  • 25