Esempio n. 1
0
 @Override
 public Response getdir(String path, Map<Byte, Long> instanceMap) throws TException {
   // can be sent to ANY partition that replicates the path - we send it to the first returned by
   // the oracle
   path = makePathAbsolute(path);
   Set<Byte> parts = Sets.newHashSet(Byte.valueOf(partition));
   Command cmd = newCommand(CommandType.GETDIR, parts, instanceMap);
   GetdirCmd getdir = new GetdirCmd(path, parts);
   cmd.setGetdir(getdir);
   @SuppressWarnings("unchecked")
   List<DirEntry> entries = (List<DirEntry>) replica.submitCommand(cmd);
   Response r = new Response(replica.getInstanceMap());
   r.setGetdir(entries);
   return r;
 }