Skip to content

Conversation

@FangYongs
Copy link
Contributor

What is the purpose of the change

Port JarListHandler to WebMonitorEndpoint

Brief change log

  • Create JarWithProgramUtils from PackageProgram to check jar file
  • Create new JarListHandler and JarListInfo
  • Add uploadDir to RestHandlerConfiguration

Verifying this change

This change added tests and can be verified as follows:

  • Added test case JarListInfoTest

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

Copy link
Member

@GJL GJL left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution to Flink @zjureel! I left a comment about the duplicated code from PackagedProgram. Also I think that we should implement and merge FLINK-7713 first so that we are able verify the functionality end-to-end. Let me know what you think.

/**
* Jar file validation tool class for {@link Program}.
*/
public class JarWithProgramUtils {
Copy link
Member

@GJL GJL Jan 10, 2018

Choose a reason for hiding this comment

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

I can see that you had to copy a lot of code from PackagedProgram because flink-runtime does not have a dependency on flink-clients. Also, JobWithJars had to be moved to the flink-runtime module. I think we should try to avoid duplicating the code in PackagedProgram.

After talking to @tillrohrmann offline, we think that we could achieve this by putting the new JarUploadHandler into the flink-runtime-web module. This module already has a dependency to flink-clients and flink-runtime. In WebMonitorEndpoint, the jar handlers could be dynamically loaded according to whether flink-runtime-web is in the classpath or not; similar to the StaticFileServerHandler (see WebMonitorUtils.tryLoadWebContent()).

What do you think?

GJL added a commit to GJL/flink that referenced this pull request Feb 14, 2018
GJL added a commit to GJL/flink that referenced this pull request Feb 14, 2018
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Feb 15, 2018
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Feb 15, 2018
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Feb 16, 2018
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Feb 16, 2018
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Feb 16, 2018
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Feb 16, 2018
@asfgit asfgit closed this in 4e6d22b Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants