• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
导航菜单
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx
您的位置:首页 > 服务器 >云计算 > Greenplum+Hadoop学习笔记-14-定义数据库对象之创建与管理表空间,hadoop-14-

Greenplum+Hadoop学习笔记-14-定义数据库对象之创建与管理表空间,hadoop-14-

作者:网友 字体:[增加 减小] 来源:互联网

本文主要包含Greenplum+Hadoop学习笔记-14-定义数据库对象之创建与管理表空间,hadoop-14-等服务器相关知识,网友希望可以进行参考

Greenplum+Hadoop学习笔记-14-定义数据库对象之创建与管理表空间,hadoop-14-


6.2.创建与管理表空间

表空间建立在文件空间之上,文件空间建立在一系列文件系统之上。关于gpfilespace的所有说明如下所示:

 

[gpadmin@master gpfs]$ gpfilespace --help

COMMAND NAME: gpfilespace

 

Creates a filespace using a configuration file that defines per-segment file system locations. Filespaces describe the physical file system resources to be used by a tablespace.

*****************************************************

SYNOPSIS

*****************************************************

 

gpfilespace [<connection_option> ...] [-l <logfile_directory>]  [-o [<output_fs_config_file>]]

 

gpfilespace [<connection_option> ...] [-l <logfile_directory>]    -c <fs_config_file>

 

gpfilespace movetempfilespace {<filespace_name>|default}

 

gpfilespace movetransfilespace {<filespace_name>|default}

 

gpfilespace --showtempfilespace

 

gpfilespace --showtransfilespace

 

gpfilespace -v | -?

*****************************************************

DESCRIPTION

*****************************************************

 

A tablespace requires a file system location to store its database files. In Greenplum Database, the master and each segment (primary and mirror) needs its own distinct storage location. This collection of file system locations for all components in a Greenplum system is referred to as a filespace. Once a filespace is defined, it can be used by one or more tablespaces.

 

When used with the -o option, the gpfilespace utility looks up your system configuration information in the Greenplum Database catalog tables and prompts you for the appropriate file system locations needed to create the filespace. It then outputs a configuration file that can be used to create a filespace. If a file name is

not specified, a gpfilespace_config_<#> file will be created in the current directory by default. 

 

Once you have a configuration file, you can run gpfilespace with the -c option to create the filespace in Greenplum Database.

 

You will need to create a filespace before you can use the gpfilespace --movetempfilespace or --movetransfilespace option to move your temporary or transaction files to the new location.

 

Use either gpfilespace --showtempfilespace or --showtransfilespace options to show the name of the filespace currently associated with temporary or transaction files.

 

Note: If segments are down due to a power or nic failure, you may see inconsistencies during filespace creation. You may not be able to bring up the Greenplum Database.

 

 

*****************************************************

OPTIONS

*****************************************************

 

-c | --config <fs_config_file>

 

 A configuration file containing:

 * An initial line denoting the new filespace name. For example: filespace:myfs

 * One line each for the master, the primary segments, and the    mirror segments. A line describes a file system location that  a particular segment database instance should use as its data  directory location to store database files associated with a  tablespace. Each line is in the format of:

   <hostname>:<dbid>:/<filesystem_dir>/<seg_datadir_name>

 

 

-l | --logdir <logfile_directory>

 The directory to write the log file. Defaults to ~/gpAdminLogs.

-o | --output <output_file_name>

 The directory location and file name to output the generated  filespace configuration file. You will be prompted to enter a  name for the filespace, a master file system location, the primary segment file system locations, and the mirror segment file system locations. For example, if your configuration has  2 primary and 2 mirror segments per host, you will be prompted for a total of 5 locations (including the master). The file system locations must exist on all hosts in your system prior  to running the gpfilespace utility. The utility will designate  segment-specific data directories within the location(s) you  specify, so it is possible to use the same location for multiple  segments. However, primaries and mirrors cannot use the same  location. After the utility creates the configuration file, you  can manually edit the file to make any required changes to the  filespace layout before creating the filespace in Greenplum Database.

 

--movetempfilespace {<filespace_name>|default}

 

 Moves temporary files to a new filespace or to the default location.

 

--movetransfilespace {<filespace_name>|default}

 

 Moves transaction files to a new filespace or to the default location.

 

--showtempfilespace

 

 Show the name of the filespace currently associated with temporary  files. This option checks that all primary and mirror segments, master  and master standby are using the same filespace or temporary files.You will receive a warning message and an email if any inconsistencies  exist.

 

--showtransfilespace

 

 Show the name of the filespace currently associated with transaction  files. This option checks that all primary and mirror segments, master  and master standby are using the same filespace or transaction files. You will receive a warning message and an email if any inconsistencies exist.

 

-v | --version (show utility version)

 

 Displays the version of this utility.

 

 

-? | --help (help)

 

 Displays the utility usage and syntax.

 

****************************

CONNECTION OPTIONS

****************************

 

-h host | --host host

 

 The host name of the machine on which the Greenplum master  database server is running. If not specified, reads from  the environment variable PGHOST or defaults to localhost.

 

-p port | --port port

 

 The TCP port on which the Greenplum master database server is listening for connections. If not specified, reads from  the environment variable PGPORT or defaults to 5432.

 

 

-U username | --username superuser_name

 

 The database superuser role name to connect as. If not specified, reads from the environment variable PGUSER or  defaults to the current system user name. Only database  superusers are allowed to create filespaces.

 

 

-W | --password

 

 Force a password prompt.

 

 

*****************************************************

EXAMPLES

*****************************************************

 

Create a filespace configuration file. You will be prompted to enter a name for the filespace, a master file system location, the primary segment file system locations, and the mirror segment file system locations. For example, if your configuration has 2 primary and 2 mirror segments per host, you will be prompted for a total of 5 locations

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Greenplum+Hadoop学习笔记-14-定义数据库对象之创建与管理表空间,hadoop-14-

相关文章

  • [Hive]Hive分区表新增字段,hive分区表新增字段
  • zookeeper——分布式锁,zookeeper
  • Nodejs课堂笔记-第四课 Dynamodb为何物,nodejsdynamodb
  • R.net获取R中股票的dataframe中的data,r.netdataframe
  • 整理得很全面的Nginx学习资源,nginx学习资源
  • 分布式系列,分布式系统
  • AMQP server on c ontroller:5672 is unreachable: [Errno 113] EHOSTUNREACH. Trying again in 2 seconds.,ehostunreach
  • 《4》CentOS7.0+OpenStack+kvm云平台部署—配置Nova,《4》kvm
  • Hadoop之——搭建ZooKeeper服务器集群,hadoopzookeeper
  • Hbase详解—–管理 Splitting,hbase详解splitting

文章分类

  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx

最近更新的内容

    • hive优化-----控制hive任务的reduce数,hivereduce
    • hive创建分区,hive创建
    • hadoop学习笔记(二)——hadoop思想简介,hadoop学习笔记
    • Hadoop源代码分析(三七),hadoop源代码
    • JOIN操作,数据库join操作
    • JS查看Object对象的内容,jsobject对象
    • 大数据的两种处理方式,数据两种处理方式
    • Spark中配置Parquet参数,sparkparquet参数
    • hive 不以科学计数法输出,hive计数法输出
    • Spark调研笔记第3篇,spark调研第3篇

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有