'The hadoop_bin_path configuration may be a non-absolute path, in which case
it\'s checked against $PATH.
If the hadoop binary can\'t be found anywhere, raises an Exception.'

def _resolve_hadoop_path(self):

    for path_dir in os.getenv('PATH', '').split(os.pathsep):
        path = os.path.join(path_dir, self.hadoop_bin_path)
        if os.path.exists(path):
            self.hadoop_bin_path = os.path.abspath(path)
            return
    raise OSError(errno.ENOENT, ('Hadoop    binary    (%s)    does    not    exist.' % (self.hadoop_bin_path,)))
