def configure(self, env): from params import azkaban_db, azkaban_web_properties, azkaban_users, global_properties, log4j_properties key_val_template = '{0}={1}\n' with open(path.join(AZKABAN_CONF, 'azkaban.properties'), 'w') as f: for key, value in azkaban_db.iteritems(): f.write(key_val_template.format(key, value)) for key, value in azkaban_web_properties.iteritems(): if key != 'content': f.write(key_val_template.format(key, value)) #f.write(azkaban_web_properties['content']) if azkaban_web_properties.has_key('content'): f.write(str(azkaban_web_properties['content'])) with open(path.join(AZKABAN_CONF, 'azkaban-users.xml'), 'w') as f: if azkaban_users.has_key('content'): f.write(str(azkaban_users['content'])) with open(path.join(AZKABAN_CONF, 'global.properties'), 'w') as f: #f.write(global_properties['content']) if global_properties.has_key('content'): f.write(str(global_properties['content'])) with open(path.join(AZKABAN_CONF, 'log4j.properties'), 'w') as f: #f.write(log4j_properties['content']) if log4j_properties.has_key('content'): f.write(str(log4j_properties['content']))
def configure(self, env): from params import azkaban_executor_properties, log4j_properties, azkaban_db key_val_template = '{0}={1}\n' with open(path.join(AZKABAN_EXE_CONF, 'azkaban.properties'), 'w') as f: for key, value in azkaban_db.iteritems(): f.write(key_val_template.format(key, value)) for key, value in azkaban_executor_properties.iteritems(): if key != 'content': f.write(key_val_template.format(key, value)) f.write(azkaban_executor_properties['content']) with open(path.join(AZKABAN_EXE_CONF, 'log4j.properties'), 'w') as f: f.write(log4j_properties['content'])