'Set the maximum number of files of a given path.
@param path The path to the given hdfs resource
@param num_files The amount of files that can exist within that subtree.'

@_coerce_exceptions
def set_namespace_quota(self, path, num_files):

    path = encode_fs_path(path)
    if (normpath(path) == '/'):
        raise ValueError('Cannot    set    quota    for    "/"')
    if (num_files < 0):
        raise ValueError('The    number    of    files    quota    should    be    0    or    positive    or    unset')
    self.nn_client.setQuota(self.request_context, normpath(path), num_files, QUOTA_DONT_SET)
