在Debian机器上,我有一个单节点Cassandra 3.7集群,我尝试使用sstableloader将数据从sstable文件导入表ccp.srsdatabulk。我得到一个流媒体错误,我没有过去。
sstableloader命令和sstable文件与Cassandra集群在同一台机器上(但我仍然需要输入机器的外部IP地址,使用127.0.0.1无效)。
我有一个文件夹结构home / username / ftpupload / bulkimport / ccp / srsdatabulk,其中srsdatabulk包含我使用CQLSSTableWriter使用http://www.datastax.com/dev/blog/using-the-cassandra-bulk-loader-updated
中的说明创建的以下文件mb-1-big-CompressionInfo.db
mb-1-big-Data.db
mb-1-big-Digest.crc32
mb-1-big-Filter.db
mb-1-big-Index.db
mb-1-big-Statistics.db
mb-1-big-Summary.db
mb-1-big-TOC.txt
正如您所看到的,文件被CQLSSTableWriter命名为“mb” - 我不知道它们是否应该包含表名?
当我尝试从Cassandra的bin目录运行sstableloader时:
./sstableloader -d 123.456.789.0 -u theusername -pw thepassword -cph 1 /home/username/ftpupload/bulkimport/ccp/srsdatabulk/
它开始流式传输但会立即断开流并发出错误:
Established connection to initial hosts
Opening sstables and calculating sections to stream
Streaming relevant part of /home/username/ftpupload/bulkimport/ccp/srsdatabulk/mb-1-big-Data.db to [/123.456.789.0]
progress: [/123.456.789.0]0:1/1 100% total: 100% 157.155KiB/s (avg: 157.155KiB/s)
progress: [/123.456.789.0]0:1/1 100% total: 100% 0.000KiB/s (avg: 156.364KiB/s)
progress: [/123.456.789.0]0:1/1 100% total: 100% 0.000KiB/s (avg: 155.610KiB/s)
progress: [/123.456.789.0]0:1/1 100% total: 100% 0.000KiB/s (avg: 154.892KiB/s)
ERROR 15:32:51 [Stream #3682f870-d813-11e6-b238-db523103ddb3] Remote peer 123.456.789.0 failed stream session.
progress: [/123.456.789.0]0:1/1 100% total: 100% 0.000KiB/s (avg: 153.550KiB/s)
WARN 15:32:51 [Stream #3682f870-d813-11e6-b238-db523103ddb3] Stream failed
Streaming to the following hosts failed:
[/123.456.789.0]
java.util.concurrent.ExecutionException: org.apache.cassandra.streaming.StreamException: Stream failed
at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:99)
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:49)
Caused by: org.apache.cassandra.streaming.StreamException: Stream failed
at org.apache.cassandra.streaming.management.StreamEventJMXNotifier.onFailure(StreamEventJMXNotifier.java:85)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1310)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202)
at org.apache.cassandra.streaming.StreamResultFuture.maybeComplete(StreamResultFuture.java:215)
at org.apache.cassandra.streaming.StreamResultFuture.handleSessionComplete(StreamResultFuture.java:191)
at org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:430)
at org.apache.cassandra.streaming.StreamSession.sessionFailed(StreamSession.java:650)
at org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:490)
at org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:274)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" org.apache.cassandra.tools.BulkLoadException: java.util.concurrent.ExecutionException: org.apache.cassandra.streaming.StreamException: Stream failed
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:115)
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:49)
Caused by: java.util.concurrent.ExecutionException: org.apache.cassandra.streaming.StreamException: Stream failed
at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:99)
... 1 more
Caused by: org.apache.cassandra.streaming.StreamException: Stream failed
at org.apache.cassandra.streaming.management.StreamEventJMXNotifier.onFailure(StreamEventJMXNotifier.java:85)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1310)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202)
at org.apache.cassandra.streaming.StreamResultFuture.maybeComplete(StreamResultFuture.java:215)
at org.apache.cassandra.streaming.StreamResultFuture.handleSessionComplete(StreamResultFuture.java:191)
at org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:430)
at org.apache.cassandra.streaming.StreamSession.sessionFailed(StreamSession.java:650)
at org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:490)
at org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:274)
at java.lang.Thread.run(Thread.java:745)
这可能是什么原因?