Druid

Druid详细配置

╄→гoц情女王★ 提交于 2020-01-26 15:31:33
#Driver jdbc.driverClassName=com.mysql.jdbc.Driver #数据库链接, jdbc.url=jdbc:mysql://192.168.0.37:3306/project_demo?useUnicode=true&characterEncoding=UTF-8 #帐号 jdbc.username=root #密码 jdbc.password=xxxx #检测数据库链接是否有效,必须配置 jdbc.validationQuery=SELECT 'x’ #初始连接数 jdbc.initialSize=3 #最大连接池数量 jdbc.maxActive=10 #去掉,配置文件对应去掉 #jdbc.maxIdle=20 #配置0,当线程池数量不足,自动补充。 jdbc.minIdle=0 #获取链接超时时间为1分钟,单位为毫秒。 jdbc.maxWait=60000 #获取链接的时候,不校验是否可用,开启会有损性能。 jdbc.testOnBorrow=false #归还链接到连接池的时候校验链接是否可用。 jdbc.testOnReturn=false #此项配置为true即可,不影响性能,并且保证安全性。意义为:申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis

How intervals field in GranularitySpec impact data ingestion?

两盒软妹~` 提交于 2020-01-25 23:45:44
问题 What is the purpose of intervals field in GranularitySpec and importantly, how does it impact the data load or ingestion ? For e.g. If I have data from 2014-01-01 to 2017-09-30 in a file and I specify intervals value as "intervals" : ["2016-01-01/2017-12-31"] . What would happen during data load in this scenario ? Would really appreciate any help with this understanding. Thanks. The document just says as below without much info on its impact: intervals: A list of intervals for the raw data

How intervals field in GranularitySpec impact data ingestion?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-25 23:45:10
问题 What is the purpose of intervals field in GranularitySpec and importantly, how does it impact the data load or ingestion ? For e.g. If I have data from 2014-01-01 to 2017-09-30 in a file and I specify intervals value as "intervals" : ["2016-01-01/2017-12-31"] . What would happen during data load in this scenario ? Would really appreciate any help with this understanding. Thanks. The document just says as below without much info on its impact: intervals: A list of intervals for the raw data

Druid介绍

你说的曾经没有我的故事 提交于 2020-01-24 01:01:55
When should I use Druid? Druid is used by many companies of various sizes for many different use cases. Check out the Powered by Apache Druid page Druid is likely a good choice if your use case fits a few of the following descriptors: Insert rates are very high, but updates are less common. Most of your queries are aggregation and reporting queries ("group by" queries). You may also have searching and scanning queries. You are targeting query latencies of 100ms to a few seconds. Your data has a time component (Druid includes optimizations and design choices specifically related to time). You

maven私服搭建

爱⌒轻易说出口 提交于 2020-01-23 23:48:41
maven私服搭建 搭建私服的工具选择 Apache基金会的archiva http://archiva.apache.org/ JFrog的Artifactory https://jfrog.com/artifactory/ Sonatype的Nexus https://my.sonatype.com/ 这些都是开源的私服软件,都可以自由使用。用的最多的是第三种Nexus,本文我们主要以这个来讲解,其他2种有兴趣的朋友可以去研究一下。 Windows10中安装Nexus私服 nexus是java开发的,所以运行的时候需要有java环境的支持。 nexus下载和版本 https://www.sonatype.com/nexus-repository-oss nexus-3.20.1-01-win64 C:\Users\jie>java -version java version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode) nexus启动 nexus.exe /run D:\chengxu\nexus-3.20.1-01-win64\nexus-3.20.1-01

SpringBoot与数据访问

会有一股神秘感。 提交于 2020-01-23 17:51:27
SpringBoot与数据访问 文章目录 SpringBoot与数据访问 1. JDBC 1.1 创建SpringBoot项目 1.2 修改配置 1.3 测试 2. 整合Druid数据源 2.1 导入依赖 2.2 在 **src/main/resources** 目录下创建 **druid.properties** 文件 2.3为Druid数据源创建一个配置类 2.4写一个Controller来测试一下 3. 整合MyBatis 3.1 前期工作 3.1.1导入依赖 3.1.2配置数据源相关属性(参考1或2) 3.1.3 给数据库建表 3.1.4 创建JavaBean 3.2 注解版 3.3 配置文件版 3.4 测试 1. JDBC 1.1 创建SpringBoot项目 使用Spring Initializr创建SpringBoot项目,勾选Spring Web(Web)、JDBC、MySQL三项: 生成后pom.xml是这样的: < dependency > < groupId > org.springframework.boot </ groupId > < artifactId > spring-boot-starter-jdbc </ artifactId > </ dependency > < dependency > < groupId > org

关于apache superset添加多种数据源的一次记录

霸气de小男生 提交于 2020-01-23 00:07:57
关于apache superset添加多种数据源的一次记录 其中superset安装使用可以参考官网安装,docker版本更是方便快捷,这里不做描述,附上官网传送门 superset官网 添加mysql数据库作为datesource mysql://user:password@IP/dbname?charset = utf8 添加Apache Kylin作为datesource kylin://user:password@IP:端口/dbname 添加Apache Druid作为datesource druid://IP:端口/druid/v2/sql/ 注意:druid中的druid/v2/sql/是默认的 参考 https://gethue.com/quick-task-how-to-query-apache-druid-analytic-database/ 共同踩坑!共同进步! 来源: CSDN 作者: 「已注销」 链接: https://blog.csdn.net/qq_41203888/article/details/104045004

Spring Boot 集成 Druid

天涯浪子 提交于 2020-01-22 18:14:51
一、Druid 介绍 Druid是Java语言中最好的数据库连接池。Druid能够提供强大的监控和扩展功能。 Druid是一个开源项目,源码托管在github上,源代码仓库地址是 https://github.com/alibaba/druid 。同时每次Druid发布正式版本和快照的时候,都会把源码打包,你可以从上面的下载地址中找到相关版本的源码。 通过Druid连接池中间件, 我们可以实现: 可以监控数据库访问性能,Druid内置提供了一个功能强大的StatFilter插件,能够详细统计SQL的执行性能,这对于线上分析数据库访问性能有帮助。 替换传统的DBCP和C3P0连接池中间件。Druid提供了一个高效、功能强大、可扩展性好的数据库连接池。 数据库密码加密。直接把数据库密码写在配置文件中,容易导致安全问题。DruidDruiver和DruidDataSource都支持PasswordCallback。 SQL执行日志,Druid提供了不同的LogFilter,能够支持Common-Logging、Log4j和JdkLog,你可以按需要选择相应的LogFilter,监控你应用的数据库访问情况。 扩展JDBC,如果你要对JDBC层有编程的需求,可以通过Druid提供的Filter-Chain机制,很方便编写JDBC层的扩展插件。 更多详细信息参考官方文档:https:/

druid连接池的时候,报错误:java.sql.SQLException: sql injection violation, syntax error: syntax error, error

眉间皱痕 提交于 2020-01-22 08:40:00
因为项目中使用的是Oracle数据库,由于用到了Oracle中的over开窗函数导致sql语法在过druid连接池的 wall 拦截器时被拦截报错:java.sql.SQLException: sql injection violation, syntax error: syntax error, error 解决办法:1.优化你的SQL;2.关闭wall拦截器 关闭wall拦截器:我没有在主配置中去掉wall拦截器,而是单独在master数据源单独配置不使用wall拦截器 来源: CSDN 作者: 蓝之刃 链接: https://blog.csdn.net/qq_16320025/article/details/103875248

mybatis问题合集

こ雲淡風輕ζ 提交于 2020-01-22 07:55:10
spring boot 2.0.0 + mybatis 报:Property ‘sqlSessionFactory’ or ‘sqlSessionTemplate’ are required spring boot 2.0.0 + mybatis 报:Property ‘sqlSessionFactory’ or ‘sqlSessionTemplate’ are required 无法启动 google baidu了一番,多数都提示缺少: <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.0.0</version> </dependency> 其实最重要的应该是缺少如下数据库连接池的包,我这里用的druid,这里要添加druid for spring boot依赖,如下 <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.1.9</version> </dependency> 来源: CSDN 作者: 舌尖上的五香 链接: https:/