cassandra (1) What's new

来源:互联网 发布:两级放大电路实验数据 编辑:程序博客网 时间:2024/06/06 01:38

译文:

主要特点
卡桑德拉1.2引入了许多改进,这是本节简要描述。
•卡桑德拉1.2.2和更高版本基于支持CQL3的实现IAuthenticator和IAuthorizer使用这些安全功能,早一点进行了介绍:
•内部认证的基础上的卡桑德拉控制登录帐户和密码。
•对象权限管理使用的内部授权授予或撤销权限访问Cassandra的数据通过熟悉的关系数据库GRANT / REVOKE范式的。
•客户节点加密,保护数据从客户机在飞行中一个数据库集群也被发布在Cassandra 1.2。
•虚拟节点在此版本之前,卡桑德拉分配一个令牌,每个节点,每个节点拥有完全集群内的连续范围。虚拟节点改变这种模式从一个令牌和范围每节点每个节点的令。  这允许每个节点拥有大量的小范围分布在整个环,它具有一些重要的优点。
•洗牌工具使用虚拟节点的集群升级。
•Murmur3Partitioner这个新的的默认分区工具提供更快的的散列和改进的性能。
•更快的启动时间该版本提供了更快的开机/启动时间为集群中的每个节点,内部测试进行DataStax示出至少80%所需的时间来启动主索引。的启动实现更高效的采样和  索引加载到内存中缓存减少。通过消除需要扫描的分区索引的索引加载时间显着改善。
•磁盘故障的处理得到改进在以前的版本中,单个磁盘不可有可能使整个节点反应迟钝(虽然技术上还活着,群集的一部分)。 Memtables没有刷新和节点最终跑出内  存。如果该磁盘包含的commitlog,数据不能再被附加的commitlog。因此,推荐配置为RAID 10的顶部部署卡桑德拉,但是这导致在使用50%以上的磁盘空间。新的  磁盘管理解决了这些问题,并消除了需要的硬件建议中所描述的为RAID。
  •多个独立的平整压实平整压实的性能提高。 Cassandra的平整压实策略创建数据文件的一个固定的,分为级别的尺寸相对较小。
•配置和更频繁的墓碑驱逐墓碑被逐出更多的时候,卡桑德拉1.2自动和更易于管理。
配置墓碑驱逐,而不是手动进行压实可以节省用户的时间,
努力,和磁盘空间。
•支持并发模式改变支持并发模式改变:卡桑德拉1.1引入修改模式中的对象整个集群并行的方式,但没有编程支持,同时创造和删除表(永久或临时)。 1.2版包括这种支持,使多个用户可以添加/删除表,包括临时表,这种方式。有什么新9主要CQL功能CQL 3,这是卡桑德拉1.1 Beta格式预览,卡桑德拉1.2已经发布了。注:DataStax企业3.0.x的支持CQL 3 Beta格式。用户需要参考卡桑德拉1.1CQL信息文档。CQL 3现在的默认模式cqlsh。 CQL 3支持映射卡桑德拉存储引擎架构细胞更强大,更自然的行列表示得比较早CQL版本和二手API。 CQL3调换成熟悉的基于行的结果集,数据分区(有时也被称为“宽行”)大大简化数据建模。卡桑德拉1.2中的新功能包括:
•集合
收藏插入和操作数据,包括多个项目提供了更容易的方法
要存储在单个列,例如,多个电子邮件地址为一个单一的雇员。
有三种不同类型的集合:集合,列表和地图。常见的任务,需要建立一个
多个列或一个单独的表,现在可以通过直观地使用一个单一的集合。
•的CQL人/二进制协议
基于帧的运输为CQL 3设计是一个灵活的替代旧货API。要使用
新的二进制协议件,改变start_native_transport选项为true在cassandra.yaml文件。这些
开源驱动支持开源驱动支持的CQL二进制协议:
•DataStax的Java驱动程序和文档
•.NET / CSHARP驱动的
•查询分析/请求跟踪
此cqlsh功能包括高性能的诊断工具,旨在帮助您了解,
诊断和解决CQL语句发送到Cassandra集群。您可以询问
个别CQL报表在一个特设的方式,或进行全系统收集所有查询/
命令发送到群集。新node​​tool实用程序增加了概率跟踪收集所有
语句发送到数据库分离和调整资源最密集的报表。
•系统信息
通过查询,您可以轻松地检索有关群集的配置和数据库对象的详细信息
表中使用CQL系统密钥空间。
•原子批次
之前的版本允许卡桑德拉到一个单一的批量操作,将相关的更新
语句。如果一些批次副本失败操作过程中,协调会暗示那些
自动行。但是,如果协调本身在中间操作失败,你可能最终与
部分施加批次。在1.2版本中的卡桑德拉,保证批处理操作默认情况下,
是原子的,比早期版本中的数据库的处理方式不同。
•平面文件加载/导出实用程序
一个新的cqlsh实用程序,有利于进口和出口平面文件数据到/从Cassandra表。虽然
在Cassandra 1.1.3初步介绍,新的负载工具没有正式宣布,到现在为止。
该实用程序反映COPY命令从PostgreSQL的RDBMS。多种文件格式
逗号分隔值(CSV),制表符分隔的,多的支持,包括CSV是
默认值。
其他的CQL 3增强功能
卡桑德拉1.2引入了许多增强功能,除了CQL的关键功能。
•改变复制策略的新语句:ALTER密钥空间
•查询订购数据使用其他运营商,如> =
有什么新
10
•复合键和聚类
•复合分区键
•防范运行风险查询
•检索更多信息集群拓扑
•利用聚类为了提高查询效率
•轻松访问列时间戳
•改进的索引更新
•一个表可以由只有一个主键定义
•新INET数据类型
•新的语法设置复制策略使用的地图集合
•查询原有表的能力
•能力重命名CQL 3列
•一致的情况下,灵敏度规则密钥空间,表名和列名
•可配置的墓碑通过设置一个CQL表属性驱逐
其他变动
•支持传统的表
•选项用于启动cqlsh的在CQL 2模式
•CLI命令来查询CQL 3表
•设置压缩和压实的新语法
•新的压实子属性configuing的大小分层铲装过程
•更改默认的一致性水平,现在在驱动程序中,而不是CQL或使用cqlsh全球
•能力下降一列从表中暂时移除
•删除的WITH的一致性级别子句从CQL命令的。编程,你现在
在驱动程序中设置的一致性水平。在命令行中,你可以使用一个新的的cqlsh一致性
命令。
•卡桑德拉1.2.3中,CQL 3支持BLOB常量。
•卡桑德拉1.2.3,新功能将本地类型斑点和执行timeuuid转换。

