Skip to content

[ZEPPELIN-4852]. Add name to RemoteInterpreterProcess#3785

Closed
zjffdu wants to merge 3 commits intoapache:masterfrom
zjffdu:ZEPPELIN-4852
Closed

[ZEPPELIN-4852]. Add name to RemoteInterpreterProcess#3785
zjffdu wants to merge 3 commits intoapache:masterfrom
zjffdu:ZEPPELIN-4852

Conversation

@zjffdu
Copy link
Contributor

@zjffdu zjffdu commented Jun 4, 2020

What is this PR for?

This is a trivial PR which add getInterpreterGroupId to InterpreterClient, and use interpreterGroupId as the identifier of RemoteInterpreterProcess because interpreterGroupId is also unique identifier of InterpreterGroup

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


// Shutdown connection
shutdown();
logger.info("Remote process of interpreter group: " + getInterpreterGroupId() + " is terminated");
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please make the logger 'public static final' and avoid the creation of objects if the logger is disabled for the INFO level ( LOGGER.info(String format, Object... arguments);).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

public void stop() {
if (isRunning()) {
LOGGER.info("Kill interpreter process");
LOGGER.info("Kill interpreter process for interpreter group: " + getInterpreterGroupId());
Copy link
Contributor

@Reamer Reamer Jun 4, 2020

Choose a reason for hiding this comment

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

We should avoid the creation of objects if a logging level is disabled. String concatenation creates a new String object.
This particular line should change to

LOGGER.info("Kill interpreter process for interpreter group: {}", getInterpreterGroupId());

Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

LGTM

@asfgit asfgit closed this in 2ab8f9e Jun 8, 2020
asfgit pushed a commit that referenced this pull request Jun 8, 2020
### What is this PR for?

This is a trivial PR which add `getInterpreterGroupId` to `InterpreterClient`, and use `interpreterGroupId` as the identifier of RemoteInterpreterProcess because `interpreterGroupId` is also unique identifier of InterpreterGroup

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

### Todos
* [ ] - Task

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

### 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 #3785 from zjffdu/ZEPPELIN-4852 and squashes the following commits:

01ec893 [Jeff Zhang] address comment
4fc92cc [Jeff Zhang] address comment
a482faa [Jeff Zhang] [ZEPPELIN-4852]. Add name to RemoteInterpreterProcess

(cherry picked from commit 2ab8f9e)
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.

3 participants