@Override public Response debug(Debug debug) throws TException { Set<Byte> partitions; if (debug.getType() == DebugCommands.POPULATE_FILE.getId()) { partitions = oracle.partitionsOf("/"); } else { partitions = new HashSet<>(); partitions.add(Byte.valueOf(Byte.parseByte(debug.getData().get("partition")))); } Command cmd = newCommand(CommandType.DEBUG, partitions, null); cmd.setDebug(debug); replica.submitCommand(cmd); Response r = new Response(replica.getInstanceMap()); return r; }