code: def mkdir(self, path, parents=True, raise_if_exists=False):
          
          try:
              self.call_check(load_hadoop_cmd() + ['fs', '-mkdir', path])
          except hdfs_error.HDFSCliError as ex:
              if "File exists" in ex.stderr:
                  if raise_if_exists:
                      raise FileAlreadyExists(ex.stderr)
              else:
                  raise
docs: No explicit -p switch, this version of Hadoop always creates parent directories.