【问题标题】:sstableloader remote bulk uploadsstableloader 远程批量上传
【发布时间】:2021-12-06 13:33:54
【问题描述】:

我试图弄清楚如何从快照上传数据,以及为什么我在批量上传时收到此错误。 本地计算机正在尝试连接到 cassandra.mydomain.com。 cassandra.yaml 是来自远程服务器的 yaml。无论是否指定--conf-path

,我都会遇到相同的错误

感谢您的任何建议。 cassandra 版本 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)

【问题讨论】:

    标签: cassandra datastax k8ssandra


    【解决方案1】:

    如异常所述,您需要提供正确的 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
    

    【讨论】:

    • 运气不好:~/deploy/cassandra/bin/sstableloader -d cassandra.mydomain.com -f file:///tmp/cassandra.yaml /local/.data/cassandra/data/test /timeserie_time_daily-dd247b092e883bffbfce8621eff3cc3e/snapshots/1634621703263 找不到配置文件
    猜你喜欢
    • 1970-01-01
    • 2020-10-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-19
    • 1970-01-01
    相关资源
    最近更新 更多