「揭秘GP」Greenplum 6 软件包目录畅游(下)
liebian365 2024-10-31 15:20 17 浏览 0 评论
该篇文章为目录畅游的结束篇,系列文章请参阅文章《「揭秘GP」Greenplum 6 软件包目录畅游(上)》 和《「揭秘GP」Greenplum 6 软件包目录畅游(中)》 。
上篇文章带大家看完了 include 目录,本篇接着介绍剩余的内容。首先还是先来看一下软件包下面的所有目录情况。
[gpadmin@gp1 greenplum-db]$ ls -al
总用量 160
drwxr-xr-x 11 root root 187 12月 17 11:24 .
drwxr-xr-x. 14 root root 187 12月 17 11:24 ..
drwxr-xr-x 7 root root 4096 12月 17 11:24 bin
drwxr-xr-x 3 root root 22 12月 17 11:24 docs
drwxr-xr-x 2 root root 60 12月 17 11:24 etc
drwxr-xr-x 3 root root 20 12月 17 11:24 ext
-rwxr-xr-x 1 root root 783 12月 17 11:24 greenplum_path.sh
drwxr-xr-x 4 root root 4096 12月 17 11:24 include
drwxr-xr-x 6 root root 4096 12月 17 11:24 lib
-rw-r--r-- 1 root root 135617 12月 13 02:57 open_source_license_pivotal_greenplum.txt
drwxr-xr-x 7 root root 93 12月 17 11:24 pxf
drwxr-xr-x 2 root root 4096 12月 17 11:24 sbin
drwxr-xr-x 5 root root 52 12月 17 11:24 share
目前剩余的目录还有 lib 目录、pxf 目录、sbin 目录和 share 目录。
lib 目录
该目录下主要存的是动态链接库,程序运行过程中会动态将这些库文件加载。另外有一些别的内容,可以到目录下简单看一下。
-rwxr-xr-x 1 root root 662274 12月 13 02:57 libecpg.a
-rwxr-xr-x 1 root root 75844 12月 13 02:57 libecpg_compat.a
lrwxrwxrwx 1 root root 21 12月 17 11:24 libecpg_compat.so -> libecpg_compat.so.3.6
lrwxrwxrwx 1 root root 21 12月 17 11:24 libecpg_compat.so.3 -> libecpg_compat.so.3.6
-rwxr-xr-x 1 root root 64464 12月 13 02:57 libecpg_compat.so.3.6
lrwxrwxrwx 1 root root 14 12月 17 11:24 libecpg.so -> libecpg.so.6.6
lrwxrwxrwx 1 root root 14 12月 17 11:24 libecpg.so.6 -> libecpg.so.6.6
-rwxr-xr-x 1 root root 361496 12月 13 02:57 libecpg.so.6.6
lrwxrwxrwx 1 root root 16 12月 17 11:24 libgpdbcost.so -> libgpdbcost.so.3
lrwxrwxrwx 1 root root 21 12月 17 11:24 libgpdbcost.so.3 -> libgpdbcost.so.3.85.0
-rwxr-xr-x 1 root root 1122528 12月 13 02:57 libgpdbcost.so.3.85.0
lrwxrwxrwx 1 root root 13 12月 17 11:24 libgpopt.so -> libgpopt.so.3
lrwxrwxrwx 1 root root 18 12月 17 11:24 libgpopt.so.3 -> libgpopt.so.3.85.0
-rwxr-xr-x 1 root root 50101096 12月 13 02:57 libgpopt.so.3.85.0
lrwxrwxrwx 1 root root 12 12月 17 11:24 libgpos.so -> libgpos.so.3
lrwxrwxrwx 1 root root 17 12月 17 11:24 libgpos.so.3 -> libgpos.so.3.85.0
-rwxr-xr-x 1 root root 1988592 12月 13 02:57 libgpos.so.3.85.0
-rwxr-xr-x 1 root root 259280 12月 13 02:57 libgppc.a
lrwxrwxrwx 1 root root 14 12月 17 11:24 libgppc.so -> libgppc.so.1.2
lrwxrwxrwx 1 root root 14 12月 17 11:24 libgppc.so.1 -> libgppc.so.1.2
-rwxr-xr-x 1 root root 149680 12月 13 02:57 libgppc.so.1.2
...............
...............
...............
lib/gpperfmon 目录
该目录下有 gpperfmon(gpcc用的监控库)模式初始化文件 gpperfmon.sql,该 sql 文件可以用来在 gpperfmon 中创建对应的内外表。具体内容自己可以打开看看,可以根据模式的内容构造一个自己的 gpcc。
lib/pkgconfig 目录
源码编译用的一些文件,在编译和链接库文件时,通过这些 .pc 文件来指定文件的位置、版本号、编译选项等信息。
[gpadmin@gp1 pkgconfig]$ cat libzstd.pc
# ZSTD - standard compression algorithm
# Copyright (C) 2014-2016, Yann Collet, Facebook
# BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
prefix=/usr
libdir=/usr/lib64
includedir=/usr/include
Name: zstd
Description: fast lossless compression algorithm library
URL: http://www.zstd.net/
Version: 1.3.7
Libs: -L${libdir} -lzstd
Cflags: -I${includedir}
lib/postgresql 目录
由于 Greenplum 是基于 PostgreSQL 内核开发的,所以一些 Postgresql 的动态链接库放在该目录下。
[gpadmin@gp1 postgresql]$ ls -al
总用量 41768
drwxr-xr-x 3 root root 4096 12月 17 11:24 .
drwxr-xr-x 6 root root 4096 12月 17 11:24 ..
-rwxr-xr-x 1 root root 19920 12月 13 02:57 ascii_and_mic.so
-rwxr-xr-x 1 root root 97376 12月 13 02:57 auto_explain.so
-rwxr-xr-x 1 root root 54600 12月 13 02:57 citext.so
-rwxr-xr-x 1 root root 49528 12月 13 02:57 cyrillic_and_mic.so
-rwxr-xr-x 1 root root 245704 12月 13 02:57 dblink.so
-rwxr-xr-x 1 root root 1267072 12月 13 02:57 dict_snowball.so
-rwxr-xr-x 1 root root 404864 12月 13 02:57 diskquota.so
-rwxr-xr-x 1 root root 29880 12月 13 02:57 euc2004_sjis2004.so
-rwxr-xr-x 1 root root 21728 12月 13 02:57 euc_cn_and_mic.so
-rwxr-xr-x 1 root root 40496 12月 13 02:57 euc_jp_and_sjis.so
-rwxr-xr-x 1 root root 21720 12月 13 02:57 euc_kr_and_mic.so
-rwxr-xr-x 1 root root 40536 12月 13 02:57 euc_tw_and_big5.so
-rwxr-xr-x 1 root root 109176 12月 13 02:57 fixedwidth.so
-rwxr-xr-x 1 root root 185416 12月 13 02:57 fuzzystrmatch.so
-rwxr-xr-x 1 root root 82288 12月 13 02:57 gp_ao_co_diagnostics.so
-rwxr-xr-x 1 root root 7464944 12月 13 02:57 gpcloud.so
-rwxr-xr-x 1 root root 85288 12月 13 02:57 gp_distribution_policy.so
-rwxr-xr-x 1 root root 77768 12月 13 02:57 gpextprotocol.so
-rwxr-xr-x 1 root root 611544 12月 13 02:57 gpfmt_avro.so
-rwxr-xr-x 1 root root 113624 12月 13 02:57 gpfmt_binary.so
-rwxr-xr-x 1 root root 474792 12月 13 02:57 gpfmt_confluent_avro.so
-rwxr-xr-x 1 root root 110680 12月 13 02:57 gpfmt_delimiter.so
-rwxr-xr-x 1 root root 108192 12月 13 02:57 gpfmt_json.so
-rwxr-xr-x 1 root root 749016 12月 13 02:57 gpfmt_kafka.so
-rwxr-xr-x 1 root root 17311712 12月 13 02:57 gpfmt_protobuf.so
-rwxr-xr-x 1 root root 82088 12月 13 02:57 gpformatter.so
............
............
............
从上面的具体库文件命名也可以看出,有一部分 greenplum 的动态链接库也是放在这里面的,具体原因我也不知道,等咨询官方开发大神再给大家更新。
lib/python 目录
该目录下放的是 python 用到的库文件,例如:yaml、pygresql,这里面比较重要的一个就是 pygresql,这是 python 语言访问 postgresql 系数据库的三方接口库,现在用的比较多的具有相同作用的库还有 psycopg2,当然这里选用的是 pygresql。
gpadmin@gp1 python]$ ls -al
总用量 220
drwxr-xr-x 7 root root 222 12月 17 11:24 .
drwxr-xr-x 6 root root 4096 12月 17 11:24 ..
drwxr-xr-x 10 root root 4096 12月 17 11:24 gppylib
-rwxr-xr-x 1 root root 0 12月 13 02:57 __init__.py
-rwxr-xr-x 1 root root 111 12月 13 02:57 __init__.pyc
drwxr-xr-x 2 root root 90 12月 17 11:24 lockfile
-rwxr-xr-x 1 root root 69992 12月 13 02:57 _posixsubprocess.so
drwxr-xr-x 3 root root 4096 12月 17 11:24 psutil
drwxr-xr-x 2 root root 117 12月 17 11:24 pygresql
-rwxr-xr-x 1 root root 3758 12月 13 02:57 subprocess32-ChangeLog
-rwxr-xr-x 1 root root 74362 12月 13 02:57 subprocess32.py
-rwxr-xr-x 1 root root 48477 12月 13 02:57 subprocess32.pyc
drwxr-xr-x 2 root root 4096 12月 17 11:24 yaml
sbin 目录
该目录下存储的文件主要为 bin 目录下的一些集群管理工具的内部命令,这些 python 脚本不能直接调用,而只能通过 bin 目录下对应的脚本自行调用。该目录在使用过程中对用户是不可见的,程序会自动去调用,可以忽略。但是如果有源码修改需求,这部分下的脚本文件也不要忘掉哦。
[gpadmin@gp1 greenplum-db]$ ls -al sbin
总用量 128
drwxr-xr-x 2 root root 4096 12月 17 11:24 .
drwxr-xr-x 11 root root 187 12月 17 11:24 ..
-rwxr-xr-x 1 root root 2808 12月 13 02:57 gpcleansegmentdir.py
-rwxr-xr-x 1 root root 3303 12月 13 02:57 gpcleansegmentdir.pyc
-rwxr-xr-x 1 root root 6541 12月 13 02:57 gpconfig_helper.py
-rwxr-xr-x 1 root root 5648 12月 13 02:57 gpconfig_helper.pyc
-rwxr-xr-x 1 root root 9089 12月 13 02:57 gpgetstatususingtransition.py
-rwxr-xr-x 1 root root 8302 12月 13 02:57 gpgetstatususingtransition.pyc
-rwxr-xr-x 1 root root 1338 12月 13 02:57 gpmon_catqrynow.py
-rwxr-xr-x 1 root root 1186 12月 13 02:57 gpmon_catqrynow.pyc
-rwxr-xr-x 1 root root 1937 12月 13 02:57 gpoperation.py
-rwxr-xr-x 1 root root 1565 12月 13 02:57 gpoperation.pyc
-rwxr-xr-x 1 root root 14843 12月 13 02:57 gpsegstart.py
-rwxr-xr-x 1 root root 12309 12月 13 02:57 gpsegstart.pyc
-rwxr-xr-x 1 root root 8247 12月 13 02:57 gpsegstop.py
-rwxr-xr-x 1 root root 7641 12月 13 02:57 gpsegstop.pyc
-rwxr-xr-x 1 root root 7797 12月 13 02:57 packcore
share 目录
这是最后一个目录,也是一个比较重要的目录,该目录中最重要的一个要数 postgresql 这个子目录。
[gpadmin@gp1 greenplum-db]$ ls -al share
drwxr-xr-x 3 root root 24 12月 17 11:24 doc
drwxr-xr-x 2 root root 41 12月 17 11:24 greenplum
drwxr-xr-x 8 root root 4096 12月 17 11:24 postgresql
share/doc目录
目前该目录下只存了 orafce 扩展的一些文档性信息。可以自行 cat 打开来看。
[gpadmin@gp1 greenplum-db]$ ls -al share/doc/postgresql/extension/
总用量 40
drwxr-xr-x 2 root root 75 12月 17 11:24 .
drwxr-xr-x 3 root root 23 12月 17 11:24 ..
-rwxr-xr-x 1 root root 987 12月 13 02:57 COPYRIGHT.orafce
-rwxr-xr-x 1 root root 874 12月 13 02:57 INSTALL.orafce
-rwxr-xr-x 1 root root 31364 12月 13 02:57 README.asciidoc
share/postgresql/extension 目录
该目录下放了很多创建扩展用到的 control 文件和 sql 文件,比较著名的有:citext、dblink、hstore、orafce、存储过程语言扩展、pxf 等等,可以说我们在 Greenplum 数据库中执行创建扩展语句 CREATE Extention xxxx 时,它会从这个目录下寻找对应的 control 文件并执行对应的 SQL,在数据库中创建对应的函数、类型等内容。
[gpadmin@gp1 greenplum-db]$ ls -al share/postgresql/extension/
总用量 432
drwxr-xr-x 2 root root 4096 12月 17 11:24 .
drwxr-xr-x 8 root root 4096 12月 17 11:24 ..
-rwxr-xr-x 1 root root 1028 12月 13 02:57 citext--1.0--1.1.sql
-rwxr-xr-x 1 root root 12337 12月 13 02:57 citext--1.0.sql
-rwxr-xr-x 1 root root 1001 12月 13 02:57 citext--1.1--1.0.sql
-rwxr-xr-x 1 root root 12364 12月 13 02:57 citext--1.1.sql
-rwxr-xr-x 1 root root 158 12月 13 02:57 citext.control
-rwxr-xr-x 1 root root 9839 12月 13 02:57 citext--unpackaged--1.0.sql
-rwxr-xr-x 1 root root 419 12月 13 02:57 dblink--1.0--1.1.sql
-rwxr-xr-x 1 root root 5936 12月 13 02:57 dblink--1.1.sql
-rwxr-xr-x 1 root root 170 12月 13 02:57 dblink.control
-rwxr-xr-x 1 root root 2863 12月 13 02:57 dblink--unpackaged--1.0.sql
-rw-r--r-- 1 root root 2674 12月 13 02:57 diskquota--1.0.sql
-rw-r--r-- 1 root root 139 12月 13 02:57 diskquota.control
-rwxr-xr-x 1 root root 1436 12月 13 02:57 fuzzystrmatch--1.0.sql
-rwxr-xr-x 1 root root 175 12月 13 02:57 fuzzystrmatch.control
-rwxr-xr-x 1 root root 1108 12月 13 02:57 fuzzystrmatch--unpackaged--1.0
................
................
................
pxf 目录
在 GPDB 4.x 的时代,我们连接 Hadoop 系是通过 gphdfs 来实现的,但是这种方式的可用性和可扩展性并不强。所以从 GPDB 5.x 开始,GPDB 从 HAWQ( HAWQ 是 Pivotal 开源的另一款软件,一款底层存储基于 HDFS,前端引擎基于 GPDB,支持大规模并行处理的软件 )中吸收了 pxf 框架。该框架通过扩展的形式在 GPDB 中创建,它能够使 GPDB 以并行的方式从 HDFS、Hbase、Hive 或其他存储中查询数据,pxf 在目标侧通过 Java 语言与 Hadoop 系进行交互,而在 GPDB 侧则通过 C 做底层交互,打通 GPDB 与 Hadoop 数据的任督二脉。使用方面只需要在创建外部表时指定协议为 pxf 即可。
[gpadmin@gp1 pxf]$ ls -al
总用量 4
drwxr-xr-x 7 root root 93 12月 17 11:24 .
drwxr-xr-x 11 root root 187 12月 17 11:24 ..
drwxr-xr-x 9 root root 220 12月 17 11:24 apache-tomcat
drwxr-xr-x 2 root root 32 12月 17 11:24 bin
drwxr-xr-x 2 root root 64 12月 17 11:24 conf
drwxr-xr-x 3 root root 252 12月 17 11:24 lib
drwxr-xr-x 5 root root 43 12月 17 11:24 templates
-rw-r--r-- 1 root root 7 12月 13 02:57 version
这里不展开给大家详细介绍 pxf 的每个子目录的作用了,后面在 pxf 的详细使用介绍文章中再具体说明。
Greenplum 6 软件包目录畅游部分到此结束~欢迎各位朋友拍砖~
相关推荐
- 4万多吨豪华游轮遇险 竟是因为这个原因……
-
(观察者网讯)4.7万吨豪华游轮搁浅,竟是因为油量太低?据观察者网此前报道,挪威游轮“维京天空”号上周六(23日)在挪威近海发生引擎故障搁浅。船上载有1300多人,其中28人受伤住院。经过数天的调...
- “菜鸟黑客”必用兵器之“渗透测试篇二”
-
"菜鸟黑客"必用兵器之"渗透测试篇二"上篇文章主要针对伙伴们对"渗透测试"应该如何学习?"渗透测试"的基本流程?本篇文章继续上次的分享,接着介绍一下黑客们常用的渗透测试工具有哪些?以及用实验环境让大家...
- 科幻春晚丨《震动羽翼说“Hello”》两万年星间飞行,探测器对地球的最终告白
-
作者|藤井太洋译者|祝力新【编者按】2021年科幻春晚的最后一篇小说,来自大家喜爱的日本科幻作家藤井太洋。小说将视角放在一颗太空探测器上,延续了他一贯的浪漫风格。...
- 麦子陪你做作业(二):KEGG通路数据库的正确打开姿势
-
作者:麦子KEGG是通路数据库中最庞大的,涵盖基因组网络信息,主要注释基因的功能和调控关系。当我们选到了合适的候选分子,单变量研究也已做完,接着研究机制的时便可使用到它。你需要了解你的分子目前已有哪些...
- 知存科技王绍迪:突破存储墙瓶颈,详解存算一体架构优势
-
智东西(公众号:zhidxcom)编辑|韦世玮智东西6月5日消息,近日,在落幕不久的GTIC2021嵌入式AI创新峰会上,知存科技CEO王绍迪博士以《存算一体AI芯片:AIoT设备的算力新选择》...
- 每日新闻播报(September 14)_每日新闻播报英文
-
AnOscarstatuestandscoveredwithplasticduringpreparationsleadinguptothe87thAcademyAward...
- 香港新巴城巴开放实时到站数据 供科技界研发使用
-
中新网3月22日电据香港《明报》报道,香港特区政府致力推动智慧城市,鼓励公私营机构开放数据,以便科技界研发使用。香港运输署21日与新巴及城巴(两巴)公司签署谅解备忘录,两巴将于2019年第3季度,开...
- 5款不容错过的APP: Red Bull Alert,Flipagram,WifiMapper
-
本周有不少非常出色的app推出,鸵鸟电台做了一个小合集。亮相本周榜单的有WifiMapper's安卓版的app,其中包含了RedBull的一款新型闹钟,还有一款可爱的怪物主题益智游戏。一起来看看我...
- Qt动画效果展示_qt显示图片
-
今天在这篇博文中,主要实践Qt动画,做一个实例来讲解Qt动画使用,其界面如下图所示(由于没有录制为gif动画图片,所以请各位下载查看效果):该程序使用应用程序单窗口,主窗口继承于QMainWindow...
- 如何从0到1设计实现一门自己的脚本语言
-
作者:dong...
- 三年级语文上册 仿写句子 需要的直接下载打印吧
-
描写秋天的好句好段1.秋天来了,山野变成了美丽的图画。苹果露出红红的脸庞,梨树挂起金黄的灯笼,高粱举起了燃烧的火把。大雁在天空一会儿写“人”字,一会儿写“一”字。2.花园里,菊花争奇斗艳,红的似火,粉...
- C++|那些一看就很简洁、优雅、经典的小代码段
-
目录0等概率随机洗牌:1大小写转换2字符串复制...
- 二年级上册语文必考句子仿写,家长打印,孩子照着练
-
二年级上册语文必考句子仿写,家长打印,孩子照着练。具体如下:...
你 发表评论:
欢迎- 一周热门
- 最近发表
- 标签列表
-
- wireshark怎么抓包 (75)
- qt sleep (64)
- cs1.6指令代码大全 (55)
- factory-method (60)
- sqlite3_bind_blob (52)
- hibernate update (63)
- c++ base64 (70)
- nc 命令 (52)
- wm_close (51)
- epollin (51)
- sqlca.sqlcode (57)
- lua ipairs (60)
- tv_usec (64)
- 命令行进入文件夹 (53)
- postgresql array (57)
- statfs函数 (57)
- .project文件 (54)
- lua require (56)
- for_each (67)
- c#工厂模式 (57)
- wxsqlite3 (66)
- dmesg -c (58)
- fopen参数 (53)
- tar -zxvf -c (55)
- 速递查询 (52)