cass

实战-Cassandra之账号权限管理

时间秒杀一切 提交于 2020-02-12 15:00:12
密码认证器 默认的认证器是 org.apache.cassandra.auth.AllowAllAuthenticator。如果想要求客户端提供凭证,Cassandra提供另一种选择 org.apache.cassandra.auth.PasswordAuthenticatot 配置认证器 默认登录cqlsh不需要密码,修改cassandra.yaml 修改 # authenticator: AllowAllAuthenticator authenticator: PasswordAuthenticator Cassandra2.2或以后的版本,会看到使用 PasswordAuthenticator必须使用CassandraRoleManager,是Cassandra授权功能的一部分。 增加用户 修改之后登录提示需要账号密码,默认账号密码都是 cassandra [cassandra@node2 bin]$ ./cqlsh node2 Connection error: ('Unable to connect to any servers', {'192.168.56.12': AuthenticationFailed('Remote end requires authentication.',)}) [cassandra@node2 bin]$ ./cqlsh node2 -u

Modeling many-to-many relations in Cassandra 2 with CQL3

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: What is the canonical way to model many-to-many relations with CQL3 ? Let's say I have to tables CREATE TABLE actor ( id text PRIMARY KEY , given text , surname text , ) CREATE TABLE fan ( id text PRIMARY KEY , given text , surname text , ) and I'd like to model the fact that an actor can have many fan and each fan can like many actors. The first idea that came to my my was to use sets , like in the following (and the other way around for fans): CREATE TABLE actor ( id text PRIMARY KEY , given text , surname text , fans set <text>

spark sql to transfer data between Cassandra tables

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Please find the Cassandra table below. I am trying to copy data from 1 Cassandra table to another Cassandra table with same structure. Please help me. CREATE TABLE data2 ( d_no text , d_type text , sn_perc int , tse_dt timestamp , f_lvl text , ign_f boolean , lk_loc text , lk_ts timestamp , mi_rem text , nr_fst text , perm_stat text , rec_crt_dt timestamp , sr_stat text , sor_query text , tp_dat text , tp_ts timestamp , tr_rem text , tr_type text , PRIMARY KEY ( device_serial_no , device_type ) ) WITH CLUSTERING ORDER BY ( device

Calculating the size of a table in Cassandra

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In "Cassandra The Definitive Guide" (2nd edition) by Jeff Carpenter & Eben Hewitt, the following formula is used to calculate the size of a table on disk (apologies for the blurred part): ck: primary key columns cs: static columns cr: regular columns cc: clustering columns Nr: number of rows Nv: it's used for counting the total size of the timestamps (I don't get this part completely, but for now I'll ignore it). There are two things I don't understand in this equation. First: why do clustering columns size gets counted for every

Unable to perform range queries in Cassandra 1.2

匿名 (未验证) 提交于 2019-12-03 01:02:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm accessing Cassandra 1.2 via FluentCassandra and C#. I used the DataStax installation package. The issue I have is I cannot execute the range query I show below. I have tried the following table create methods: CREATE TABLE Test (KEY text, p1 int, p2 int, p3 int, p4 int, p5 int, p6 int, p7 int, p8 int, data text, PRIMARY KEY (KEY)) CREATE TABLE Test (KEY text, p1 int, p2 int, p3 int, p4 int, p5 int, p6 int, p7 int, p8 int, data text, PRIMARY KEY (KEY, p1, p2, p3, p4, p5, p6, p7, p8)) Here is the query: SELECT Data FROM Test WHERE KEY IN (