Exemplo n.º 1
0
 @Override
 public Response rmdir(String path, Map<Byte, Long> instanceMap) throws TException {
   path = makePathAbsolute(path);
   Set<Byte> parts = oracle.partitionsOf(path);
   Set<Byte> parentParts = oracle.partitionsOf(Paths.dirname(path));
   Set<Byte> involvedPartitions = Sets.union(parts, parentParts);
   Command cmd = newCommand(CommandType.RMDIR, involvedPartitions, instanceMap);
   RmdirCmd rmdir = new RmdirCmd(path, parentParts, parts);
   cmd.setRmdir(rmdir);
   replica.submitCommand(cmd);
   Response r = new Response(replica.getInstanceMap());
   return r;
 }