58 同城 —— 《Oceanus 使用文档》
目录
目录 ................................................................................................................................................... 5!
1 引言 ................................................................................................................................................ 6!
1.1 编写目的 ............................................................................................................................ 6!
1.2 相关背景 ............................................................................................................................ 6!
1.2.1 数据积累,分库分表需求迫切 ............................................................................. 6!
1.2.2 分库分表逻辑与业务耦合 ...................................................................................... 6!
1.2.3 监控、连接池、Load Balance、HA、可扩展、可视化 ..................................... 6!
2 配置说明 ....................................................................................................................................... 7!
2.1 threadpool ......................................................................................................................... 7!
2.2 bean .................................................................................................................................. 7!
2.3 datanode ........................................................................................................................... 8!
2.4 namenode ....................................................................................................................... 10!
2.5 table ................................................................................................................................ 10!
2.6 function ........................................................................................................................... 11!
2.7 tracker ............................................................................................................................. 12!
2.8 include ............................................................................................................................ 12!
3 编码调用 ..................................................................................................................................... 13!
3.1 初始化 .............................................................................................................................. 13!
3.2 获取链接 .......................................................................................................................... 13!
3.3 事务的写法 ...................................................................................................................... 14!
3.4 自定义路由逻辑函数 ...................................................................................................... 14!
3.5 自定义埋点函数 .............................................................................................................. 15!
5 报警 ............................................................................................................................................. 16!
5.1 实现 com.bj58.oceanus.core.alarm.Alarm 接口 .............................................................. 16!
5.2 继承 com.bj58.oceanus.core.alarm.PeriodicAlarm 抽象类 ............................................ 16!
6 对象关系映射(ORM) ................................................................................................................. 17!
6.1 持久化对象(PO)注解 ...................................................................................................... 17!
6.2 数据访问层继承 com.bj58.oceanus.client.orm.BaseDao ............................................... 17!
7 组件补充说明 ............................................................................................................................. 18!
7.1 链接池 .............................................................................................................................. 18!
7.2 对 mybatis 的支持 ........................................................................................................... 19!
7.2 对 hibernate 的支持 ......................................................................................................... 19!
评论0