【问题标题】:Cassandra, Cassandra.yaml卡桑德拉,Cassandra.yaml
【发布时间】:2020-02-04 23:43:56
【问题描述】:

我对 Cassandra 有一些疑问,首先我想在 storage-conf.xml 中创建列和键空间(我没有,但我认为 cassandra.yaml 在最新版本中取代了它) 我试图通过在记事本中打开它来在 cassandra.yaml 中编写它,但它似乎不起作用,因为我无法在 datastax Web 界面中看到我的新键空间。

<Keyspace>
<Keyspace Name="Sales">
<ColumnFamily Name="Customer" CompareWith="UTF8Type" />
<ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy
</ReplicaPlacementStrategy>
<ReplicationFactor>1</ReplicationFactor
<EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
</Keyspace>

我做错了什么?

我还想知道是否有某种简单的方法可以将关系 sql server 数据库迁移到 cassandra?

提前致谢!

【问题讨论】:

  • 您的问题似乎搞砸了,请告诉我们您真正想做什么?仅供参考 cassandra.yaml 用于 cassandra 服务器配置相关信息。您最好阅读 cassandra 文档
  • 这不是在 Cassandra 中创建 Keyspace/ColumnFamily 的方式,为此请使用 CQL 客户端 或公开 API

标签: cassandra


【解决方案1】:

您正在尝试通过将上述内容添加到cassandra.yaml 来创建键空间和列,但您不能这样做。其次,您添加的内容确实没有意义,cassandra.yaml 是一个YAML 文件,上面是XML 标记。 Cassandra.yaml 仅用于配置。如果要添加键空间/列,则必须使用 cassadra 接口 (cassandra APIs)。

至于迁移,有没有简单的方法? No not really。 B̶u̶t̶ ̶w̶i̶t̶h̶ ̶l̶o̶t̶s̶ ̶o̶f̶ ̶d̶e̶n̶o̶r̶m̶a̶l̶i̶z̶a̶t̶i̶o̶n̶ ̶a̶n̶d̶ ̶r̶e̶s̶e̶a̶r̶c̶h̶ ̶i̶t̶ ̶c̶a̶n̶ ̶b̶e̶ ̶d̶o̶n̶e̶.̶ ̶H̶e̶r̶e̶ ̶i̶s̶ ̶a̶ ̶[̶b̶l̶o̶g̶]̶[̶5̶]̶ ̶t̶h̶a̶t̶ ̶g̶o̶e̶s̶ ̶o̶v̶e̶r̶ ̶a̶ ̶b̶a̶s̶i̶c̶ ̶w̶a̶y̶ ̶o̶f̶ ̶a̶t̶t̶e̶m̶p̶t̶i̶n̶g̶ ̶t̶o̶ ̶d̶o̶ ̶s̶o̶.

更新 博客不见了?。 oreilly 的 tutorial 很好地概述了如何为 Cassandra 修改典型的 RDMS 数据模型。

【讨论】:

  • 博客链接失效了,能发一下当前的吗?
  • @IslamEl-Rougy 确切的博客已被删除,我找不到它的副本。但是,我找到了一个备用链接。答案已更新。
  • 非常感谢您的帮助。
猜你喜欢
  • 1970-01-01
  • 2015-10-19
  • 2015-03-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-09-16
  • 1970-01-01
  • 2014-12-28
相关资源
最近更新 更多