先在应用中导入bboss 持久层和hive驱动(bboss persistent版本号5.0.1,以实际为准:查看
最新版本号):
maven坐标
<dependency>
<groupId>com.bbossgroups</groupId>
<artifactId>bboss-persistent</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>2.1.0</version>
</dependency>
gradle坐标
compile 'com.bbossgroups:bboss-persistent:5.0.1'
compile 'org.apache.hive:hive-jdbc:'2.1.0'
bboss持久层操作hive实例
启动hive数据源,dbname为test
try{
SQLUtil.startPool("test",//数据源名称
"org.apache.hive.jdbc.HiveDriver",//hive驱动
"jdbc:hive2://hadoop34:10000/default",//hive链接串
"hadoop","hadoop",//数据库账号和口令
"select 1 " //数据库连接校验sql
);
在hive数据源上执行查询,dbname为test:
List<HashMap> datas = SQLExecutor.queryListWithDBName(HashMap.class,"test", "select * from t_hive");
for(int i = 0; datas != null && i < datas.size(); i ++)
{
System.out.println(datas.get(i));
}
} catch(SQLException e) {
e.printStackTrace();
}
分享到:
相关推荐
bboss+es基本操作示例,elasticsearch,bboss,java使用demo
bboss会话共享培训文档,学习bboss不可多得的资料,值得拥有。
bboss es特点请访问: https://www.oschina.net/p/bboss-elastic
企业级 J2EE 开源框架:bboss
bboss功能涵盖ioc,mvc,jsp自定义标签库,持久层,全局事务托管,安全认证,SSO,web会话共享,cxfwebservice服务发布和管理,hessian服务发布和管理等功能。另外还提供了符合中国式自由流的bboss activiti工作流...
NULL 博文链接:https://yin-bp.iteye.com/blog/926166
springboot集成ElasticsearchBboss调用Elasticsearch的案例分享
官方版本,亲测可用
资源目录: 项目源码(eshelloword.rar) bboss elasticsearch开发入门教程.wmv 搭建bboss elasticsearch开发环境.wmv 说明.txt
Elasticsearch rest client bboss介绍-Elastic2018中国开发者大会演讲稿
本实例是一个基于bboss es spring boot starter的demo maven工程,可供spring boot项目集成bboss elasticsearch rest client参考 展示了通过spring boot管理单集群功能和管理多集群功能 单集群测试用例:...
NULL 博文链接:https://yin-bp.iteye.com/blog/2174863
NULL 博文链接:https://yin-bp.iteye.com/blog/2177475
浙江移动BBOSS系统快速入门手册V0.1归类.pdf
NULL 博文链接:https://yin-bp.iteye.com/blog/1131637
bboss-datatran 由 bboss 开源的数据采集&流批一体化工具,提供数据采集、数据清洗转换处理和数据入库以及数据指标统计计算流批一体化处理功能。
NULL 博文链接:https://yin-bp.iteye.com/blog/1449900
官方版本,亲测可用
基于java语言比mybatis更实用的orm框架,支持mysql、oracle、postgresql、sqlserver、db2、dm、mongodb
Bboss国际化实践.ppt