Cassandra Database(4) Kryo
Really useful document, I need to read them when I have time if I plan to deal with cassandra database.
http://www.datastax.com/documentation/cassandra/1.2/index.html?pagename=docs&version=1.2&file=index
1. Kryo Introduce
The latest version from the official website is 2.21. Adding to build.sbt
I only try a simple example for java HashMap
package com.sillycat.easycassandraserver.apps
import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.io.{Input, Output}
import java.util.{ HashMap => JMap }
object KryoDemoApp extends App{
//java HashMap
val maps = new JMap[String, Any]()
maps.put("productName", "iphone4s")
maps.put("price", 21.33)
val kryo = new Kryo
//transfer HashMap to bytes
val out1 = new Output(new Array[Byte](4096))
kryo.writeObject(out1, maps)
out1.close
val outputBytes1 = out1.toBytes
println("outputBytes1 of Map = " + outputBytes1)
//read the bytes back to HashMap
val in1 = new Input(outputBytes1)
val outputMap1 = kryo.readObject(in1,classOf[JMap[String, Any]])
in1.close
println("outputMap1 of Map = " + outputMap1)
}
The output should be as follow:
outputBytes1 of Map = [B@6581ed9e
outputMap1 of Map = {price=21.33, productName=iphone4s}
2. Chill
https://github.com/twitter/chill
That is a extensions for the KRYO.
…snip...
References:
http://www.datastax.com/documentation/cassandra/1.2/index.html?pagename=docs&version=1.2&file=index
Kryo
https://code.google.com/p/kryo/
http://blog.csdn.net/hengyunabc/article/details/7764509
Chill
https://github.com/twitter/chill
- 浏览: 2550975 次
- 性别:
- 来自: 成都
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
相关推荐
在这个项目"ignite-persistence-cassandra"中,我们看到如何配置Ignite以使用Cassandra作为持久化存储,并且采用了Kryo序列化程序来优化数据处理。 首先,让我们了解Apache Cassandra。Cassandra是一个开源的NoSQL...
Beginning Apache Cassandra Development takes you through the Apache Cassandra NoSQL database and how to build applications that leverage its capabilities. As Java, PHP, Python, and JavaScript are the ...
Apache Cassandra is the most commonly used NoSQL database written in Java and is renowned in the industry as the only NoSQL solution that can accommodate the complex requirements of today’s modern ...
Build, manage, and configure high-performing, reliable NoSQL database for your applications with Cassandra Key Features Write programs more efficiently using Cassandra's features with the help of ...
Cassandra is a distributed database that stands out thanks to its robust feature set and intuitive interface, while providing high availability and scalability of a distributed data store. This book ...
开发者可能在Kryo 2.17版本上进行工作,以确保高效地序列化和反序列化Cassandra中的数据,同时利用Cassandra Triggers来增强数据库的业务逻辑。这个开源项目提供了一个实用的框架,使开发者能够在保持Cassandra高...
The rising popularity of Apache Cassandra rests on its ability to handle very large data sets that include hundreds of terabytes -- and that's why this distributed database has been chosen by ...
2. **遵循JDBC规范**:Cassandra JDBC Driver严格遵循Java Database Connectivity (JDBC) API规范,使得熟悉JDBC的开发者能够轻松地将Cassandra集成到他们的Java应用中,利用已有的JDBC知识进行数据存取操作。...
2. **遵循 JDBC 规范**:该驱动程序按照 JDBC(Java Database Connectivity)规范设计,提供了一个标准化的接口,使得开发人员能够在不深入了解 Cassandra 本身的底层机制的情况下,使用熟悉的 JDBC 代码来操作 ...
The book is aimed at intermediate developers with an understanding of core database concepts and want to become a master implementing Cassandra for their application. Table of Contents Chapter 1. ...
4. 数据模型的发展,它强调了为Cassandra设计高效数据模型的重要性。 5. 组织相关数据的方式,例如创建带有复合主键的表,并利用UUIDs和时间戳进行数据操作。这涉及到数据模型设计时复合主键的结构、单列主键和复合...
4. **性能监控**:DevCenter能够监控Cassandra集群的性能指标,如读写速率、延迟、节点状态等,帮助用户识别潜在的问题并优化系统性能。 5. **版本控制**:通过DevCenter,用户可以跟踪和管理Cassandra模式的版本。...
在本文中,我们将深入探讨如何将Spring Boot框架与Cassandra数据库集成,并利用Java Persistence API (JPA) 进行数据操作。Spring Boot以其简洁的配置和开箱即用的特性,已经成为Java开发中的首选框架之一。而...
Cassandra详解 Cassandra是一款高度可扩展、最终一致性的分布式结构化键值存储系统,由Facebook的Avinash Lakshman(Dynamo的贡献者)和Prashant Malik共同创建。最初用于支持Facebook的收件箱搜索功能,后于2008年...
一个keyspace包含若干个CF,类似关系型数据库中一个database可以有多个table。 1.3 CAP理论 Cassandra遵循CAP理论,即一致性、可用性和分区容忍性三个指标。Cassandra采用了弱一致性模型, Sacrificing some ...
同时,它还支持更高效的压缩算法,如LZ4和Snappy,可以显著降低存储需求,提高数据传输速度。 在安全方面,Cassandra 3.11.3提供了更多的安全控制,包括SSL/TLS加密通信、认证和授权机制,以及对JMX接口的安全限制...
4. **功能特性**: - 自动化集群部署:Cassandra-Operator可以自动创建和配置Cassandra Pod,设置持久卷存储以确保数据持久化。 - 扩展与缩容:当需要增加或减少节点时,Operator可以自动处理,无需手动干预。 - ...