对于结构化数据处理,MB级用excel,pandas,sqlite,access,GB级用mysql,oracle,sql server,postgresql,TB级用mongodb,greenplum,PB级用hadoop,spark,EB级自己想办法。
ignite主要内存功能强大,更方便适用,用内存来聚合数据源,处理数据。随着时间的推移,移动互联网物联网的使用,数据会成指数增长,不上大内存根本跑不快,服务器内存价格只会越来越便宜,内存计算只会越来越流行。
ignite功能齐全,支持OLTP 和OLAP 并且提供了自己的分布式文件管理系统(IGFS) 。
除了支持Key/Value,还支持SQL,支持ACID。
Apache Ignite内存数组组织框架是一个高性能、集成和分布式的内存计算和事务平台,用于大规模的数据集处理,比传统的基于磁盘或闪存的技术具有更高的性能,同时他还为应用和不同的数据源之间提供高性能、分布式内存中数据组织管理的功能。
官网:https://ignite.apache.org/
特性:https://www.zybuluo.com/liyuj/note/293596
安装:
#centos7 + Apache Ignite Binary Releases(不建议源代码安装)
#安装centos7 minimal版本
1 2 |
yum -y update yum -y install zip unzip wget lrzsz |
#设置hostname
#安装jdk
到oracle网站下载jdk的rpm包,然后rpm -ivh安装就好,暂不建议openjdk。
#设置环境变量,vi /etc/profile,添加下面两行到文件末尾
1 2 |
export PATH=/data/ignite/bin:$PATH export IGNITE_HOME=/data/ignite |
#使path配置生效
source /etc/profile
#创建ignite目录,mkdir -p /data/ignite
#下载ignite的binary包
1 2 3 4 5 6 7 8 |
cd /data/ignite wget http://mirrors.tuna.tsinghua.edu.cn/apache//ignite/2.4.0/apache-ignite-fabric-2.4.0-bin.zip unzip apache-ignite-fabric-2.4.0-bin.zip mv apache-ignite-fabric-2.4.0-bin.zip/* ./ rm -rf apache-ignite-fabric-2.4.0-bin.zip rm -rf apache-ignite-fabric-2.4.0-bin/ |
#启动ignite(建议按照后面的操作来做)
1 2 3 4 5 6 |
cd /data/ignite cd bin ./ignite.sh #启动cluster ./control.sh |
#其他操作:
1 2 3 4 5 6 7 8 9 10 |
由于要执行两个脚本,因此都放在后台执行(命令后加&符号即可) ./ignite.sh & ./control.sh & 查看脚本运行情况: ps -ef | grep ignite ps -ef | grep control 终止脚本运行: 直接kill掉上述两个脚本的pid即可,如果运行了多个实例则全部K掉就好了。 |
#需要注意的是,ignite默认的设置是没有开启数据持久化的(数据都在内存里,关机进程后数据就丢失了),需要修改/data/ignite/config/default-config.xml文件开启数据持久化。
参考附件:default-config
在ignite中创建表,必须指定 PRIMARY KEY:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
-- Drop table -- DROP TABLE EMPLOYEER CREATE TABLE EMPLOYEER ( ID INTEGER NOT NULL, CID VARCHAR NOT NULL, NAME VARCHAR, PROVIENCE VARCHAR, CITY VARCHAR, COUNTY VARCHAR, TOWN VARCHAR, REMARK VARCHAR, ISVIP INTEGER, ISLIANSUO INTEGER, GRADE INTEGER, OUREMP VARCHAR, SALES_DISTRICT VARCHAR, SALES_OFFICE VARCHAR, SALES_GROUP VARCHAR, ADDRESS VARCHAR, CONSTRAINT ID PRIMARY KEY () ) ; |
使用dbeaver操作ignite比较方便,自带jdbc驱动了、自动提示也很好:
测试了下,随机insert 10万条数据,用了两秒钟(ignite是安装在自己电脑上的centos虚拟机中),insert 100万条数据用了不到10秒钟。
本文作者: GavinDong
版权属于: GavinDong博客
文章链接: https://gavindong.com/2559.html
如果使用过程中遇到问题,可 **点击此处** 交流沟通。
版权所有,转载时必须以链接形式注明作者和原始出处及本声明。
评论列表(11条)
Ignite is organized in a modular fashion and provides a single jar (library) for each functionality.
You only have to apply the desired library into your project to use Ignite
In contrast to the monolithic and master-slave architectures, there are no special nodes in Ignite.
All nodes are identical in the Ignite cluster.
Run multiple instances of Apache Ignite in a single host:
ignite.sh $IGNITE_HOME/examples/config/example-cache.xml
Note:
Before running the above command, please make sure that you have sufficient memory on your
host machine. By default, Ignite consumes 1 GB memory per Ignite instance
You can change the default configuration in ignite.sh
Replace the -Xms1g -Xmx1g parameters with -Xms512m -Xmx512m for example. Next time when
you restart the Ignite instance, your JVM will be started with Xms amount of memory and will be
able to use a maximum of Xmx amount of memory. For example, starting a JVM with -Xms512m
-Xmx512m parameter will start the JVM with 512MB of memory, and will allow the process to use
up to 512MB of memory
enable rest:
Copy the folder $IGNITE_HOME/libs/optional/ignite-rest-http to IGNITE_HOME/libs, this will enable the Ignite rest interface.
http://IP_ADDRESS:8080/ignite?cmd=version
鼠标选中sql语句后按CTRL + Enter就执行SQL语句,挺方便的。
注意需要先配置系统变量IGNITE_HOME指向ignite文件夹
Apache Ignite(V2.3.0)中文开发手册
https://www.zybuluo.com/liyuj/note/230739
golang连接ignite的包:
https://github.com/amsokol/ignite-go-client
客户端工具:dbeaver