2 Star 4 Fork 43

joezxh / elasticsearch-wrapper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

elasticsearch-wrapper

/** *
*@author Jason峰 Wind
*@Date 2015-10-01
*@Company Baidu
*
*/

简介
1、elasticsearch代理服务,类似于DB-proxy、JDBC-sharding
2、主要提供了集群压力限流、读写分离、异步请求、异常跟踪记录、负载均衡、热部署、ES集群压力监控等等功能
3、纯JAVA编写、多线程、低耦合、模块化、可插拔、异步非阻塞web server服务!

Introduction 1、elasticsearch proxy service,like db-proxy、JDBC-sharding
2、Main modules supported currently:parallel tasks throttle、read-write separation、async request、illegal operations logging and tracking、load balance、hot deployment、cluster monitor and warning and so on.
3、Web service which built in java with multiple threads(threadPool)、Low Coupling and nio concept. In addition,Also designed in modules which can be added and removed neatly if needed.

/** *
*@author Joe.zhang
*@Date 2016-06-20
*@Company U51
*
*/

原作者没有继续,可能工作忙吧,想接手看看,然后在自己的项目中用用看。

打包安装方法:
1、mvn 安装,不多讲了吧,没有的不会的就别继续看了;

2、修改配置:src/main/resources/wrapper-common.properties 文件以下属性:

    #默认集群名,改为你的本地es集群名   
	defaultClusterName=vdata-test  
	#默认超时时间  
	defaultTimeout=30000  
	#默认日志存放路径,这个改一下哦  
	defaultLogDir=/Users/admin/  
	defaultSlowTimeout=300000  

3、修改数据库连接,初始化mysql数据库; 修改src/resources/application.properties文件,修改相关数据库连接

#mysql
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/eswrapper?useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=password
hibernate.dialect=org.hibernate.dialect.MySQLDialect
#pool settings
jdbc.pool.init=1
jdbc.pool.minIdle=3
jdbc.pool.maxActive=20
#jdbc.testSql=SELECT 'x'
jdbc.testSql=SELECT 'x' FROM DUAL

使用resource/eswrapper.sql建立初始化mysql数据库。

3、运行 :mvn package

4、eswrapper/target下生成:es-wrapper.war包,放到tomcat webapp下;

6、访问tomcat服务:http://localhost:8080/es-wrapper/es/ http://localhost:8080/es-wrapper/ 进入管理界面

返回 es集群一样的默认信息,如下类似,恭喜你,你成功了,百度你这个东西你也有了:  
```

{
"name" : "tt74",
"cluster_name" : "v-test",
"version" : {
"number" : "2.3.3",
"build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
"build_timestamp" : "2016-05-17T15:40:04Z",
"build_snapshot" : false,
"lucene_version" : "5.5.0"
},
"tagline" : "You Know, for Search"
}

  

空文件

简介

elasticsearch代理服务,类似于DB-proxy、JDBC-sharding等代理工具 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/joezxh/elasticsearch-wrapper.git
git@gitee.com:joezxh/elasticsearch-wrapper.git
joezxh
elasticsearch-wrapper
elasticsearch-wrapper
joezxh/es-wrapper

搜索帮助