文档原文:

Key features

Cassandra 1.2 introduced many improvements, which are described briefly in this section.

• Cassandra 1.2.2 and later support CQL3-based implementations of IAuthenticator and IAuthorizer for
use with these security features, which were introduced a little earlier:
• Internal authentication based on Cassandra-controlled login accounts and passwords.
• Object permission management using internal authorization to grant or revoke permissions for
accessing Cassandra data through the familiar relational database GRANT/REVOKE paradigm.
• Client-to-node-encryption that protects data in flight from client machines to a database cluster
was also released in Cassandra 1.2.
• Virtual nodes
Prior to this release, Cassandra assigned one token per node, and each node owned exactly one
contiguous range within the cluster. Virtual nodes change this paradigm from one token and range
per node to many tokens per node. This allows each node to own a large number of small ranges
distributed throughout the ring, which has a number of important advantages.
• The shuffle tool upgrades a cluster to use virtual nodes.
• Murmur3Partitioner
This new default partitioner provides faster hashing and improved performance.
• Faster startup times
The release provides faster startup/bootup times for each node in a cluster, with internal tests
performed at DataStax showing up to 80% less time needed to start primary indexes. The startup
reductions were realized through more efficient sampling and loading of indexes into memory caches.
The index load time is improved dramatically by eliminating the need to scan the partition index.
• Improved handling of disk failures
In previous versions, a single unavailable disk had the potential to make the whole node unresponsive
(while still technically alive and part of the cluster). Memtables were not flushed and the node
eventually ran out of memory. If the disk contained the commitlog, data could no longer be appended
to the commitlog. Thus, the recommended configuration was to deploy Cassandra on top of RAID 10,
but this resulted in using 50% more disk space. New disk management solves these problems and
eliminates the need for RAID as described in the hardware recommendations.
• Multiple independent leveled compactions
Increases the performance of leveled compaction. Cassandra's leveled compaction strategy creates
data files of a fixed, relatively small size that are grouped into levels.
• Configurable and more frequent tombstone eviction
Tombstones are evicted more often and automatically in Cassandra 1.2 and are easier to manage.
Configuring tombstone eviction instead of manually performing compaction can save users time,
effort, and disk space.
• Support for concurrent schema changes
Support for concurrent schema changes: Cassandra 1.1 introduced modifying schema objects in a
concurrent fashion across a cluster, but did not support programmatically and concurrently creating
and dropping tables (permanent or temporary). Version 1.2 includes this support, so multiple users
can add/drop tables, including temporary tables, in this way.
What's new
9
Key CQL features
CQL 3, which was previewed in Beta form in Cassandra 1.1, has been released in Cassandra 1.2.
Note:  DataStax Enterprise 3.0.x supports CQL 3 in Beta form. Users need to refer to Cassandra 1.1
documentation for CQL information.
CQL 3 is now the default mode for cqlsh. CQL 3 supports schema that map Cassandra storage engine
cells to a more powerful and natural row-column representation than earlier CQL versions and the Thrift
API. CQL3 transposes data partitions (sometimes called "wide rows") into familiar row-based resultsets,
dramatically simplifying data modeling. New features in Cassandra 1.2 include:
• Collections
Collections provide easier methods for inserting and manipulating data that consists of multiple items
that you want to store in a single column; for example, multiple email addresses for a single employee.
There are three different types of collections: set, list, and map. Common tasks that required creating a
multiple columns or a separate table can now be accomplished intuitively using a single collection.
• CQL native/binary protocol
The frame-based transport designed for CQL 3 is a flexible alternative to the Thrift API. To use the
new binary protocol, change the start_native_transport option to true in the cassandra.yaml file. These
open source drivers support open source drivers support the CQL binary protocol:
• DataStax Java Driver and  documentation
• .NET/csharp Driver
• Query profiling/request tracing
This cqlsh feature includes performance diagnostic utilities aimed at helping you understand,
diagnose, and troubleshoot CQL statements sent to a Cassandra cluster. You can interrogate
individual CQL statements in an ad-hoc manner, or perform a system-wide collection of all queries/
commands sent to a cluster. The new nodetool utility adds probabilistic tracing for collecting all
statements sent to a database to isolate and tune most resource intensive statements.
• System information
You can easily retrieve details about your cluster configuration and database objects by querying
tables in the system keyspace using CQL.
• Atomic batches
Prior versions of Cassandra allowed for batch operations for grouping related updates into a single
statement. If some of the replicas for the batch failed mid-operation, the coordinator would hint those
rows automatically. However, if the coordinator itself failed in mid operation, you could end up with
partially applied batches. In version 1.2 of Cassandra, batch operations are guaranteed by default to
be atomic, and are handled differently than in earlier versions of the database.
• Flat file loader/export utility
A new cqlsh utility facilitates importing and exporting flat file data to/from Cassandra tables. Although
initially introduced in Cassandra 1.1.3, the new load utility wasn’t formally announced until now.
The utility mirrors the COPY command from the PostgreSQL RDBMS. A variety of file formats are
supported including comma-separated value (CSV), tab-delimited, and more, with CSV being the
default.
Other CQL 3 enhancements
Cassandra 1.2 introduced many enhancements in addition to the key CQL features.
• New statement for altering the replication strategy: ALTER KEYSPACE
• Querying ordered data using additional operators such as >=
What's new
10
• Compound keys and clustering
• Composite partition keys
• Safeguard against running risky queries
• Retrieve more information about cluster topology
• Increased query efficiency by using the clustering order
• Easy access to column timestamps
• Improved index updates
• A table can now consist of only a primary key definition
• New inet data type
• New syntax for setting the replication strategy using a map collection
• Capability to query legacy tables
• Capability to rename a CQL 3 column
• Consistent case-sensitivity rules for keyspace, table, and column names
• Configurable tombstone eviction by setting a CQL table property
Other changes
• Support for legacy tables
• Option used to start cqlsh in CQL 2 mode
• CLI command to query CQL 3 table
• New syntax for setting compression and compaction
• New compaction sub-properties for configuing the size-tiered bucketing process
• Change to the default consistency level, now set in the driver instead of CQL or globally using cqlsh
• Capability to drop a column from a table temporarily removed
• Removal of The WITH CONSISTENCY LEVEL clause from CQL commands. Programmatically, you now
set the consistency level in the driver. On the command line, you can use a new cqlsh CONSISTENCY
command.
• As of Cassandra 1.2.3, CQL 3 supports blob constants.
• As of Cassandra 1.2.3, new functions convert native types to blobs and perform timeuuid conversions.