def mkdir(hdfs_path, user=None):
host, port, path_ = path.split(hdfs_path, user)<EOL>fs = hdfs(host, port, user)<EOL>retval = fs.create_directory(path_)<EOL>fs.close()<EOL>return retval<EOL>
Create a directory and its parents as needed.