FileBaseDataMap key file restore add
@@ -1548,7 +1548,7 @@ | ||
1548 | 1548 | file.delete(); |
1549 | 1549 | } |
1550 | 1550 | } else { |
1551 | - System.out.println(file.getAbsolutePath() + "=" + file.length()); | |
1551 | + System.out.println(file.getAbsolutePath() + " = This file has broken, it restores."); | |
1552 | 1552 | // ファイルのサイズが1レコードの倍数でない場合は壊れている可能性があるので修復する |
1553 | 1553 | File recoverFile = new File(this.fileDirs[i % this.fileDirs.length] + i + ".recover"); |
1554 | 1554 | BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(recoverFile)); |
@@ -1559,10 +1559,9 @@ | ||
1559 | 1559 | bos.flush(); |
1560 | 1560 | bos.close(); |
1561 | 1561 | bis.close(); |
1562 | - System.out.println("delete=" + file.delete()); | |
1563 | 1562 | file = new File(this.fileDirs[i % this.fileDirs.length] + i + ".data"); |
1564 | - System.out.println("delete=" + recoverFile.renameTo(file)); | |
1565 | - file = recoverFile; | |
1563 | + file = new File(this.fileDirs[i % this.fileDirs.length] + i + ".data"); | |
1564 | + recoverFile.delete(); | |
1566 | 1565 | } |
1567 | 1566 | } else { |
1568 | 1567 |
@@ -554,7 +554,6 @@ | ||
554 | 554 | if(ret != null) { |
555 | 555 | if (!this.memoryMode) { |
556 | 556 | String deleteLinePointStr = new Long((System.currentTimeMillis() + (1000 * 60 * 35))).toString() + "." + ret; |
557 | - | |
558 | 557 | this.deletedDataPointList.offer(deleteLinePointStr); |
559 | 558 | } |
560 | 559 | } |