HBASE-20364 ensure jira comment from nightly reflects results of run comment comes...
[hbase.git] / bin / stop-hbase.cmd
blob97180554b5806c20e4cba5401fe644b281475709
1 @echo off
2 @rem/**
3 @rem * Licensed to the Apache Software Foundation (ASF) under one
4 @rem * or more contributor license agreements. See the NOTICE file
5 @rem * distributed with this work for additional information
6 @rem * regarding copyright ownership. The ASF licenses this file
7 @rem * to you under the Apache License, Version 2.0 (the
8 @rem * "License"); you may not use this file except in compliance
9 @rem * with the License. You may obtain a copy of the License at
10 @rem *
11 @rem * http://www.apache.org/licenses/LICENSE-2.0
12 @rem *
13 @rem * Unless required by applicable law or agreed to in writing, software
14 @rem * distributed under the License is distributed on an "AS IS" BASIS,
15 @rem * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 @rem * See the License for the specific language governing permissions and
17 @rem * limitations under the License.
18 @rem */
20 @rem Modelled after $HADOOP_HOME/bin/stop-hbase.sh.
22 @rem Stop hadoop hbase daemons. Run this on master node.
24 setlocal
26 for %%i in (%0) do (
27 if not defined HBASE_BIN_PATH (
28 set HBASE_BIN_PATH=%%~dpi
32 if "%HBASE_BIN_PATH:~-1%" == "\" (
33 set HBASE_BIN_PATH=%HBASE_BIN_PATH:~0,-1%
35 set hbase-config-script=%HBASE_BIN_PATH%\hbase-config.cmd
36 call %hbase-config-script%
38 set distModeCommand=call %HBASE_BIN_PATH%\hbase.cmd org.apache.hadoop.hbase.util.HBaseConfTool hbase.cluster.distributed
39 for /f %%i in ('%distModeCommand%') do set distMode=%%i
41 if "%distMode%"=="false" (
42 call %HBASE_BIN_PATH%\hbase.cmd master stop
44 ) else (
45 if "%distMode%"=="true" (
46 @echo This is not implemented yet. Stay tuned.
47 ) else (
48 echo ERROR: Could not determine the startup mode.
52 @rem -------------- End of main script --------------
53 endlocal
54 goto :eof