You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/11/19 14:48:50 UTC

[GitHub] [incubator-doris] hf200012 opened a new pull request #7167: [optimize]Add Doris restart script, optimize doris start and stop commands

hf200012 opened a new pull request #7167:
URL: https://github.com/apache/incubator-doris/pull/7167


   Add Doris restart script, optimize doris start and stop commands
   
   Can be used directly:
   
   ```
   sh bin/doris_fe.sh start | stop | restart
   sh bin/doris_be.sh start | stop | restart
   ```
   ## Proposed changes
   
   Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [ ] Optimization. Including functional usability improvements and performance improvements.
   - [ ] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [ ] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] hf200012 commented on a change in pull request #7167: [optimize]Add Doris restart script, optimize doris start and stop commands

Posted by GitBox <gi...@apache.org>.
hf200012 commented on a change in pull request #7167:
URL: https://github.com/apache/incubator-doris/pull/7167#discussion_r756983828



##########
File path: build.sh
##########
@@ -327,6 +327,7 @@ if [ ${BUILD_BE} -eq 1 ]; then
                ${DORIS_OUTPUT}/udf/include
 
     cp -r -p ${DORIS_HOME}/be/output/bin/* ${DORIS_OUTPUT}/be/bin/
+    cp -r -p ${DORIS_HOME}/bin/doris_be.sh ${DORIS_OUTPUT}/be/bin/

Review comment:
       Missed one




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #7167: [optimize]Add Doris restart script, optimize doris start and stop commands

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #7167:
URL: https://github.com/apache/incubator-doris/pull/7167#discussion_r756975635



##########
File path: bin/doris_be.sh
##########
@@ -0,0 +1,76 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+export DORIS_HOME=`cd "$curdir"; pwd`
+export PID_DIR=`cd "$curdir"; pwd`
+function start() {
+    echo "Starting Apache Doris Frontend"
+    sh $DORIS_HOME/bin/start_be.sh --daemon
+    if [ -f "$DORIS_HOME/bin/be.pid" ]; then
+       echo "Apache Doris Backend start fail!"
+    else
+      sleep 1s
+      pid=`cat $DORIS_HOME/bin/be.pid`
+      echo "Doris Be pid : ${pid}"
+      echo "Apache Doris Backend start success!"
+    fi
+}
+
+function stop() {
+    echo "stop Apache Doris Frontend"

Review comment:
       ```suggestion
       echo "stop Apache Doris Backend"
   ```

##########
File path: bin/doris_be.sh
##########
@@ -0,0 +1,76 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+export DORIS_HOME=`cd "$curdir"; pwd`
+export PID_DIR=`cd "$curdir"; pwd`
+function start() {
+    echo "Starting Apache Doris Frontend"

Review comment:
       ```suggestion
       echo "Starting Apache Doris Backend"
   ```

##########
File path: build.sh
##########
@@ -327,6 +327,7 @@ if [ ${BUILD_BE} -eq 1 ]; then
                ${DORIS_OUTPUT}/udf/include
 
     cp -r -p ${DORIS_HOME}/be/output/bin/* ${DORIS_OUTPUT}/be/bin/
+    cp -r -p ${DORIS_HOME}/bin/doris_be.sh ${DORIS_OUTPUT}/be/bin/

Review comment:
       missing FE?

##########
File path: bin/doris_be.sh
##########
@@ -0,0 +1,76 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+export DORIS_HOME=`cd "$curdir"; pwd`
+export PID_DIR=`cd "$curdir"; pwd`
+function start() {
+    echo "Starting Apache Doris Frontend"
+    sh $DORIS_HOME/bin/start_be.sh --daemon
+    if [ -f "$DORIS_HOME/bin/be.pid" ]; then
+       echo "Apache Doris Backend start fail!"
+    else
+      sleep 1s
+      pid=`cat $DORIS_HOME/bin/be.pid`
+      echo "Doris Be pid : ${pid}"
+      echo "Apache Doris Backend start success!"

Review comment:
       ```suggestion
         echo "Apache Doris Backend successfully started!"
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #7167: [optimize]Add Doris restart script, optimize doris start and stop commands

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #7167:
URL: https://github.com/apache/incubator-doris/pull/7167#discussion_r754179070



##########
File path: bin/doris_be.sh
##########
@@ -0,0 +1,61 @@
+#!/bin/bash

Review comment:
       License header.

##########
File path: bin/doris_be.sh
##########
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+export DORIS_HOME=`cd "$curdir"; pwd`
+export LOG_DIR=${DORIS_HOME}/log

Review comment:
       the `LOG_DIR` should read from config file.

##########
File path: bin/doris_be.sh
##########
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+export DORIS_HOME=`cd "$curdir"; pwd`
+export LOG_DIR=${DORIS_HOME}/log
+export PID_DIR=`cd "$curdir"; pwd`
+function start() {
+    echo "Starting Apache Doris Frontend"
+    sh $DORIS_HOME/bin/start_be.sh --daemon
+    if [ -f "$DORIS_HOME/bin/be.pid" ]; then
+       echo "Apache Doris Backend start fail!"
+    else
+      sleep 1s
+      pid=`cat $DORIS_HOME/bin/be.pid`
+      echo "Doris Be pid : ${pid}"
+      echo `sed -n '$p' $DORIS_HOME/log/be.out`
+      echo "Apache Doris Backend start success!"
+    fi
+}
+
+function stop() {
+    echo "stop Apache Doris Frontend"
+    sh $DORIS_HOME/bin/stop_be.sh
+    if [ -f "$DORIS_HOME/bin/be.pid" ]; then
+       echo "Apache Doris Backend stop fail!"
+    else
+       echo "Apache Doris Backend stop success!"
+    fi
+}
+
+function restart() {
+    echo "Restart Apache Doris Backend"
+    echo "****************************"
+    echo "Ready to stop Doris Backend"
+    stop

Review comment:
       The process may be in defunct status for a long time, so start right after stop may failed to start BE process.

##########
File path: bin/doris_be.sh
##########
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+export DORIS_HOME=`cd "$curdir"; pwd`
+export LOG_DIR=${DORIS_HOME}/log
+export PID_DIR=`cd "$curdir"; pwd`
+function start() {
+    echo "Starting Apache Doris Frontend"
+    sh $DORIS_HOME/bin/start_be.sh --daemon
+    if [ -f "$DORIS_HOME/bin/be.pid" ]; then
+       echo "Apache Doris Backend start fail!"
+    else
+      sleep 1s
+      pid=`cat $DORIS_HOME/bin/be.pid`
+      echo "Doris Be pid : ${pid}"
+      echo `sed -n '$p' $DORIS_HOME/log/be.out`

Review comment:
       the log dir may be elsewhere




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] hf200012 commented on a change in pull request #7167: [optimize]Add Doris restart script, optimize doris start and stop commands

Posted by GitBox <gi...@apache.org>.
hf200012 commented on a change in pull request #7167:
URL: https://github.com/apache/incubator-doris/pull/7167#discussion_r756986723



##########
File path: build.sh
##########
@@ -327,6 +327,7 @@ if [ ${BUILD_BE} -eq 1 ]; then
                ${DORIS_OUTPUT}/udf/include
 
     cp -r -p ${DORIS_HOME}/be/output/bin/* ${DORIS_OUTPUT}/be/bin/
+    cp -r -p ${DORIS_HOME}/bin/doris_be.sh ${DORIS_OUTPUT}/be/bin/

Review comment:
       > 
   cp -r -p ${DORIS_HOME}/bin/*_fe.sh ${DORIS_OUTPUT}/fe/bin/




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org