From 0d993ce7f31beee57a03bd49c7b233695ebba2be Mon Sep 17 00:00:00 2001 From: Sina Sohangir Date: Thu, 1 Jan 2015 17:16:07 +0330 Subject: [PATCH] Fixed a bug in finding the streaming jar file --- .gitignore | 4 +++- hadoopy/_runner.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 17c47c1..49775a4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ play/*.tb hadoopy/thirdparty/pyinstaller/config.dat build/ -tests/frozen \ No newline at end of file +tests/frozen +dist/ +hadoopy.egg-info/ diff --git a/hadoopy/_runner.py b/hadoopy/_runner.py index 1b03d01..d9f1ef4 100644 --- a/hadoopy/_runner.py +++ b/hadoopy/_runner.py @@ -52,7 +52,7 @@ def _find_hstreaming(): search_root = os.environ['HADOOP_HOME'] except KeyError: search_root = '/' - cmd = 'find %s -name hadoop*streaming*.jar' % (search_root) + cmd = 'find %s -regex .*/hadoop\-streaming\-[0-9\.]*\.jar' % (search_root) p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) HADOOP_STREAMING_PATH_CACHE = p.communicate()[0].split('\n')[0]