cassandra - sstableloader 远程批量上传
问题描述
我试图弄清楚如何从快照上传数据以及为什么我在批量上传时收到此错误。本地计算机正在尝试连接到 cassandra.mydomain.com。cassandra.yaml 是来自远程服务器的 yaml。无论是否指定--conf-path,我都会遇到相同的错误
感谢您的任何建议。卡桑德拉版本 3.11.2
~/deploy/cassandra/bin/sstableloader -d cassandra.mydomain.com --conf-path /tmp/cassandra.yaml /local/.data/cassandra/data/test/timeserie_time_daily-dd247b092e883bffbfce8621eff3cc3e/snapshots/1634621703263
10:10:50.138 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading settings from file:/tmp/cassandra.yaml
Exception in thread "main" org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config]. Found[cassandra.yaml]. Please prefix the file with [file:///] for local files and [file://<server>/] for remote file
s. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration.
at org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL(YamlConfigurationLoader.java:80)
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:100)
at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:262)
at org.apache.cassandra.config.DatabaseDescriptor.toolInitialization(DatabaseDescriptor.java:180)
at org.apache.cassandra.config.DatabaseDescriptor.toolInitialization(DatabaseDescriptor.java:151)
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:53)
at o
rg.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:48)
解决方案
如例外所述,您需要提供正确的 URL 到cassandra.yaml
.
如果您使用的是本地计算机上的 YAML,则需要在其前面加上file:///
. 例如:
$ sstableloader -f file:///path/to/cassandra.yaml
-d node1
ks_name/table_name
如果您要指定远程计算机上的 YAML,则需要在其前面加上file://host/
. 例如:
$ sstableloader -f file://hostname_or_ip/path/to/cassandra.yaml
-d node1
ks_name/table_name
推荐阅读
- c# - Azure 函数不允许在函数方法中创建类对象
- java - 片段中未解决的类“@string/appbar_scrolling_view_behavior”导致行为 OnCreate 未触发
- php - 在 Laravel 中使用 Stripe 创建费用,在测试模式下工作,但不是在现场
- php - 无需查询即可获取模型表名
- openedge - 如何在进度 4GL 上将字符转换为十进制?
- wpf - WPF 绑定背景为 SolidColorBrush
- javascript - Dart 中的 Javascript“地图”等价物是什么?
- android - Google Fitness:在没有反馈的情况下处理 TransactionTooLargeException
- ruby-on-rails - 如何在具有活动记录关联的设备中注册用户?
- virtualbox - 如何修复“virtualbox DHCP 服务器尚未为虚拟设备分配 IP 地址”