greenplum使用gpinitsystem初始化系统需要的配置文件

来源:互联网 发布:mac flash显示未安装 编辑:程序博客网 时间:2024/06/06 15:53

在greenplum中使用gpinitsystem初始化集群的时候需要指定一个配置文件,里面配置一些参数的值。在安装目录下有一个文件

/opt/greenplum1/docs/cli_help/gp_init_config_example ,里面有一些参数的解释和默认值,你可以选择基于它来创建你自己的配置文件。不过有时没必要,因为里面的内容太多了。你完全可以自己指定如下几个参数就够了。

 

ARRAY_NAME
Required. A name for the array you are configuring. You can use any name you like.
Enclose the name in quotes if the name contains spaces.

SEG_PREFIX
Required. This specifies a prefix that will be used to name the data directories on the
master and segment instances. The naming convention for data directories in a
Greenplum Database system is SEG_PREFIXnumber where number starts with 0 for
segment instances (the master is always -1). So for example, if you choose the prefix
gpseg, your master instance data directory would be named gp-1, and the segment
instances would be named gpseg0, gpseg1, gpseg2, gpseg3, and so on.

PORT_BASE
Required. This specifies the base number by which primary segment port numbers
are calculated. The first primary segment port on a host is set as PORT_BASE, and
then incremented by one for each additional primary segment on that host. Valid
values range from 1 through 65535.

DATA_DIRECTORY
Required. This specifies the data storage location(s) where the utility will create the
primary segment data directories. The utility creates a unique data directory for each
segment instance. If you want multiple segment instances per host, list a data
storage area for each primary segment you want created. The recommended number
is one primary segment per CPU. It is OK to list the same data storage area multiple
times if you want your data directories created in the same location. The number of
data directory locations specified will determine the number of primary segment
instances per host. You must make sure that the user who runs gpinitsystem (for
example, the gpadmin user) has permissions to write to these directories. You may
want to create these directories on the segment hosts before running gpinitsystem
and chown them to the appropriate user. For example:
declare -a DATA_DIRECTORY=(/data1/primary /data1/primary /data1/primary /data2/primary /data2/primary /data2/primary)

MASTER_HOSTNAME
Required. The host name of the master instance. This host name must exactly match
the configured host name of the machine (run the hostname command to determine
the correct hostname).

MASTER_DIRECTORY
Required. This specifies the location where the data directory will be created on the
master host. You must make sure that the user who runs gpinitsystem (for
example, the gpadmin user) has permissions to write to this directory. You may
want to create this directory on the master host before running gpinitsystem and
chown it to the appropriate user.

MASTER_PORT
Required. The port number for the master instance. This is the port number that
users and client connections will use when accessing the Greenplum Database
system.

TRUSTED_SHELL
Required. The shell the gpinitsystem utility uses to execute commands on remote
hosts. Allowed values are ssh. You must set up your trusted host environment
before running the gpinitsystem utility (you can use gpssh-exkeys to do this).

CHECK_POINT_SEGMENTS
Required. Maximum distance between automatic write ahead log (WAL)
checkpoints, in log file segments (each segment is normally 16 megabytes). This
will set the checkpoint_segments parameter in the postgresql.conf file for
each segment instance in the Greenplum Database system.

ENCODING
Required. The character set encoding to use. This character set must be compatible
with the --locale settings used, especially --lc-collate and --lc-ctype.
Greenplum Database supports the same character sets as PostgreSQL.

原创粉丝点击