diff --git a/releasenotes/notes/hdfs-dfs-94a9c4f64cf8994f.yaml b/releasenotes/notes/hdfs-dfs-94a9c4f64cf8994f.yaml new file mode 100644 index 0000000000..1e14b9e759 --- /dev/null +++ b/releasenotes/notes/hdfs-dfs-94a9c4f64cf8994f.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + The command hdfs fs has been deprecated in favor of hdfs fs. This + fixes will allow the use of Hbase service. diff --git a/sahara/service/edp/hdfs_helper.py b/sahara/service/edp/hdfs_helper.py index b7fe194157..0942fd5ac9 100644 --- a/sahara/service/edp/hdfs_helper.py +++ b/sahara/service/edp/hdfs_helper.py @@ -39,7 +39,7 @@ def create_hbase_common_lib(r): paths = stdout.split(':') for p in paths: if p.endswith(".jar"): - r.execute_command('sudo su - -c "hdfs fs -put -p %s %s" hdfs' + r.execute_command('sudo su - -c "hdfs dfs -put -p %s %s" hdfs' % (p, HBASE_COMMON_LIB_PATH)) else: raise ex.RequiredServiceMissingException('hbase') diff --git a/sahara/tests/unit/service/edp/test_hdfs_helper.py b/sahara/tests/unit/service/edp/test_hdfs_helper.py index bd27c3dc11..6240f4b462 100644 --- a/sahara/tests/unit/service/edp/test_hdfs_helper.py +++ b/sahara/tests/unit/service/edp/test_hdfs_helper.py @@ -40,7 +40,7 @@ class HDFSHelperTestCase(base.SaharaTestCase): mock.call(('sudo su - -c "hdfs dfs -mkdir -p ' '/user/sahara-hbase-lib" hdfs')), mock.call('hbase classpath'), - mock.call(('sudo su - -c "hdfs fs -put -p may.jar ' + mock.call(('sudo su - -c "hdfs dfs -put -p may.jar ' '/user/sahara-hbase-lib" hdfs'))] self.cluster.execute_command.assert_has_calls(calls)