Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

add option to pass any additional classpath while launching a topology #1245

Merged
merged 5 commits into from Aug 29, 2016

Conversation

kramasamy
Copy link
Contributor

Needed for schedulers for YARN - might be useful later for others as well.

@ashvina
Copy link
Contributor

ashvina commented Aug 11, 2016

👍 Thanks for this contribution
I tested the classpath on local yarn cluster by adding YARN jars and config xml files. It worked as expected. There is no need to copy jars anymore. I also tested with by adding heron:submit:* --extra-launch-classpath <value> to .heronrc

@@ -54,7 +54,7 @@ def heron_class(class_name, lib_jars, extra_jars=None, args=None, java_defines=N
# the java opts must be passed as part of the list
all_args = [config.get_java_path(), "-client", "-Xmx1g"] + \
java_opts + \
["-cp", config.get_classpath(lib_jars + extra_jars)]
["-cp", config.get_classpath(extra_jars + lib_jars)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em.. why switching order here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because the user defined class path should come earlier than the system or heron class path.

cheers
/karthik

On Aug 15, 2016, at 9:36 AM, Mark Li notifications@github.com wrote:

In heron/cli/src/python/execute.py #1245 (comment):

@@ -54,7 +54,7 @@ def heron_class(class_name, lib_jars, extra_jars=None, args=None, java_defines=N

the java opts must be passed as part of the list

all_args = [config.get_java_path(), "-client", "-Xmx1g"] +
java_opts + \

  •         ["-cp", config.get_classpath(lib_jars + extra_jars)]
    
  •         ["-cp", config.get_classpath(extra_jars + lib_jars)]
    
    em.. why switching order here?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/twitter/heron/pull/1245/files/88942cede245a9d6f1442e04388dc3189772eebc#r74790579, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWcRNhbHFyTSRI-xhUmTgJWpuh1-4Uaks5qgJWcgaJpZM4Jh24I.

@objmagic
Copy link
Contributor

👍


# check if the class path file exists
Log.debug('Checking class path file: %s', path)
if os.path.isfile(path):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The classpath entry can be a directory also. For e.g. dir of hadoop config xml files. This check fails for a directory.

@ashvina
Copy link
Contributor

ashvina commented Aug 29, 2016

👍 LGTM
I tested on a local yarn cluster. Incorrect paths are flagged correctly.

@kramasamy kramasamy merged commit c22fe0f into master Aug 29, 2016
@maosongfu maosongfu deleted the karthik/launchclasspath branch August 30, 2016 23:32
nicknezis pushed a commit that referenced this pull request Sep 14, 2020
#1245)

* add option to pass any additional classpath while launching a topology - needed for YARN, extra jars comes ahead of the lib jars, validate classpath for existence and include checking of directory for classpath
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants