Skip to content

Commit

Permalink
updating to support Ambari 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
abajwa-hw committed Jul 10, 2016
1 parent 85bd3b3 commit 5eed427
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
34 changes: 20 additions & 14 deletions package/scripts/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,29 @@ def install(self, env):



#create the log dir if it not already present
Directory([status_params.nifi_pid_dir, params.nifi_log_dir],
owner=params.nifi_user,
group=params.nifi_group,
recursive=True
)
#create the log dir if it not already present - the below won't work on both Ambari 2.4 so re-writing

#Directory([status_params.nifi_pid_dir, params.nifi_log_dir],
# owner=params.nifi_user,
# group=params.nifi_group,
# recursive=True
#)

Execute('mkdir -p '+status_params.nifi_pid_dir+' '+params.nifi_log_dir)
Execute('chown -R ' + params.nifi_user + ':' + params.nifi_group + ' ' + status_params.nifi_pid_dir)
Execute('chown -R ' + params.nifi_user + ':' + params.nifi_group + ' ' + params.nifi_log_dir)

Execute('touch ' + params.nifi_log_file, user=params.nifi_user)
Execute('rm -rf ' + params.nifi_dir, ignore_failures=True)
#Execute('mkdir -p '+params.nifi_dir)
#Execute('chown -R ' + params.nifi_user + ':' + params.nifi_group + ' ' + params.nifi_dir)

Directory([params.nifi_dir],
owner=params.nifi_user,
group=params.nifi_group,
recursive=True
)

#Directory([params.nifi_dir],
# owner=params.nifi_user,
# group=params.nifi_group,
# recursive=True
#)

Execute('mkdir -p '+params.nifi_dir)
Execute('chown -R ' + params.nifi_user + ':' + params.nifi_group + ' ' + params.nifi_dir)

#User selected option to use prebuilt nifi package
if params.setup_prebuilt:
Expand Down
1 change: 0 additions & 1 deletion package/scripts/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from resource_management import *
from resource_management.libraries.script.script import Script
import sys, os, glob
from resource_management.libraries.functions.version import format_hdp_stack_version
from resource_management.libraries.functions.default import default


Expand Down

0 comments on commit 5eed427

Please sign in to comment.