oushuDB之filespace&&tablespace

网友投稿 251 2022-11-24

oushuDB之filespace&&tablespace

创建filespace

配置filespace

># su - gpadmin>$ hawqfilespace -o hawq_fpc Enter a name for this filespace> hawq_fpcEnter replica num for filespace. If 0, default replica num is used (default=3)> 3Please specify the DFS location for the filespace (for example: localhost:9000/fs)location> nn/hawq_fpcgpcheckhdfs hdfs nn/hawq_fpc off postgres gpcheckhdfs error code is 2688020190622:09:33:18:003803 hawqfilespace:hawq01:gpadmin-[INFO]:-[created]20190622:09:33:18:003803 hawqfilespace:hawq01:gpadmin-[INFO]:-To add this filespace to the database please run the command: hawqfilespace --config /home/gpadmin/hawq_fpc>

确认filespace配置文件

>$ more /home/gpadmin/hawq_fpcfilespace:hawq_fpcfsreplica:3dfs_url::nn/hawq_fp

创建所需目录

># su - hdfs>$ hdfs dfs -mkdir hdfs://nn/hawq_fpc>$ hdfs dfs -chown gpadmin:hadoop hdfs://nn/hawq_fpc>$ hdfs dfs -ls hdfs://nn/Found 5 items...drwxr-xr-x - gpadmin gpadmin 0 2019-06-22 09:34 hdfs://nn/hawq_fpc>$

创建filespace

>$ hawqfilespace --config /home/gpadmin/hawq_fpcReading Configuration file: '/home/gpadmin/hawq_fpc'CREATE FILESPACE hawq_fpc ON hdfs ('nn/hawq_fpc/hawq_fpc') WITH (NUMREPLICA = 3);20190622:09:36:24:004236 hawqfilespace:hawq01:gpadmin-[INFO]:-Connecting to database20190622:09:36:24:004236 hawqfilespace:hawq01:gpadmin-[INFO]:-Filespace "hawq_fpc" successfully created>$ postgres=# CREATE FILESPACE hawq_fpc ON hdfs ('nn/test_spc/hawq_fpc') WITH (NUMREPLICA = 3);CREATE FILESPACEpostgres=# postgres=# select * from pg_filespace_entry ; fsefsoid | fsedbid | fselocation ----------+---------+----------------------------------------... 24710 | 0 | hdfs://{replica=3}nn/hawq_fpc/hawq_fpc(3 rows

创建tablespace

postgres=# create TABLESPACE hawq_tpc FILESPACE hawq_fpc;CREATE TABLESPACEpostgres=# select * from pg_tablespace ; spcname | spcowner | spclocation | spcacl | spcprilocations | spcmirlocations | spcfsoid -------------+----------+-------------+--------+-----------------+-----------------+----------... hawq_tpc | 10 | | | | | 24710(4 rows

建表测试

postgres=# CREATE TABLE aoo(i int) TABLESPACE hawq_tpc;CREATE TABLEpostgres=# \df generate_series postgres=# insert into aoo select 1;INSERT 0

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:lkdGui是一款为单色显示屏制作的图形化界面专为工业控制领域而生
下一篇:springboot2如何禁用自带tomcat的session功能
相关文章

 发表评论

暂时没有评论,来抢沙发吧~