Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Browsing all 6262 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Redis源码解析――字典遍历

之前两篇博文讲解了字典库的基础,本文将讲解其遍历操作。之所以将遍历操作独立成一文来讲,是因为其中的内容和之前的基本操作还是有区别的。特别是高级遍历一节介绍的内容,充满了精妙设计的算法智慧。 迭代器遍历...

View Article


Redis源码剖析--基数统计hyperloglog

Redis中hyperloglog是用来做基数统计的,其优点是:在输入元素的数量或者体积非常非常大的时候,计算基数所需的空间总是固定的,并且是很小的。在Redis里面,每个Hyperloglog键只需要12Kb的大小就能计算接近2^64个不同元素的基数,但是hyperloglog只会根据输入元素来计算基数,而不会存储元素本身,所以不能像集合那样返回各个元素本身。 基数统计...

View Article


Image may be NSFW.
Clik here to view.

window下使用Redis Cluster部署Redis集群

日常的项目很多时候都需要用到缓存。redis算是一个比较好的选择。一般情况下做一个主从就可以满足一些比较小的项目需要。有些时候也需要用到集群。 使用时候可以先了解redis cluster的原理 http://www.cnblogs.com/foxmailed/p/3630875.html 一、环境 系统:windows7 redis版本:2.8 ruby环境 二、环境准备 1、ruby下载安装...

View Article

CouchDB Weekly News, December 8, 2016

Releases in the CouchDB Universe couchdb_connector 0.4.2 (Elixir) A connector for CouchDB with support for views and authentication. hapi-couchdb-login 0.2.1 CouchDB Login plugin for HapiJS. PouchDB...

View Article

Image may be NSFW.
Clik here to view.

Omni Labs Making the Most of Compose

Learn how startup Omni Labs uses Compose-hosted MongoDB and a combination of Node.js, React, and Spark python to help bootstrap their startup. We had the pleasure of meeting Vikram Tiwari, a...

View Article


Image may be NSFW.
Clik here to view.

Decouple Disks and Compute with DriveScale

I was pretty unsure of the value proposition from DriveScale in the weeks preceding Tech Field Day 12 . Maybe the reason is because I’m not a Hadoop expert by any means. They have a pretty interesting...

View Article

使用Spark SQL进行Cassandra Join (Java)

我们知道,Cassandra这种NoSQL数据库,天生无法执行join的操作。 但是如果你手上刚好有一个Spark集群,那么就方便很多了。我们可以 在Spark SQL之中进行join的操作 。 本文基于Spark 2.x 进行操作。2.0以后,我们不再需要单独的定义JavaSparkContext / SparkConf...

View Article

Image may be NSFW.
Clik here to view.

The 5-Minute Interview: Megan Kvamme, CEO at FactGem

ByRachel Howard, Community Curator | December 9, 2016 For this week’s 5-Minute Interview, I spoke with Megan Kvamme , CEO at FactGem . Megan and I caught up at GraphConnect San Francisco last October....

View Article


Image may be NSFW.
Clik here to view.

写一写redis的内存结构

用到redis的场景是非常多的,对于我来说,也是最熟悉的技术之一,今天来说说redis的内存结构. 用过redis的都清楚,常用的数据结构主要是五种:String,Hash,List,Set,Sorted Set. 但是其内部的存储结构,不是那么简单的....

View Article


Image may be NSFW.
Clik here to view.

Redis 中的事件循环

在目前的很多服务中,由于需要持续接受客户端或者用户的输入,所以需要一个事件循环来等待并处理外部事件,这篇文章主要会介绍 Redis 中的事件循环是如何处理事件的。 在文章中,我们会先从 Redis 的实现中分析事件是如何被处理的,然后用更具象化的方式了解服务中的不同模块是如何交流的。 aeEventLoop 在分析具体代码之前,先了解一下在事件处理中处于核心部分的 aeEventLoop...

View Article

HBase学习之五:HBase的RowKey设计原则

