# 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. # ############################################################################ import os import subprocess import sys import phoenix_utils phoenix_utils.setPath() args = phoenix_utils.shell_quote(sys.argv[1:]) # HBase configuration folder path (where hbase-site.xml reside) for # HBase/Phoenix client side property override hbase_config_path = os.getenv('HBASE_CONF_DIR', phoenix_utils.current_dir) java_home = os.getenv('JAVA_HOME') # load hbase-env.??? to extract JAVA_HOME, HBASE_PID_DIR, HBASE_LOG_DIR hbase_env_path = None hbase_env_cmd = None if os.name == 'posix': hbase_env_path = os.path.join(hbase_config_path, 'hbase-env.sh') hbase_env_cmd = ['bash', '-c', 'source %s && env' % hbase_env_path]
import os.path import signal import subprocess import sys import tempfile try: import daemon daemon_supported = True except ImportError: # daemon script not supported on some platforms (windows?) daemon_supported = False import phoenix_utils phoenix_utils.setPath() command = None args = sys.argv if len(args) > 1: if args[1] == 'start': command = 'start' elif args[1] == 'stop': command = 'stop' elif args[1] == 'makeWinServiceDesc': command = 'makeWinServiceDesc' if command: args = args[2:] if os.name == 'nt':