提交 a9115701 authored 作者: Thomas Mueller's avatar Thomas Mueller

MVTableEngine

上级 4c470ed9
......@@ -102,6 +102,11 @@ public class RecoverTester implements Recorder {
out.println("+ write #" + writeCount + " verify #" + verifyCount);
try {
IOUtils.copyFiles(fileName, testDatabase + Constants.SUFFIX_PAGE_FILE);
String mvFileName = fileName.substring(0, fileName.length() - Constants.SUFFIX_PAGE_FILE.length()) +
Constants.SUFFIX_MV_FILE;
if (FileUtils.exists(mvFileName)) {
IOUtils.copyFiles(mvFileName, testDatabase + Constants.SUFFIX_MV_FILE);
}
verifyCount++;
// avoid using the Engine class to avoid deadlocks
Properties p = new Properties();
......
......@@ -250,7 +250,7 @@ public class Recover extends Tool implements DataHandler {
}
for (String fileName : list) {
if (fileName.endsWith(Constants.SUFFIX_PAGE_FILE)) {
String mvFile = fileName.substring(0, fileName.length() -
String mvFile = fileName.substring(0, fileName.length() -
Constants.SUFFIX_PAGE_FILE.length()) + Constants.SUFFIX_MV_FILE;
if (list.contains(mvFile)) {
this.mvFile = mvFile;
......@@ -259,7 +259,7 @@ public class Recover extends Tool implements DataHandler {
} else if (fileName.endsWith(Constants.SUFFIX_LOB_FILE)) {
dumpLob(fileName, false);
} else if (fileName.endsWith(Constants.SUFFIX_MV_FILE)) {
PrintWriter writer = getWriter(fileName, ".mv.txt");
PrintWriter writer = getWriter(fileName, ".txt");
MVStoreTool.dump(fileName, writer);
writer.close();
}
......@@ -485,7 +485,7 @@ public class Recover extends Tool implements DataHandler {
closeSilently(store);
}
}
private void dumpMVStoreFile(PrintWriter writer, String fileName) {
writer.println("-- mvstore");
setDatabaseName(fileName.substring(0, fileName.length() - Constants.SUFFIX_MV_FILE.length()));
......@@ -544,7 +544,7 @@ public class Recover extends Tool implements DataHandler {
} finally {
mv.close();
}
}
}
private static String getPageType(int type) {
switch (type) {
......
......@@ -116,7 +116,7 @@ int test;
//System.out.println(prof.getTop(10));
System.out.println((System.currentTimeMillis() - time) + " " + dbName + " after");
}
private void testRecover() throws Exception {
FileUtils.deleteRecursive(getBaseDir(), true);
Connection conn;
......@@ -130,7 +130,7 @@ int test;
stat.execute("create table test2(name varchar)");
stat.execute("insert into test2 values('Hello World')");
conn.close();
Recover.execute(getBaseDir(), "mvstore");
DeleteDbFiles.execute(getBaseDir(), "mvstore", true);
conn = getConnection(url);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论