Druid

Druid: how to cache all historical node data in memory

左心房为你撑大大i 提交于 2019-12-04 18:01:31
I have about 10GB of data stored on a historical node. However the memory consumption for that node is about 2GB. When I launch a select query, results are returned the first time in more than 30 secondes. Next, they are in second (because of brokers cache). My concern is to reduce the first time select on whatever query to one second. To achieve such performance, I think it is a good start if historical node store all the data in memory. Question: what are the configuration parameters in order to force historical node to cache all data in memory ? Druid doesn't have any direct mechanism to

Springboot application.yml和application.properties文件的区别

僤鯓⒐⒋嵵緔 提交于 2019-12-04 16:29:12
application.yml和application.properties文件这两种文件都是Springboot的配置文件,注释都可以用#号来注释,只不过因为application.yml看起来更直观,更清晰。但是要注意一点: properties文件的优先级高于yml文件 ,即如果两个文件中都配置了端口号,只有properties中的端口号有效,而yml文件中端口配置无效。 首先看application.properties文件,在properties文件中是以”.”进行分割的。 #application.properties server.port=8085 spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource spring.datasource.url=jdbc:mysql://aliyuncs.com:3306/home?useUnicode=true&zeroDateTimeBehavior=convertToNull&autoReconnect=true spring.datasource.username=root spring.datasource.password=*** spring.datasource.driver-class-name=com.mysql.jdbc.Driver

Druid解密数据库

ⅰ亾dé卋堺 提交于 2019-12-04 16:01:10
数据库密码解密: 创建一个DesPassword类写main方法,继承druid中的DruidPasswordCallback类。 在main方法中引用ConfigTools.decrypt(publickey, password)方法,填入已知的公钥和密码。 打印结果,done import com.alibaba.druid.filter.config.ConfigTools; import com.alibaba.druid.util.DruidPasswordCallback; public class DesPassword extends DruidPasswordCallback { public static void main(String[] args) throws Exception{ String publickey = 填入公钥; String password = 填入密码; String pwd = ConfigTools.decrypt(publickey, password); System.out.println(pwd); } } 本文转自: https://blog.csdn.net/sz_huangrui/article/details/84788089 来源: https://www.cnblogs.com/WPF0414/p

How to insert data into druid via tranquility

。_饼干妹妹 提交于 2019-12-04 10:01:24
By following tutorial at http://druid.io/docs/latest/tutorials/tutorial-loading-streaming-data.html , I was able to insert data into druid via Kafka console Kafka console The spec file looks as following examples/indexing/wikipedia.spec [ { "dataSchema" : { "dataSource" : "wikipedia", "parser" : { "type" : "string", "parseSpec" : { "format" : "json", "timestampSpec" : { "column" : "timestamp", "format" : "auto" }, "dimensionsSpec" : { "dimensions": ["page","language","user","unpatrolled","newPage","robot","anonymous","namespace","continent","country","region","city"], "dimensionExclusions" : [

Druid连接池的简单使用

余生颓废 提交于 2019-12-04 08:23:12
第一步:导入两个jar包 第二步:创建一个properties文件 第三步:在properties文件中添加配置:连接驱动、数据库名字、数据库用户名和密码等 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql:///ManageSys username=root password=admin123 initialSize=5 maxActive=10 maxWait=3000 maxIdle=6 minIdle=3    第四步:创建连接池对象 import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.pool.DruidDataSourceFactory; import javax.sql.DataSource; import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; public class JdbcUtil

你需要的不是实时数仓 | 你需要的是一款合适且强大的OLAP数据库(上)

◇◆丶佛笑我妖孽 提交于 2019-12-04 07:53:14
前言 今年有个现象,实时数仓建设突然就被大家所关注。我个人在公众号也写过和转载过几篇关于实时数据仓库的文章和方案。 但是对于实时数仓的狂热追求大可不必。 首先,在技术上几乎没有难点,基于强大的开源中间件实现实时数据仓库的需求已经变得没有那么困难。其次,实时数仓的建设一定是伴随着业务的发展而发展,武断的认为Kappa架构一定是最好的实时数仓架构是不对的。实际情况中随着业务的发展数仓的架构变得没有那么非此即彼。 在整个实时数仓的建设中,OLAP数据库的选型直接制约实时数仓的可用性和功能性。本文从业内几个典型的数仓建设和发展情况入手,从架构、技术选型和优缺点分别给大家分析现在市场上的开源OLAP引擎,旨在方便大家技术选型过程中能够根据实际业务进行选择。 管中窥豹-菜鸟/知乎/美团/网易严选实时数仓建设 为什么要构建实时数据仓库 传统的离线数据仓库将业务数据集中进行存储后,以固定的计算逻辑定时进行ETL和其它建模后产出报表等应用。离线数据仓库主要是构建T+1的离线数据,通过定时任务每天拉取增量数据,然后创建各个业务相关的主题维度数据,对外提供T+1的数据查询接口。计算和数据的实时性均较差,业务人员无法根据自己的即时性需要获取几分钟之前的实时数据。数据本身的价值随着时间的流逝会逐步减弱,因此数据发生后必须尽快的达到用户的手中,实时数仓的构建需求也应运而生。 总之就是一句话:时效性的要求。

spring boot + jta + druid整合demo

非 Y 不嫁゛ 提交于 2019-12-04 07:48:56
地址: https://gitee.com/liuchangng/springboot-mybatis-jta 项目使用到的技术如下: spring boot mybatis jta (分布式事务) druid (多数据源) 地址: https://gitee.com/liuchangng/springboot-mybatisplus-jta 项目使用到的技术如下: spring boot mybatis-plus (增强的mybatis) jta (分布式事务) druid (多数据源) 视频地址: https://pan.baidu.com/s/1kVOh18F ps: sql文件在entity目录下 来源: oschina 链接: https://my.oschina.net/u/2829982/blog/1544878

How to perform a SELECT in the results returned from a GROUP BY Druid?

我的未来我决定 提交于 2019-12-04 04:46:43
问题 I am having a hard time converting this simple SQL Query below into Druid: SELECT country, city, Count(*) FROM people_data WHERE name="Mary" GROUP BY country, city; So I came up with this query so far: { "queryType": "groupBy", "dataSource" : "people_data", "granularity": "all", "metric" : "num_of_pages", "dimensions": ["country", "city"], "filter" : { "type" : "and", "fields" : [ { "type": "in", "dimension": "name", "values": ["Mary"] }, { "type" : "javascript", "dimension" : "email",

springboot集成mybatis

六月ゝ 毕业季﹏ 提交于 2019-12-04 03:54:09
springboot集成mybatis application.yml 从哪里找到这些配置项: springboot 自己的配置项 https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html mybatis的配置项 http://www.mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/ 阿里 druid的配置项 https://github.com/alibaba/druid/blob/master/druid-spring-boot-starter/src/test/resources/application.properties 不同的环境使用不同的数据源 使用 spring.profiles 实现 参考: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-properties-and-configuration.html#howto-change-configuration-depending-on-the-environment A YAML file is