原文发表于天善智能
PipelineDB是基于PostgreSQL的一个流式计算数据库,
看一下官方文档的定义:
PipelineDB is built to run SQL queries continuously on
streaming data. The output of these continuous queries is stored in
regular tables which can be queried like any other table or view.
Thus continuous queries can be thought of as very high-throughput,
incrementally updated materialized views. As with any data
processing system, PipelineDB is built to shine under particular
workloads, and simply not intended for others.
我的理解就是row base
的trigger,数据可以不停的增量更新,而不用批量去跑。而且传统的流处理都需要写程序,PipelineDB的方便之处是流的处理可以使用SQL语句,这个对我这种传统的BI人员很方便。
今天先介绍一下具体的安装准备工作:
操作系统准备:
CentOS 7.1 with basic development
关闭防火墙,使用seng的用户安装。
需要增加seng用户的sudo权限。
pipelinedb安装:
安装命令:
mkdir /postgre/pipelinedb/v096/
cd /postgre/installfiles
sudo rpm -ivh --prefix=/postgre/pipelinedb/v096/ pipelinedb-0.9.6-centos7-x86_64.rpm
数据库初始化:
mkdir /postgre/pipelinedb/v096/testpipe
mkdir /postgre/pipelinedb/v096/logs/testpipe/
pipeline-init -D /postgre/pipelinedb/v096/testpipe
启动/关闭命令:
pipeline-ctl -D /postgre/pipelinedb/v096/testpipe -l
/postgre/pipelinedb/v096/logs/testpipe/pipelinedb.log start
pipeline-ctl -D
/postgre/pipelinedb/v096/testpipe stop
修改配置:
由于需要远程访问,测试也不需要太多权限控制
修改pg_hba.conf
加一行
host all all ip(如192.168.1.1)/24 password
host all all 10.8.29.1/24 password
修改pipelinedb.conf
#listen_addresses =
'localhost' # what IP address(es) to listen on;
listen_addresses = '*'
访问pipeline :
就是普通的postgre 的数据库,但是提供了一个pipeline的简化命令。
pipeline pipeline
或
psql -p 5432 -h localhost pipeline
通过\l命令可以看到就是一个pg的数据库^-^
创建测试用户:
CREATE USER pgtest PASSWORD 'abc123' ;
alter role pgtest superuser;
PS.
今年继续看,看了道德经和新闻标题2段,都很有感触。里面谈了一下新闻如何讲故事,这个对所有人都适用啊,是人的基本技能。这句话叶恒有意思,细节才会感动人。
还在听猫腻,喜马拉雅上有姜维说的,说得不错。猫腻大大的书整个架构偏向于黑暗的,但是具体的故事还是很正的。这几天听到周园那段,细节写的不错。