HBASE-25891 Remove dependence on storing WAL filenames for backup (#3359)
[hbase.git] / bin / hbase-config.cmd
blob3b7b713abfd21086054a1921580cdb95ab93eef0
1 @rem/*
2 @rem * Licensed to the Apache Software Foundation (ASF) under one
3 @rem * or more contributor license agreements. See the NOTICE file
4 @rem * distributed with this work for additional information
5 @rem * regarding copyright ownership. The ASF licenses this file
6 @rem * to you under the Apache License, Version 2.0 (the
7 @rem * "License"); you may not use this file except in compliance
8 @rem * with the License. You may obtain a copy of the License at
9 @rem *
10 @rem * http://www.apache.org/licenses/LICENSE-2.0
11 @rem *
12 @rem * Unless required by applicable law or agreed to in writing, software
13 @rem * distributed under the License is distributed on an "AS IS" BASIS,
14 @rem * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 @rem * See the License for the specific language governing permissions and
16 @rem * limitations under the License.
17 @rem */
19 @rem included in all the hbase scripts with source command
20 @rem should not be executable directly
21 @rem also should not be passed any arguments, since we need original $*
22 @rem Modelled after $HADOOP_HOME/bin/hadoop-env.sh.
24 @rem Make sure java environment is set
25 @rem
27 if "%HBASE_BIN_PATH:~-1%" == "\" (
28 set HBASE_BIN_PATH=%HBASE_BIN_PATH:~0,-1%
31 if "%1" == "--config" (
32 set HBASE_CONF_DIR=%2
33 shift
34 shift
36 if "%1" == "--help" (
37 echo Error usage! You should use it like 'hbase --help' or 'hbase -h';
38 exit /B 2
40 if "%1" == "-h" (
41 echo Error usage! You should use it like 'hbase --help' or 'hbase -h';
42 exit /B 2
45 @rem the root of the hbase installation
46 if not defined HBASE_HOME (
47 set HBASE_HOME=%HBASE_BIN_PATH%\..
50 @rem Allow alternate hbase conf dir location.
51 if not defined HBASE_CONF_DIR (
52 set HBASE_CONF_DIR=%HBASE_HOME%\conf
55 @rem List of hbase regions servers.
56 if not defined HBASE_REGIONSERVERS (
57 set HBASE_REGIONSERVERS=%HBASE_CONF_DIR%\regionservers
60 @rem List of hbase secondary masters.
61 if not defined HBASE_BACKUP_MASTERS (
62 set HBASE_BACKUP_MASTERS=%HBASE_CONF_DIR%\backup-masters
65 @rem Source the hbase-env.sh. Will have JAVA_HOME defined.
66 if exist "%HBASE_CONF_DIR%\hbase-env.cmd" (
67 call "%HBASE_CONF_DIR%\hbase-env.cmd"
70 if not defined JAVA_HOME (
71 echo Warning: JAVA_HOME environment variable is not set. Defaulting to c:\apps\java
72 set JAVA_HOME=c:\apps\java
75 if not exist "%JAVA_HOME%\bin\java.exe" (
76 echo Error: JAVA_HOME is incorrectly set or could not find java at the location %JAVA_HOME%\bin\
77 exit /B 2
80 set JAVA="%JAVA_HOME%\bin\java"
82 for %%i in (%0) do (
83 if not defined HBASE_BIN_PATH (
84 set HBASE_BIN_PATH=%%~dpi