Arganzheng's Blog

stay hungry, stay foolish

Titan的pluggable storage backend

如何实现一个Titan storage backend primary backend storage 主要实现类在 com.thinkaurelius.titan.diskstorage 下。 Titan根据后端不同的存储类型,定义了相应的接口: KeyColumnValueStore(I): Interface to a data store that has a BigTable like representation of its data. BaseKeyColumnValueAdapter(C) OrderedKeyValueStoreAdapter(C): Wraps a Ord...

DynamoDB学习笔记

数据模型 不同于Cassandra的Column family数据模型,DynamoDB的数据模型非常类似于传统的关系型数据: Tables: 类似于数据库中的table Items: 记录,类似于数据库的row Attributes: 属性,类似于数据库的column 说明 1、跟传统的RDB不同,DynamoDB是schema-less的,不需要预定义表结构,同一个表中的记录结构也不需要完全一致(但是必须包含主键属性)。 Except for the required primary key, a DynamoDB table is schemaless, which means that neither the attribut...

neo4j如何批量导入JSON数据

neo4j提供了如下批量导入工具: 通过neo4j-admin import命令可以将数据从 CSV 文件批量导入到未使用的数据库。load data into a previously unused database. 通过[LOAD CSV](https://neo4j.com/docs/developer-manual/3.2/cypher/clauses/load-csv/)语句 import small to medium-sized CSV files into an existing database. CSV数据格式参见: 10.2.2. CSV file header format。 ➜ Data head company.cs...

Aerospike学习笔记

架构 分为三层: Client Layer Distribution Layer Cluster Management Module Data Migration Module Transaction Processing Module Sync/Async Replication Proxy Duplicate Resolution Data Storage Layer enhanced key-value store with a schemaless ...

数据模型和存储系统

数据模型维度 Key-Value Stores Redis Riak(Bitcask) LevelDB RocksDB LMDB Aerospike(个人感觉这个更像是RDB) HyperLevelDB HyperDex: (Sorted) Column-family Stores HBase Cassandra Document-oriented Databases MongoDB ElasticSearch Tabular ...

Titan使用过程CPU超高问题排查

今天灵聪这边在把数据灌入到Titan发现,Titan-Server速度非常慢,而且灌到1w多条的时候系统基本不响应了。整个过程Titan server的进程使用CPU非常高,一直徘徊在2000%左右。 这其实是一个很常见的问题。思路很简单,找出哪个java线程占用了大量的CPU,查清楚耗时在哪里,依次解决就可以了。 首先找到titan server的进程号,整个用top或者ps或者jps就可以简单快速的找到。 然后查看其子线程的CPU信息: $ top -H -p 32763 top - 15:44:32 up 91 days, 20:14, 7 users, load average: 10.81, 10.77, 7.66 Tasks: 87 to...

Titan如何提供REST服务

默认Titan是作为一个jar包依赖,本地调用。但是通过Titan Server可以提供远程服务。 Titan使用了Gremlin Server引擎作为服务器来提供服务,默认配置是使用WebSockets,但是我们可以配置成其他协议或者自己扩展实现。 下面是如何配置Titan Server,让其提供HTTP REST API: 1、If you’re starting from the titan-1.0.0-hadoop1.zip, I’d suggest making a copy of conf/gremlin-server/gremlin-server.yaml into conf/rest-gremlin-server.yaml. Also, cop...

ArangoDB的索引学习

ArangoDB索引概览 ArangoDB内建了很多索引结构,用于解决不同的应用场景(个人感觉有点过多了。。) Primary Index: 主键索引: _id, _key unsorted hash index 内存索引 Edge Index 边索引:_from, _to hash index 内存索引 Hash Index: 精确查询 unique hash index unique, sparse hash index non unique hash index ...

neo4j学习笔记

一、图模型——Labeled Property Graph Model A labeled property graph is made up of nodes, relationships, properties, and labels. Nodes contain properties. Think of nodes as documents that store properties in the form of arbitrary key-value pairs. In Neo4j, the keys are strings and the values are the Java string and primitive data types, ...

Kafka offset lag监控

利用NOAH的自定义脚本监控功能,写了一个脚本监控kafka的consumer offset lag,如果大于10000就报警。 脚本如下: #!/bin/bash old_IFS=$IFS IFS=$'\n' # get all the consumer group of kafka group_list=`/home/work/kafka/bin/kafka-consumer-groups.sh --bootstrap-server localhost:8092 --list` for group in $group_list; do # get the offset lag of each group group_info=`/home/work/...

×