class DFSAdmin extends FsShell {

  int getReconfigurationStatus(String nodeType, String address,
      PrintStream out, PrintStream err) throws IOException {
    if ("datanode".equals(nodeType)) {
      ClientDatanodeProtocol dnProxy = getDataNodeProxy(address);
      try {
        ReconfigurationTaskStatus status = dnProxy.getReconfigurationStatus();
        out.print("Reconfiguring status for DataNode[" + address + "]: ");
        if (!status.hasTask()) {
          out.println("no task was found.");
          return 0;
        }
        out.print("started at " + new Date(status.getStartTime()));
        if (!status.stopped()) {
          out.println(" and is still running.");
          return 0;
        }

        out.println(" and finished at " +
            new Date(status.getEndTime()).toString() + ".");
        for (Map.Entry<PropertyChange, Optional<String>> result :
            status.getStatus().entrySet()) {
          if (!result.getValue().isPresent()) {
            out.print("SUCCESS: ");
          } else {
            out.print("FAILED: ");
          }
          out.printf("Change property %s%n\tFrom: \"%s\"%n\tTo: \"%s\"%n",
              result.getKey().prop, result.getKey().oldVal,
              result.getKey().newVal);
          if (result.getValue().isPresent()) {
            out.println("\tError: " + result.getValue().get() + ".");
          }
        }
      } catch (IOException e) {
        err.println("DataNode reloading configuration: " + e + ".");
        return 1;
      }
    } else {
      err.println("Node type " + nodeType + " does not support reconfiguration.");
      return 1;
    }
    return 0;
  }

  public  DFSAdmin();
  public  DFSAdmin(Configuration conf);

}