cassandra.bat 抛出 java.io.IOException: 0.7rc1 中的 LocationInfo-e -1-Data.db 重命名失败
我已按照单节点的入门说明进行操作,它在 cassandra-0.7beta2 中运行良好。但是当尝试对 cassandra-0.7rc1 执行相同操作时,它会显示以下堆栈跟踪:
INFO 20:21:37,771 Starting up server gossip INFO 20:21:37,786 switching in a fresh Memtable for LocationInfo at CommitLogContext(file='/var/lib /cassandra/commitlog\CommitLog-1290885697489.log', position=700) INFO 20:21:37,786 Enqueuing flush of Memtable-LocationInfo@29247351(227 bytes, 4 operations) INFO 20:21:37,786 Writing Memtable-LocationInfo@29247351(227 bytes, 4 operations) ERROR 20:21:38,161 Fatal exception in thread Thread[FlushWriter:1,5,main] java.io.IOError: java.io.IOException: rename failed of D:\var\lib\cassandra\data\system\LocationInfo-e-1-Data.db at org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java:214) at org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:184) at org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:167) at org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:161) at org.apache.cassandra.db.Memtable.access$000(Memtable.java:49) at org.apache.cassandra.db.Memtable$1.runMayThrow(Memtable.java:174) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: rename failed of D:\var\lib\cassandra\data\system\LocationInfo-e-1-Data.db at org.apache.cassandra.utils.FBUtilities.renameWithConfirm(FBUtilities.java:359) at org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java:210) ... 12 more
有人在 cassandra 的 邮件列表。 尝试重命名 tmp 文件时(例如 LocationInfo-tmp-e-1-Data.db),似乎存在问题。 它发生在 FBUtilities.java 中:
public static void renameWithConfirm(String tmpFilename, String filename) throws IOException
{
if (!new File(tmpFilename).renameTo(new File(filename)))
{
throw new IOException("rename failed of " + filename);
}
}
我应该注意到 File.renameTo() 在 Windows 上工作起来很有趣。
无论如何...帮忙?
I've followed the Getting Started instructions for single node and it worked fine in cassandra-0.7beta2. But when trying to do the same for cassandra-0.7rc1 it spews out the following stack trace:
INFO 20:21:37,771 Starting up server gossip INFO 20:21:37,786 switching in a fresh Memtable for LocationInfo at CommitLogContext(file='/var/lib /cassandra/commitlog\CommitLog-1290885697489.log', position=700) INFO 20:21:37,786 Enqueuing flush of Memtable-LocationInfo@29247351(227 bytes, 4 operations) INFO 20:21:37,786 Writing Memtable-LocationInfo@29247351(227 bytes, 4 operations) ERROR 20:21:38,161 Fatal exception in thread Thread[FlushWriter:1,5,main] java.io.IOError: java.io.IOException: rename failed of D:\var\lib\cassandra\data\system\LocationInfo-e-1-Data.db at org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java:214) at org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:184) at org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:167) at org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:161) at org.apache.cassandra.db.Memtable.access$000(Memtable.java:49) at org.apache.cassandra.db.Memtable$1.runMayThrow(Memtable.java:174) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: rename failed of D:\var\lib\cassandra\data\system\LocationInfo-e-1-Data.db at org.apache.cassandra.utils.FBUtilities.renameWithConfirm(FBUtilities.java:359) at org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java:210) ... 12 more
Someone posted this problem on cassandra's mailing list.
It seems there's a problem, when trying to rename the tmp files (e.g. LocationInfo-tmp-e-1-Data.db).
It happens in FBUtilities.java:
public static void renameWithConfirm(String tmpFilename, String filename) throws IOException
{
if (!new File(tmpFilename).renameTo(new File(filename)))
{
throw new IOException("rename failed of " + filename);
}
}
I should note that File.renameTo() is known to work funny on Windows.
Anyway... Help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请在此处创建错误报告:https://issues.apache.org/jira/browse/CASSANDRA< /a>
Please create a bug report here: https://issues.apache.org/jira/browse/CASSANDRA