启动OushuDB有两种形式,一种是通过”hawq start cluster”命令来启动整个集群,包含master和segment。启动哪些segment是由”/hawq-install-path/etc/slaves”中蕴含的节点确定的。

source /usr/local/hawq/greenplum_path.sh # 设置OushuDB环境变量hawq start cluster # 启动整个OushuDB集群

另外一种形式是别离启动OushuDB master和segment。因为OushuDB master和segment是解耦合的,别离启动master和segment是可行的。

hawq start master # 启动master,指的是启动本地masterhawq start segment # 启动segment,指的是启动本地segment

重新启动或者进行OushuDB也有两种形式:

# 形式一hawq restart cluster # 重启OushuDB集群hawq stop cluster # 进行OushuDB集群# 形式二hawq restart master # 重启本机的OushuDB masterhawq restart segment # 重启本机的OushuDB segmenthawq stop master # 进行本机OushuDB masterhawq stop segment # 进行本机OushuDB segment

启动/进行Magma

OushuDB4.0 实现了独自起停Magma服务,具体命令如下:

# 形式一 OushuDB4.0 集群起停带Magma服务 [只有hawq init|start|stop cluster命令能够带--with_magma选项]hawq init cluster --with_magma # 启动OushuDB集群时,应用--with_magma选项,同时启动Magma服务, 3.X版本不反对。# 形式二 Magma服务独自起停magma start|stop|restart clustermagma start|stop|restart node

对于OushuDB hawq命令的具体用法,能够通过”hawq –help”命令失去。

 changlei:build ChangLei$ hawq --help usage: hawq <command> [<object>] [options]         [--version]The most commonly used hawq "commands" are:start         Start hawq service.stop          Stop hawq service.init          Init hawq service.restart       Restart hawq service.activate      Activate hawq standby master as master.version       Show hawq version information.config        Set hawq GUC values.state         Show hawq cluster status.filespace     Create hawq filespaces.extract       Extract table metadata into a YAML formatted file.load          Load data into hawq.scp           Copies files between multiple hosts at once.ssh           Provides ssh access to multiple hosts at once.ssh-exkeys    Exchanges SSH public keys between hosts.check         Verifies and validates HAWQ settings.checkperf     Verifies the baseline hardware performance of hosts.register      Register parquet files generated by other system into the corrsponding table in HAWQSee 'hawq <command> help' for more information on a specific command.