124 |
public void delete(Block b) throws IOException { |
public void delete(Block b) throws IOException { |
125 |
getFile(b.getId()).delete(); |
getFile(b.getId()).delete(); |
126 |
} |
} |
127 |
public Set getIds() { |
public SetCollector getIds() { |
128 |
HashSet ids = new HashSet(); |
HashSet ids = new HashSet(); |
129 |
String[] list = dir.list(); |
String[] list = dir.list(); |
130 |
|
|
132 |
if(list[i].startsWith("b_")) |
if(list[i].startsWith("b_")) |
133 |
ids.add(new BlockId("storm:block:" + list[i].substring(2))); |
ids.add(new BlockId("storm:block:" + list[i].substring(2))); |
134 |
|
|
135 |
return ids; |
return new SimpleSetCollector(ids); |
136 |
} |
} |
137 |
public BlockOutputStream getBlockOutputStream(String contentType) |
public BlockOutputStream getBlockOutputStream(String contentType) |
138 |
throws IOException { |
throws IOException { |