- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在从此处关注 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/
我正在从此处关注 Cassandra 3.4.0 的 Cassandra Bulk Loader 示例 https://github.com/yukim/cassandra-bulkload-exam
Dir[directory_path].empty? 始终返回 false。无论我是否以 root 身份运行 irb,行为都是一样的: $ ll total 12 drwxrwxrwx 2 ndefo
我已经开始学习 Linux 命令,我正在做一些简单的事情,比如添加新用户和组以及删除它们。当我尝试删除使用语法“userdel username”创建的用户时,它会毫无问题地被删除,但是当我尝试使用
我是一名优秀的程序员,十分优秀!