Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
METRON-1145: Profiler mpack does not create kafka acl and hbase acls …
Browse files Browse the repository at this point in the history
…correctly in kerberized cluster closes #726
  • Loading branch information
cestella committed Aug 31, 2017
1 parent 38eebd5 commit 31d99f1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Expand Up @@ -98,6 +98,10 @@ def create_hbase_tables(self):
Logger.info("Done creating HBase Tables")
self.set_hbase_configured()

def init_kafka_acls(self):
Logger.info('Creating Kafka ACls for profiler')
metron_service.init_kafka_acls(self.__params, [self.__profiler_topic], ['profiler'])

def set_hbase_acls(self):
Logger.info("Setting HBase ACLs")
if self.__params.security_enabled:
Expand Down
Expand Up @@ -27,6 +27,7 @@

from metron_security import storm_security_setup
import metron_service
import metron_security
from profiler_commands import ProfilerCommands


Expand Down Expand Up @@ -59,6 +60,9 @@ def configure(self, env, upgrade_type=None, config_dir=None):
commands.create_hbase_tables()
if params.security_enabled and not commands.is_hbase_acl_configured():
commands.set_hbase_acls()
if params.security_enabled and not commands.is_acl_configured():
commands.init_kafka_acls()
commands.set_acl_configured()

Logger.info("Calling security setup")
storm_security_setup(params)
Expand All @@ -68,6 +72,18 @@ def start(self, env, upgrade_type=None):
env.set_params(params)
self.configure(env)
commands = ProfilerCommands(params)
if params.security_enabled:
metron_security.kinit(params.kinit_path_local,
params.metron_keytab_path,
params.metron_principal_name,
execute_user=params.metron_user)

if params.security_enabled and not commands.is_hbase_acl_configured():
commands.set_hbase_acls()
if params.security_enabled and not commands.is_acl_configured():
commands.init_kafka_acls()
commands.set_acl_configured()

commands.start_profiler_topology(env)

def stop(self, env, upgrade_type=None):
Expand Down

0 comments on commit 31d99f1

Please sign in to comment.