gpt4 book ai didi

java - Cassandra SSTableLoader : failed to list files in

转载 作者:行者123 更新时间:2023-12-01 10:09:08 31 4
gpt4 key购买 nike

我正在从此处关注 Cassandra 3.4.0 的 Cassandra Bulk Loader 示例 https://github.com/yukim/cassandra-bulkload-example 。数据文件在data文件夹下生成。具体如下:

quote-historical_prices-ka-1-CompressionInfo.db  quote-historical_prices-ka-1-Index.db
quote-historical_prices-ka-1-Data.db quote-historical_prices-ka-1-Statistics.db
quote-historical_prices-ka-1-Digest.sha1 quote-historical_prices-ka-1-TOC.txt
quote-historical_prices-ka-1-Filter.db

但是,当尝试使用 sstableloader -d 127.0.0.1 ~/workspace/cassandra-bulkload-example/data/quote/historical_prices/ 加载这些时,我收到如下错误:

Established connection to initial hosts
Opening sstables and calculating sections to stream
Failed to list files in /home/srai/workspace/cassandra-bulkload-example/data/quote/historical_prices
java.lang.NullPointerException
java.lang.RuntimeException: Failed to list files in /home/srai/workspace/cassandra-bulkload-example/data/quote/historical_prices
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:53)
at org.apache.cassandra.db.lifecycle.LifecycleTransaction.getFiles(LifecycleTransaction.java:544)
at org.apache.cassandra.io.sstable.SSTableLoader.openSSTables(SSTableLoader.java:76)
at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:165)
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:80)
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:48)
Caused by: java.lang.NullPointerException
at org.apache.cassandra.io.sstable.format.SSTableReader.openForBatch(SSTableReader.java:431)
at org.apache.cassandra.io.sstable.SSTableLoader.lambda$openSSTables$220(SSTableLoader.java:121)
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.lambda$innerList$208(LogAwareFileLister.java:75)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.TreeMap$EntrySpliterator.forEachRemaining(TreeMap.java:2965)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.innerList(LogAwareFileLister.java:77)
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:49)
... 5 more
Exception in thread "main" org.apache.cassandra.tools.BulkLoadException: java.lang.RuntimeException: Failed to list files in /home/srai/workspace/cassandra-bulkload-example/data/quote/historical_prices
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:93)
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:48)
Caused by: java.lang.RuntimeException: Failed to list files in /home/srai/workspace/cassandra-bulkload-example/data/quote/historical_prices
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:53)
at org.apache.cassandra.db.lifecycle.LifecycleTransaction.getFiles(LifecycleTransaction.java:544)
at org.apache.cassandra.io.sstable.SSTableLoader.openSSTables(SSTableLoader.java:76)
at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:165)
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:80)
... 1 more
Caused by: java.lang.NullPointerException
at org.apache.cassandra.io.sstable.format.SSTableReader.openForBatch(SSTableReader.java:431)
at org.apache.cassandra.io.sstable.SSTableLoader.lambda$openSSTables$220(SSTableLoader.java:121)
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.lambda$innerList$208(LogAwareFileLister.java:75)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.TreeMap$EntrySpliterator.forEachRemaining(TreeMap.java:2965)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.innerList(LogAwareFileLister.java:77)
at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:49)
... 5 more

最佳答案

批量加载器示例默认为 2.1.12 构建 sstables 。不支持流 < 3.0.0 表,这是为了在 CASSANDRA-10940 之前不跳过或提供良好的错误而提出的。然而,在 3.5 中,他们将在 CASSANDRA-10990 中再次开始支持它。 .

因此,要么在较新的版本中构建 sstables,要么等待 3.5。

关于java - Cassandra SSTableLoader : failed to list files in <directory_path>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36258646/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com