HBase是三维有序存储的,通过rowkey(行键),column key(column family和qualifier)和TimeStamp(时间戳)这个三个维度可以对HBase中的数据进行快速定位。 HBase中rowkey可以唯一标识一行记录,在HBase查询的时候,有以下几种方式: 通过get方式,指定rowkey获取唯一一条记录...

View Article

Setting Up Multi-Node Hadoop Cluster , just got easy !

In this blog,we are going to embark the journey of how to setup the Hadoop Multi-Node cluster on a distributed environment. So lets do not waste any time, and let’s get started. Here are steps you need...

View Article

Redis AOF 问题

目前线上的某几组 Redis Group 开启了 AOF 做数据持久化,使用了默认的 appendfsync 配置,即 everysec 。前段时间某次操作时,向某一个 Redis Master A 发起 slaveof 请求,导致这台机器上的 Redis Master A 和另外一个 Redis Master B 出现了服务不可用。 现象 两台 Redis...

View Article


Image may be NSFW.
Clik here to view.

Neo4j vs ElasticSearch & Full Text Search In Neo4j

Hello Graphistas, Are you missing this series ? Welcome back again in the series of Neo4j with Scala:wink: . Let’s start our journey again. Till now we have talked and learnt about the use of Neo4j...

View Article

Image may be NSFW.
Clik here to view.

Neo4j With Scala: Neo4j vs ElasticSearch

Welcome back again in the series of Neo4j with Scala. Let’s start our journey again. Till now we have talked and learnt about the use of Neo4j with Scala and how easily we can integrated both two...

View Article


Image may be NSFW.
Clik here to view.

基于 Redis 构建数据服务

本以为上次11天没更已经够慢,没想到这次有13天(捂脸。最近实在是业务忙,没了 刚开 订阅号时两三天码一篇的闲情逸致。 本篇的话题继续回到数据服务。 小说君之前写过一篇文章关于数据服务:「如何快速搭建数据服务」――这篇文章中,小说君主要着眼于应用层,介绍了如何借助ORM,集成一个单机redis到项目中,顺便讲了下用mysql等持久db设施取代redis自带的比较挫的持久话机制。...

View Article

Image may be NSFW.
Clik here to view.

redis数据结构存储Linked List设计细节(redis的设计与实现笔记)

redis里拥有一个灵活扩展且获取表头表尾复杂度为O(1)的双端列表,分为list和listNode2部分组成。 list: 1 typedef struct list {//链表 2 listNode *head;//链表头 3 listNode *tail;//链表尾 4 void *(*dup)(void *ptr); //复制函数指针 5 void (*free)(void *ptr);...

View Article


Image may be NSFW.
Clik here to view.

redis数据结构存储Dict设计细节(redis的设计与实现笔记)

说到redis的Dict(字典),虽说算法上跟市面上一般的Dict实现没有什么区别,但是redis的Dict有2个特殊的地方那就是它的rehash(重新散列)和它的字典节点单向链表。 以下是dict用到的结构: typedef struct dictEntry {//字典的节点 void *key; union {//使用的联合体 void *val; uint64_t u64;//这两个参数很有用...

View Article

Image may be NSFW.
Clik here to view.

oozie+sqoop+hive 奇葩问题汇总

错误1:JA009: Unknown rpc kind in rpc headerRPC_WRITABLE 解决:如果采用hadoop2xx,oozie的war包打入了mr1系列的jar,去掉即可(就是拷贝hadoop相关包到libext里面的时候,把mapreduce1里面的jar拷贝进去了,查找带mr1的jar包去掉即可)...

View Article

Image may be NSFW.
Clik here to view.

HBase最佳实践-写性能优化策略

上一篇文章主要介绍了HBase读性能优化的基本套路,本篇文章来说道说道如何诊断HBase写数据的异常问题以及优化写性能。和读相比,HBase写数据流程倒是显得很简单:数据先顺序写入HLog,再写入对应的缓存Memstore,当Memstore中数据大小达到一定阈值(128M)之后,系统会异步将Memstore中数据flush到HDFS形成小文件。...

View Article
Browsing all 6262 articles
Browse latest View live