Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUBMARINE-192] Submarine workbench server daemon shell script #20

Closed
wants to merge 2 commits into from

Conversation

xunliu
Copy link
Member

@xunliu xunliu commented Sep 28, 2019

What is this PR for?

Increase the Submarine workbench server daemon script,
Support to start, stop, restart the submarine workbench server through submarine-daemon.sh

./bin/workbench-daemon.sh [start|stop|restart]

What type of PR is it?

[Feature]

What is the Jira issue?

How should this be tested?

Screenshots (if appropriate)

workbench-daemon-sh

Questions:

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

bin/common.sh Outdated

WORKBENCH_CLASSPATH+=":${SUBMARINE_CONF_DIR}"

function addEachJarInDir(){
Copy link
Member

Choose a reason for hiding this comment

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

Refer the Google Style (Function Names), it's' not acceptable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

echo "${WORKBENCH_NAME} is restarting" >> "${WORKBENCH_LOGFILE}"
stop
start
;;
Copy link
Member

Choose a reason for hiding this comment

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

What's the difference between reload and start command?

Copy link
Member Author

Choose a reason for hiding this comment

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

No different, So i delete reload commond.

}

function foundWorkbenchServerPid() {
process=WorkbenchServer;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
process=WorkbenchServer;
process='WorkbenchServer';

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.


function foundWorkbenchServerPid() {
process=WorkbenchServer;
RUNNING_PIDS=$(ps x | grep $process | grep -v grep | awk '{print $1}');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
RUNNING_PIDS=$(ps x | grep $process | grep -v grep | awk '{print $1}');
RUNNING_PIDS=$(ps x | grep ${process} | grep -v grep | awk '{print $1}');

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@xunliu
Copy link
Member Author

xunliu commented Sep 28, 2019

@jiwq , thank you advise.

@asfgit asfgit closed this in 5053e66 Sep 29, 2019
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.

None yet

2 participants