class BlockManager {

  @VisibleForTesting
  public void removeBlocks(List<Long> allBlockIds, final DatanodeDescriptor node) throws IOException {

    final Map<Long, List<Long>> inodeIdsToBlockMap = INodeUtil.getINodeIdsForBlockIds(allBlockIds,
        slicerBatchSize, slicerNbThreads, ((FSNamesystem) namesystem).getFSOperationsExecutor());
    final List<Long> inodeIds = new ArrayList<>(inodeIdsToBlockMap.keySet());

    try {
      Slicer.slice(inodeIds.size(), slicerBatchSize, slicerNbThreads, 
          ((FSNamesystem) namesystem).getFSOperationsExecutor(),
          new Slicer.OperationHandler() {
        @Override
        public void handle(int startIndex, int endIndex)
            throws Exception {
          List<Long> ids = inodeIds.subList(startIndex, endIndex);
          removeStoredBlocksTx(ids, inodeIdsToBlockMap, node);
        }
      });
    } catch (Exception ex) {
      throw new IOException(ex);
    }
  }

  public  BlockManager(final Namesystem namesystem, final Configuration conf);

}