学习 Presto(五):集成 Cassandra

栏目: 数据库 · 发布时间: 7年前

内容简介:创建文件 etc/catalog/cassandra.properties 文件:配置 cassandra.contact-points 多个连接点使用逗号进行分隔,如果服务不指定端口号,默认使用 9042

Cassandra 简介

Apache Cassandra 是一个开源、分布式去中心化、弹性扩展、高可用错误容忍、可调一致性、面向行的数据库,分布式设计基于亚马逊 Dynamo,数据模型基于谷歌 Bigtable,最初由 Facebook 创建

配置

创建文件 etc/catalog/cassandra.properties 文件:

connector.name=cassandra  
cassandra.contact-points=CASSANDRA_X,CASSANDRA_Y,CASSANDRA_Z  
cassandra.username=USER  
cassandra.password=PASS  
cassandra.consistency-level=ONE

配置 cassandra.contact-points 多个连接点使用逗号进行分隔,如果服务不指定端口号,默认使用 9042

配置 cassandra.consistency-level 即席查询对一致性要求不高,为了保证查询效率,保持默认值 ONE 即可

问题一:查询速度缓慢

如果查询的过滤条件没有包含 Partition Key,这将导致扫码整个数据集,查询速度非常慢!!!

Cassandra 表的 Partition Key、Cluster Key 和 Secondary Index 对于查询性能有非常大的影响

参考

  • Presto - Cassandra Connector
  • 《Cassandra - The Definitive Guide 2rd Edition》 O'Reilly Jeff Carpenter & Eben Hewitt
  • 《Presto 技术内幕》 电子工业出版社 JD-Presto研发团队

以上所述就是小编给大家介绍的《学习 Presto(五):集成 Cassandra》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Introduction to Programming in Java

Introduction to Programming in Java

Robert Sedgewick、Kevin Wayne / Addison-Wesley / 2007-7-27 / USD 89.00

By emphasizing the application of computer programming not only in success stories in the software industry but also in familiar scenarios in physical and biological science, engineering, and appli......一起来看看 《Introduction to Programming in Java》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具