Skip to content

[ZEPPELIN-4851]. Add property to flink interpreter to allow replace the yarn address#3797

Closed
zjffdu wants to merge 1 commit intoapache:masterfrom
zjffdu:ZEPPELIN-4851
Closed

[ZEPPELIN-4851]. Add property to flink interpreter to allow replace the yarn address#3797
zjffdu wants to merge 1 commit intoapache:masterfrom
zjffdu:ZEPPELIN-4851

Conversation

@zjffdu
Copy link
Contributor

@zjffdu zjffdu commented Jun 11, 2020

What is this PR for?

Trivial PR which add property flink.webui.yarn.yarnAddress that allow user to replace the yarn address. This is for some cases that cloud vender would map the internal resource manager address to other url. e.g. some cloud vender will map http://resource-manager:8088 to https://xxx-yarn.yy.cn/gateway/kkk/yarn

What type of PR is it?

[Improvement]

Todos

  • - Task

What is the Jira issue?

How should this be tested?

  • CI pass

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? no
  • Is there breaking changes for older versions? no
  • Does this needs documentation? no

}

private def replaceYarnAddress(webURL: String, yarnAddress: String): String = {
val pattern = "(http://.*:\\d+)(/.*)".r
Copy link
Contributor

Choose a reason for hiding this comment

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

I maybe would change it to the to parsing of webURL into URL or URI, and construction of the new object, but with changed components.
Also it won't handle https schema, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexott URL doesn't expose set method. So it is not easy to construct URL with components, however I fixed the https issue and also add unit tests

@asfgit asfgit closed this in 2b505dc Jun 17, 2020
asfgit pushed a commit that referenced this pull request Jun 17, 2020
…he yarn address

### What is this PR for?

Trivial PR which add property `flink.webui.yarn.yarnAddress` that allow user to replace the yarn address. This is for some cases that cloud vender would map the internal resource manager address to other url. e.g. some cloud vender will map `http://resource-manager:8088` to `https://xxx-yarn.yy.cn/gateway/kkk/yarn`

### What type of PR is it?
[Improvement]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4851

### How should this be tested?
* CI pass

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Jeff Zhang <zjffdu@apache.org>

Closes #3797 from zjffdu/ZEPPELIN-4851 and squashes the following commits:

c1be762 [Jeff Zhang] [ZEPPELIN-4851]. Add property to flink interpreter to allow replace the yarn address

(cherry picked from commit 2b505dc)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants