@@ -39,12 +39,10 @@ public class BlockAsDirReader implements BlockReader<Block> {
39
39
40
40
private final Path blockNodeRootPath ;
41
41
private final FileAttribute <Set <PosixFilePermission >> filePerms ;
42
- private final BlockRemover blockRemover ;
43
42
44
43
public BlockAsDirReader (
45
44
final String key ,
46
45
final Config config ,
47
- final BlockRemover blockRemover ,
48
46
final FileAttribute <Set <PosixFilePermission >> filePerms ) {
49
47
50
48
LOGGER .log (System .Logger .Level .INFO , "Initializing FileSystemBlockReader" );
@@ -55,16 +53,11 @@ public BlockAsDirReader(
55
53
LOGGER .log (System .Logger .Level .INFO , "Block Node Root Path: " + blockNodeRootPath );
56
54
57
55
this .blockNodeRootPath = blockNodeRootPath ;
58
- this .blockRemover = blockRemover ;
59
56
this .filePerms = filePerms ;
60
57
}
61
58
62
59
public BlockAsDirReader (final String key , final Config config ) {
63
- this (
64
- key ,
65
- config ,
66
- new BlockAsDirRemover (Path .of (config .get (key ).asString ().get ()), Util .defaultPerms ),
67
- Util .defaultPerms );
60
+ this (key , config , Util .defaultPerms );
68
61
}
69
62
70
63
@ Override
@@ -109,8 +102,6 @@ public Optional<Block> read(final long blockNumber) throws IOException {
109
102
return Optional .of (builder .build ());
110
103
} catch (IOException io ) {
111
104
LOGGER .log (System .Logger .Level .ERROR , "Error reading block: " + blockPath , io );
112
- LOGGER .log (System .Logger .Level .ERROR , "Attempting to remove the block: " + blockPath );
113
- blockRemover .remove (blockNumber );
114
105
115
106
throw io ;
116
107
}
0 commit comments