class HdfsClient extends BaseClient {

  public static void validateConnectionConfigs(Map<String, String> configs)
      throws IllegalArgumentException {

    // username
    String username = configs.get("username") ;
    if ((username == null || username.isEmpty()))  {
      throw new IllegalArgumentException("Value for username not specified");
    }

    // password
    String password = configs.get("password") ;
    if ((password == null || password.isEmpty()))  {
      throw new IllegalArgumentException("Value for password not specified");
    }

    // hadoop.security.authentication
    String authentication = configs.get("hadoop.security.authentication") ;
    if ((authentication == null || authentication.isEmpty()))  {
      throw new IllegalArgumentException("Value for hadoop.security.authentication not specified");
    }

    String fsDefaultName = configs.get("fs.default.name") ;
    fsDefaultName = (fsDefaultName == null) ? "" : fsDefaultName.trim();
    if (fsDefaultName.isEmpty())  {
      throw new IllegalArgumentException("Value for neither fs.default.name is specified");
    }

    String dfsNameservices = configs.get("dfs.nameservices");
    dfsNameservices = (dfsNameservices == null) ? "" : dfsNameservices.trim();
    if (!dfsNameservices.isEmpty()) {
      String proxyProvider = configs.get("dfs.client.failover.proxy.provider." + dfsNameservices);
      proxyProvider =   (proxyProvider == null) ? "" : proxyProvider.trim();
      if (proxyProvider.isEmpty())  {
        throw new IllegalArgumentException("Value for " + "dfs.client.failover.proxy.provider." + dfsNameservices + " not specified");
      }

      String dfsNameNodes = configs.get("dfs.ha.namenodes." + dfsNameservices);
      dfsNameNodes = (dfsNameNodes == null) ? "" : dfsNameNodes.trim();
      if (dfsNameNodes.isEmpty())  {
        throw new IllegalArgumentException("Value for " + "dfs.ha.namenodes." + proxyProvider + " not specified");
      }
      String[] dfsNameNodeElements = dfsNameNodes.split(",");
      for (String dfsNameNodeElement : dfsNameNodeElements)  {
        String nameNodeUrlKey = "dfs.namenode.rpc-address." +
            dfsNameservices + "." + dfsNameNodeElement.trim();
        String nameNodeUrl =  configs.get(nameNodeUrlKey);
        nameNodeUrl = (nameNodeUrl == null) ? "" : nameNodeUrl.trim();
        if (nameNodeUrl.isEmpty())  {
          throw new IllegalArgumentException("Value for " + nameNodeUrlKey + " not specified");
        }
      }
    }
  }

  public  HdfsClient(String serviceName, Map<String,String> connectionProperties);

}