Skip to content

Commit c7a6111

Browse files
authored
Don't try to push application.properties into a jar for python streaming apps
PNDA-3038
1 parent c6de5c4 commit c7a6111

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/src/main/resources/plugins/sparkStreaming.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ def create_component(self, staged_component_path, application_name, component, p
132132
['sudo mkdir -p %s' % remote_component_install_path,
133133
'sudo mv %s %s' % (remote_component_tmp_path + '/log4j.properties', remote_component_install_path + '/log4j.properties')])
134134

135+
if 'component_main_py' in properties:
136+
main_jar_name = None
135137
if 'component_main_jar' in properties:
136138
main_jar_name = properties['component_main_jar']
137139
else:
@@ -141,7 +143,8 @@ def create_component(self, staged_component_path, application_name, component, p
141143
commands.append('sudo cp %s/%s %s' % (remote_component_tmp_path, service_script, service_script_install_path))
142144
commands.append('sudo cp %s/* %s' % (remote_component_tmp_path, remote_component_install_path))
143145
commands.append('sudo chmod a+x %s/yarn-kill.py' % (remote_component_install_path))
144-
commands.append('cd %s && sudo jar uf %s application.properties' % (remote_component_install_path, main_jar_name))
146+
if main_jar_name is not None:
147+
commands.append('cd %s && sudo jar uf %s application.properties' % (remote_component_install_path, main_jar_name))
145148
commands.append('sudo rm -rf %s' % (remote_component_tmp_path))
146149
deployer_utils.exec_ssh(target_host, root_user, key_file, commands)
147150

0 commit comments

Comments
 (0)