- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
假设我使用 CQL 来定义此表。
CREATE TABLE songs (
id uuid PRIMARY KEY,
title text,
album text,
artist text,
tags set<text>,
data blob);
其他开发人员(或几周后的我自己)如何(重新)发现此表的布局?
我正在考虑与 MySQL DESCRIBE {tablename}
命令等效的命令。
[编辑]
我看到 Cassandra 的命令行界面 (CLI) 中有一个 DESCRIBE
方法,但在使用它时,它指出它的结果中不包含有关 CQL 表的信息。
最佳答案
您应该尝试使用 cqlsh
工具,它会准确地显示您想要的内容:
lyubent@vm: ~$ ./cqlsh
cqlsh> use system;
cqlsh> describe columnfamily local;
CREATE TABLE local (
key text PRIMARY KEY,
bootstrapped text,
cluster_name text,
cql_version text,
data_center text,
gossip_generation int,
host_id uuid,
partitioner text,
rack text,
release_version text,
schema_version uuid,
thrift_version text,
tokens set<text>,
truncated_at map<uuid, blob>
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='information about the local node' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=0 AND
read_repair_chance=0.000000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
编辑
虽然当时很棒,但我链接的博客很棒。在 Windows 中运行 cqlsh:
通过导航到运行安装程序在 cmd 提示符下的 C:\dir\to\cassandra\pylib
并执行以下命令行:
python setup.py install
广州。现在您在 Windows 上有了 cqlsh。
关于cassandra - 有没有办法发现 Cassandra CQL 表结构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18106043/
我想找到所有可以显式返回 null 的方法。 在 NDepend 中使用 CQL 这可能吗? 最佳答案 目前还不行,CQL 到目前为止还不知道变量、字段和返回值的值。 但是,建议使用以下默认规则。这个
在 CQL 脚本中使用时,有没有办法在 CQL 命令中传递变量,例如: select * from "Column Family Name" where "ColumnName"='A variabl
我遇到的问题是我想运行以下命令(但我不能): cqlsh < cql_directory/cql_create_stuff.cql 因为我还没有登录cqlsh。 所以我登录了: cqlsh -u 'm
我将内容存储在 CQL 的 map 中,我希望允许使用键删除该 map 中的特定内容。 key 是通过API从上面传入的,所以客户端可以传入任何它想要的东西。这是解释我的情况的代码片段...... f
我对 cassandra 很陌生,所以这听起来像是一个新手问题。 我正在运行 cqlsh 5.0.1 |本地的 Cassandra 2.1.4。 我有一张如下表: CREATE TABLE maste
CREATE TABLE users ( userID uuid, firstname text, lastname text, state text, zip int, age int, PRIMA
Cassandra的decimal数据类型对应的solr类型是什么? CREATE TABLE demo_table ( cost decimal ) solr对应的数据类型应该是什么? 最佳答案
我有一个像 创建表文件(id 文本主键、fname 文本、mimetype 文本、isdir bool 值、位置文本); 在文件(位置)上创建索引 file_location; 以下是表中的内容: 插
我有一个表,有一列 list类型(标签): CREATE TABLE "Videos" ( video_id UUID, title VARCHAR, tags LIST,
我有一个主键定义的列族,如下所示: ... PRIMARY KEY ((website_id, item_id), user_id, date) 将使用以下查询进行查询: SELECT * FROM
如何使用 Cassandra CQL 查询检查非主键字段的值是“A”还是“B”? (我使用的是 Cassandra 2.0.1) 这是表定义: CREATE TABLE my_table ( my
如果行键'row1'不存在,有什么方法可以防止CQL命令更新创建新行? UPDATE columnfamily SET data = 'test data' WHERE key = 'row1'; 最
我需要检查 Cassandra 数据库中是否存在某些键空间。我需要这样写: if (keyspace KEYSPACE_NAME not exists) create keyspace KEYSPAC
嗨,有什么办法可以在 Cassandra 中使用 CQL 使用 != 运算符吗? 我正在尝试在我的 columnfamily 上使用 != 运算符,但是当我尝试使用它时,它说: cqlsh:EPCCo
我有这张 table create table constants_values ( key_name_1 text,
我目前正在尝试将一个项目从 Cassandra 的 Thrift 界面(我越来越喜欢它)迁移到 CQL。我有以下困扰我的“问题”。我创建一个事件表: CREATE TABLE events ( e
如果我使用 cql 定义这样的表: CREATE TABLE scores ( name text, age int, score int, date timestamp, PRIMARY
如何在cassandra中编写子查询/嵌套查询。 CQL是否提供此功能? 我试过的示例: cqlsh:testdb> select itemname from item where itemid =
对于以下 Cassandra 架构: CREATE TABLE periods ( period_name text, event_name text, event_date timestamp, w
我可能想使用erlacassa Cassandra之间进行通信和 Eralng 。它是一个 CQL 客户端。所以我想知道,与thrift访问的cassandra相比,CQL(cassandra查询语言
我是一名优秀的程序员,十分优秀!