couchbase

Couchbase入门——环境搭建以及HelloWorld

烂漫一生 提交于 2020-04-07 13:34:45
一、引言 NoSQL(Not Only SQL),火了很久了,一直没空研究。最近手上一个项目对Cache有一定的要求,借此机会对NoSQL入门一下。支持NoSQL的数据库系统有很多, 比如Redis,MongoDB等。每种系统都有自己的优缺点,根据实际情况我们选用了Couchbase作为切入点学习。 这里 有几种数据库的比较: http://www.csdn.net/article/2013-04-15/2814886-nosql-benchmark Couchbase,是MemBase与couchDb这两个NoSQL数据库的合并的产物,是一个分布式的面向文档的NoSQL数据库管理系统,即拥有CouchDB的简单和可靠以及Memcached的高性能。(网上搜来的)。本文主要介绍CouchBase的环境搭建,并提供一个java控制台程序的helloworld例子(其实官网上都有的)。官网学习地址: http://docs.couchbase.com/ 二、准备工作 (1)下载Couchbase Server 2.5.1 http://www.couchbase.com/couchbase-server/overview (2)安装Couchbase2.5.1,并作相应配置;可参考: http://blog.csdn.net/qq415734794/article/details

How to log Spring-data queries to a Couchbase Database

最后都变了- 提交于 2020-02-25 08:08:26
问题 In my Spring-Boot app we have a Spring-Data repository connection to the Couchbase server. I know that when connecting to SQL server, one can see the actual queries sent to the DB by adding to the property file line such as this one (As mentioned here): logging.level.org.hibernate.SQL=DEBUG What should be the way to do it when using Couchbase? 回答1: Add logback as your dependency <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.3</version> <

Spring Data “TimeoutException” when calling delete documents (with pagination) in Couchbase

旧巷老猫 提交于 2020-02-25 04:30:31
问题 Our Spring Boot app is using a Couchbase DB and accessing it using Spring-Data To delete records from the bucket we created the following method in the repository: Slice<Dog> deleteAllByOwnerIdAndName(String ownerId, String name, Pageable pageable); We also have relevant index on the bucket: CREATE INDEX `dogs_by_ownerId_and_name_idx` ON `dogs`(`ownerId`,`name`) WHERE (`_class` = "com.example.Dog") Our code is using the pagination when trying to delete the elements: Slice<Dog> dogsSlice =

Spring Data “TimeoutException” when calling delete documents (with pagination) in Couchbase

北城以北 提交于 2020-02-25 04:26:18
问题 Our Spring Boot app is using a Couchbase DB and accessing it using Spring-Data To delete records from the bucket we created the following method in the repository: Slice<Dog> deleteAllByOwnerIdAndName(String ownerId, String name, Pageable pageable); We also have relevant index on the bucket: CREATE INDEX `dogs_by_ownerId_and_name_idx` ON `dogs`(`ownerId`,`name`) WHERE (`_class` = "com.example.Dog") Our code is using the pagination when trying to delete the elements: Slice<Dog> dogsSlice =

Couchbase 4010 Error

前提是你 提交于 2020-02-14 05:45:27
问题 I've been testing Couchbase 5 and created a bucket called fp-conversion-data which has some JSON data in it. I have been trying to run some simple queries such as: SELECT * FROM fp-conversion-data limit 5; Instead of getting the expected results, I keep getting this error: [ { "code": 4010, "msg": "FROM expression term must have a name or alias", "query_from_user": "SELECT * FROM fp-conversion-data limit 5;" } ] 回答1: I think the problem is that you have dashes in the name of the bucket. Use

Orleans 高级特性-目录

依然范特西╮ 提交于 2020-01-31 02:45:27
这里将介绍一些Orleans的高级特性,适合对Orleans已经有不少了解的用户,先列出一个索引,博客文章慢慢补充 1. 使用Immutable 优化复制 2.自定义序列化 (待完成) 3. 可重入 Grain &单线程执行模型 4. 定时器和提醒器 Timers and Reminders 5.扩展任务和Grains (待完成) 6.请求上下文 Request Context (待完成) 7.Grain实例垃圾回收 Activation Garbage Collection (待完成) 8.运行监控 Runtime Monitoring (待完成) 9.如何随silo的启动,执行自定义的启动任务 (待完成) 10.配置垃圾回收策略 (待完成) 以上文档是基于 https://github.com/dotnet/orleans/wiki/Advanced-Concepts 的翻译和整理,英文好的同学可直接去看。 翻译是为了部分英文阅读存在一定困难的同学,目前翻译是抽自己的空闲时间一点一点翻译,先列一个目录。翻译进行中… 我的几个关于orleans的开源项目,如果你觉得这个几个东西还不错,可以star一下,谢谢。 1.Orleans的couchbase storage provider https://github.com/weitaolee/Orleans.Storage

Couchbase parameterized N1QL query IN statement

末鹿安然 提交于 2020-01-24 20:06:03
问题 Using com.couchbase.client, java-client version 2.2.7 I have been unable to get a n1ql query working that uses an IN statement with multiple items see my example query and java code below public int getCountForDuration(Long startTime, Long endTime, String ids){ JsonObject placeHolders = JsonObject.create().put("ids", ids).put("startTime", startTime).put("endTime", endTime); N1qlQuery query = N1qlQuery.parameterized(COUNT_STATEMENT, placeHolders) N1qlQueryResult result = bucket.query(query); .

Couchbase parameterized N1QL query IN statement

元气小坏坏 提交于 2020-01-24 20:05:34
问题 Using com.couchbase.client, java-client version 2.2.7 I have been unable to get a n1ql query working that uses an IN statement with multiple items see my example query and java code below public int getCountForDuration(Long startTime, Long endTime, String ids){ JsonObject placeHolders = JsonObject.create().put("ids", ids).put("startTime", startTime).put("endTime", endTime); N1qlQuery query = N1qlQuery.parameterized(COUNT_STATEMENT, placeHolders) N1qlQueryResult result = bucket.query(query); .

EhCache instance with name 'play' already exists

时光总嘲笑我的痴心妄想 提交于 2020-01-23 12:34:10
问题 I faced the issue with the Play framework default cache ( EHCache ) when working with asynchronous couchdatabase java driver. Play crashes on the hot reload with the error: Error in custom provider, play.api.cache.EhCacheExistsException: An EhCache instance with name 'play' already exists. I found this could be not only with the couchdatabase driver but also in some other scenarios, like https://groups.google.com/forum/#!topic/pac4j-dev/2_EUOCrov7M. 回答1: I figure out a solution - force cache

CouchBase 1.8 and 2.0 Erlang SDKs? Why is Erlang Left out

戏子无情 提交于 2020-01-21 04:48:05
问题 I really enjoy seeing the great work being done by CouchBase team on providing us with a great NoSQL solution. However, despite the fact that there are few erlang Web developers compared to perhaps ruby, PHP, java or Python, the number of developers picking up erlang are increasing. Which brings me to why on their SDK page, they have constantly left out Erlang. With yaws web Server, Mochiweb, and many other Erlang Web libraries, why in the world would they not support Erlang in their NoSQL