如何修复使用Cassandra sstableloader时出现的“无法列出文件”错误?

时间:2019-01-11 12:47:47

标签: cassandra cql

我正在尝试使用sstableloader将SSTable文件批量加载到本地计算机上的单个节点实例。这些文件位于我从另一台服务器复制的同一台计算机上的文件夹中。遵循了https://docs.datastax.com/en/archived/cassandra/2.1/cassandra/tools/toolsBulkloader_t.html

此处提供的文档

但是当我运行sstableloader命令时遇到“无法列出文件”错误。

我已经使用system_schema / columns-xxx /中的架构信息重新创建了相应的键空间(运行时)和表(日志),以确保我具有相同的键空间和表路径。

sstableloader -d localhost /crs1/backups/runtime/journal-769eb550158f11e9b36dafc206bf4fcf

Established connection to initial hosts
Opening sstables and calculating sections to stream
Failed to list files in /crs1/backups/runtime/journal-769eb550158f11e9b36dafc206bf4fcf
java.lang.IndexOutOfBoundsException: index (4) must be less than size (3)
java.lang.RuntimeException: Failed to list files in /crs1/backups/runtime/journal-769eb550158f11e9b36dafc206bf4fcf
    at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:77)
    at org.apache.cassandra.db.lifecycle.LifecycleTransaction.getFiles(LifecycleTransaction.java:561)
    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.IndexOutOfBoundsException: index (4) must be less than size (3)
    at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:310)
    at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:292)
    at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:65)
    at org.apache.cassandra.db.ClusteringPrefix$Serializer.deserializeValuesWithoutSize(ClusteringPrefix.java:359)
    at org.apache.cassandra.db.ClusteringBoundOrBoundary$Serializer.deserializeValues(ClusteringBoundOrBoundary.java:179)
    at org.apache.cassandra.db.ClusteringPrefix$Serializer.deserialize(ClusteringPrefix.java:287)
    at org.apache.cassandra.db.Serializers$NewFormatSerializer.deserialize(Serializers.java:175)
    at org.apache.cassandra.db.Serializers$NewFormatSerializer.deserialize(Serializers.java:151)
    at org.apache.cassandra.io.sstable.IndexInfo$Serializer.deserialize(IndexInfo.java:134)
    at org.apache.cassandra.db.RowIndexEntry$IndexedEntry.<init>(RowIndexEntry.java:623)
    at org.apache.cassandra.db.RowIndexEntry$IndexedEntry.<init>(RowIndexEntry.java:577)
    at org.apache.cassandra.db.RowIndexEntry$Serializer.deserialize(RowIndexEntry.java:340)
    at org.apache.cassandra.io.sstable.format.big.BigTableReader.getPosition(BigTableReader.java:242)
    at org.apache.cassandra.io.sstable.format.SSTableReader.getPosition(SSTableReader.java:1586)
    at org.apache.cassandra.io.sstable.format.SSTableReader.getPosition(SSTableReader.java:1574)
    at org.apache.cassandra.io.sstable.format.SSTableReader.getPositionsForRanges(SSTableReader.java:1506)
    at org.apache.cassandra.io.sstable.SSTableLoader.lambda$openSSTables$0(SSTableLoader.java:131)
    at org.apache.cassandra.db.lifecycle.LogAwareFileLister.lambda$innerList$2(LogAwareFileLister.java:99)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
    at java.util.TreeMap$EntrySpliterator.forEachRemaining(TreeMap.java:2969)
    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:101)
    at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:73)
    ... 5 more
Exception in thread "main" org.apache.cassandra.tools.BulkLoadException: java.lang.RuntimeException: Failed to list files in /crs1/backups/runtime/journal-769eb550158f11e9b36dafc206bf4fcf
    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 /crs1/backups/runtime/journal-769eb550158f11e9b36dafc206bf4fcf
    at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:77)
    at org.apache.cassandra.db.lifecycle.LifecycleTransaction.getFiles(LifecycleTransaction.java:561)
    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.IndexOutOfBoundsException: index (4) must be less than size (3)
    at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:310)
    at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:292)
    at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:65)
    at org.apache.cassandra.db.ClusteringPrefix$Serializer.deserializeValuesWithoutSize(ClusteringPrefix.java:359)
    at org.apache.cassandra.db.ClusteringBoundOrBoundary$Serializer.deserializeValues(ClusteringBoundOrBoundary.java:179)
    at org.apache.cassandra.db.ClusteringPrefix$Serializer.deserialize(ClusteringPrefix.java:287)
    at org.apache.cassandra.db.Serializers$NewFormatSerializer.deserialize(Serializers.java:175)
    at org.apache.cassandra.db.Serializers$NewFormatSerializer.deserialize(Serializers.java:151)
    at org.apache.cassandra.io.sstable.IndexInfo$Serializer.deserialize(IndexInfo.java:134)
    at org.apache.cassandra.db.RowIndexEntry$IndexedEntry.<init>(RowIndexEntry.java:623)
    at org.apache.cassandra.db.RowIndexEntry$IndexedEntry.<init>(RowIndexEntry.java:577)
    at org.apache.cassandra.db.RowIndexEntry$Serializer.deserialize(RowIndexEntry.java:340)
    at org.apache.cassandra.io.sstable.format.big.BigTableReader.getPosition(BigTableReader.java:242)
    at org.apache.cassandra.io.sstable.format.SSTableReader.getPosition(SSTableReader.java:1586)
    at org.apache.cassandra.io.sstable.format.SSTableReader.getPosition(SSTableReader.java:1574)
    at org.apache.cassandra.io.sstable.format.SSTableReader.getPositionsForRanges(SSTableReader.java:1506)
    at org.apache.cassandra.io.sstable.SSTableLoader.lambda$openSSTables$0(SSTableLoader.java:131)
    at org.apache.cassandra.db.lifecycle.LogAwareFileLister.lambda$innerList$2(LogAwareFileLister.java:99)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
    at java.util.TreeMap$EntrySpliterator.forEachRemaining(TreeMap.java:2969)
    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:101)
    at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:73)
    ... 5 more

0 个答案:

没有答案