Browse Source

When Impala editor is not installed, then the importer fails to get the USER_SCRATCH_DIR_PERMISSION from impala conf. (#2915)

Jira: CDPD-41666
Mahesh Balakrishnan 3 years ago
parent
commit
ca1d9537db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/libs/indexer/src/indexer/indexers/sql.py

+ 1 - 1
desktop/libs/indexer/src/indexer/indexers/sql.py

@@ -170,7 +170,7 @@ class SQLIndexer(object):
         user_scratch_dir = self.fs.get_home_dir() + '/.scratchdir/%s' % str(uuid.uuid4()) # Make sure it's unique.
         self.fs.do_as_user(self.user, self.fs.mkdir, user_scratch_dir, 0o0777)
         self.fs.do_as_user(self.user, self.fs.rename, source['path'], user_scratch_dir)
-        if USER_SCRATCH_DIR_PERMISSION.get():
+        if editor_type == 'impala' and USER_SCRATCH_DIR_PERMISSION.get():
           self.fs.do_as_user(self.user, self.fs.chmod, user_scratch_dir, 0o0777, True)
         source_path = user_scratch_dir + '/' + source['path'].split('/')[-1]