Esempio n. 1
0
 @Override
 public Response mkdir(String path, int mode, int uid, int gid, 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.MKDIR, involvedPartitions, instanceMap);
   MkdirCmd mkdir = new MkdirCmd(path, mode, uid, gid, parentParts, parts);
   cmd.setMkdir(mkdir);
   replica.submitCommand(cmd);
   Response r = new Response(replica.getInstanceMap());
   return r;
 }