checkDataIntegrity
git-svn-id: svn://home0/checkDataIntegrity@2418 71dcc7fd-b1f2-4e5d-bb8e-274146e81173
This commit is contained in:
@@ -3,6 +3,7 @@ package checkDataIntegrity;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
@@ -31,7 +32,10 @@ public class Main {
|
||||
// .parallel()
|
||||
.filter(Files::isRegularFile)
|
||||
.forEach(p0 -> {
|
||||
count.incrementAndGet();
|
||||
long cnt = count.incrementAndGet();
|
||||
if (cnt % 10000 == 0) {
|
||||
System.out.println(cnt);
|
||||
}
|
||||
|
||||
final String rel = p0.toString().substring(path0.length());
|
||||
final Path p1 = Path.of(path1 + rel);
|
||||
@@ -55,8 +59,11 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (NoSuchFileException nsfExc) {
|
||||
// System.out.println(rel + ": NoSuchFileException");
|
||||
}
|
||||
catch (final Exception ex) {
|
||||
System.out.println(rel + ": Exception: " + ex.getMessage());
|
||||
System.out.println(rel + ": Exception: " + ex.getClass().getName() + " " + ex.getMessage());
|
||||
countErr.incrementAndGet();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user