测试增量索引监听binlog没有效果
来源:14-8 【总结与作业】关于广告系统可用性测试的介绍及说明 - HTTP 接口测试

慕数据3335118
2019-08-01
老师你好,我在测试增量索引服务的监听binlog没有效果 而且没有报错
相同的设置 我用测试测就能监听到 ,我感觉是他客户端没有去连接数据库的binlog
这是我的搜索服务的启动信息
name: default
...]
2019-08-01 13:34:00.726 INFO 17084 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2019-08-01 13:34:00.728 INFO 17084 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2019-08-01 13:34:00.795 INFO 17084 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-08-01 13:34:00.932 INFO 17084 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-08-01 13:34:01.125 INFO 17084 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-08-01 13:34:01.185 INFO 17084 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing FeignContext-eureka-client-ad-spansor: startup date [Thu Aug 01 13:34:01 CST 2019]; parent: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6ed3f258
2019-08-01 13:34:01.201 INFO 17084 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-08-01 13:34:01.475 INFO 17084 --- [ main] cn.xxx.ad.index.adplan.AdPlanIndex : before Add:{}
2019-08-01 13:34:01.475 INFO 17084 --- [ main] cn.xxx.ad.index.adplan.AdPlanIndex : After Add:{10=AdPlanObject(planId=10, userId=15, planStatus=1, startDate=Wed Nov 28 08:00:00 CST 2018, endDate=Wed Nov 20 08:00:00 CST 2019)}
2019-08-01 13:34:01.480 INFO 17084 --- [ main] cn.xxx.ad.index.creative.CreativeIndex : before add: {}
2019-08-01 13:34:01.480 INFO 17084 --- [ main] cn.xxx.ad.index.creative.CreativeIndex : after add: {10=CreativeObject(adId=10, name=第一个创意, type=1, materialType=1, height=720, width=1080, auditStatus=1, adUrl=https://www.imooc.com)}
2019-08-01 13:34:01.484 INFO 17084 --- [ main] cn.xxx.ad.index.adunit.AdUnitIndex : before add: {}
2019-08-01 13:34:01.484 INFO 17084 --- [ main] cn.xxx.ad.index.adunit.AdUnitIndex : after add: {10=AdUnitObject(unitId=10, unitStatus=1, positionType=1, planId=10, adPlanObject=AdPlanObject(planId=10, userId=15, planStatus=1, startDate=Wed Nov 28 08:00:00 CST 2018, endDate=Wed Nov 20 08:00:00 CST 2019))}
2019-08-01 13:34:01.484 INFO 17084 --- [ main] cn.xxx.ad.index.adunit.AdUnitIndex : before add: {10=AdUnitObject(unitId=10, unitStatus=1, positionType=1, planId=10, adPlanObject=AdPlanObject(planId=10, userId=15, planStatus=1, startDate=Wed Nov 28 08:00:00 CST 2018, endDate=Wed Nov 20 08:00:00 CST 2019))}
2019-08-01 13:34:01.484 INFO 17084 --- [ main] cn.xxx.ad.index.adunit.AdUnitIndex : after add: {10=AdUnitObject(unitId=10, unitStatus=1, positionType=1, planId=10, adPlanObject=AdPlanObject(planId=10, userId=15, planStatus=1, startDate=Wed Nov 28 08:00:00 CST 2018, endDate=Wed Nov 20 08:00:00 CST 2019)), 12=AdUnitObject(unitId=12, unitStatus=1, positionType=1, planId=10, adPlanObject=AdPlanObject(planId=10, userId=15, planStatus=1, startDate=Wed Nov 28 08:00:00 CST 2018, endDate=Wed Nov 20 08:00:00 CST 2019))}
2019-08-01 13:34:01.489 INFO 17084 --- [ main] c.x.a.i.creativeunit.CreativeUnitIndex : before add: {}
2019-08-01 13:34:01.492 INFO 17084 --- [ main] c.x.a.i.creativeunit.CreativeUnitIndex : after add: {10-10=CreativeUnitObject(adId=10, unitId=10)}
2019-08-01 13:34:01.495 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, before add: {}
2019-08-01 13:34:01.496 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, after add: {10=[安徽省-淮北市]}
2019-08-01 13:34:01.496 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, before add: {10=[安徽省-淮北市]}
2019-08-01 13:34:01.496 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, after add: {10=[安徽省-宿州市, 安徽省-淮北市]}
2019-08-01 13:34:01.496 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, before add: {10=[安徽省-宿州市, 安徽省-淮北市]}
2019-08-01 13:34:01.497 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, after add: {10=[安徽省-合肥市, 安徽省-宿州市, 安徽省-淮北市]}
2019-08-01 13:34:01.497 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, before add: {10=[安徽省-合肥市, 安徽省-宿州市, 安徽省-淮北市]}
2019-08-01 13:34:01.497 INFO 17084 --- [ main] c.x.ad.index.district.UnitDistrictIndex : UnitDistrictIndex, after add: {10=[安徽省-合肥市, 安徽省-宿州市, 安徽省-淮北市, 辽宁省-大连市]}
2019-08-01 13:34:01.502 INFO 17084 --- [ main] cn.xxx.ad.index.interest.UnitItIndex : UnitItIndex, before add: {}
2019-08-01 13:34:01.502 INFO 17084 --- [ main] cn.xxx.ad.index.interest.UnitItIndex : UnitItIndex, after add: {10=[台球]}
2019-08-01 13:34:01.502 INFO 17084 --- [ main] cn.xxx.ad.index.interest.UnitItIndex : UnitItIndex, before add: {10=[台球]}
2019-08-01 13:34:01.502 INFO 17084 --- [ main] cn.xxx.ad.index.interest.UnitItIndex : UnitItIndex, after add: {10=[台球, 游泳]}
2019-08-01 13:34:01.502 INFO 17084 --- [ main] cn.xxx.ad.index.interest.UnitItIndex : UnitItIndex, before add: {10=[台球, 游泳]}
2019-08-01 13:34:01.502 INFO 17084 --- [ main] cn.xxx.ad.index.interest.UnitItIndex : UnitItIndex, after add: {10=[乒乓球, 台球, 游泳]}
2019-08-01 13:34:01.507 INFO 17084 --- [ main] c.xxx.ad.index.keyword.UnitKeywordIndex : UnitKeywordIndex, before add: {}
2019-08-01 13:34:01.508 INFO 17084 --- [ main] c.xxx.ad.index.keyword.UnitKeywordIndex : UnitKeywordIndex, after add: {10=[宝马]}
2019-08-01 13:34:01.508 INFO 17084 --- [ main] c.xxx.ad.index.keyword.UnitKeywordIndex : UnitKeywordIndex, before add: {10=[宝马]}
2019-08-01 13:34:01.508 INFO 17084 --- [ main] c.xxx.ad.index.keyword.UnitKeywordIndex : UnitKeywordIndex, after add: {10=[奥迪, 宝马]}
2019-08-01 13:34:01.508 INFO 17084 --- [ main] c.xxx.ad.index.keyword.UnitKeywordIndex : UnitKeywordIndex, before add: {10=[奥迪, 宝马]}
2019-08-01 13:34:01.508 INFO 17084 --- [ main] c.xxx.ad.index.keyword.UnitKeywordIndex : UnitKeywordIndex, after add: {10=[大众, 奥迪, 宝马]}
2019-08-01 13:34:01.632 INFO 17084 --- [ main] c.x.ad.mysql.listener.IncrementListener : IncrementListener register db and table info
2019-08-01 13:34:01.633 INFO 17084 --- [ main] c.x.a.m.listener.AggregationListener : register : ad_data-ad_unit_it
2019-08-01 13:34:01.633 INFO 17084 --- [ main] c.x.a.m.listener.AggregationListener : register : ad_data-ad_unit
2019-08-01 13:34:01.633 INFO 17084 --- [ main] c.x.a.m.listener.AggregationListener : register : ad_data-ad_plan
2019-08-01 13:34:01.633 INFO 17084 --- [ main] c.x.a.m.listener.AggregationListener : register : ad_data-ad_creative
2019-08-01 13:34:01.633 INFO 17084 --- [ main] c.x.a.m.listener.AggregationListener : register : ad_data-creative_unit
2019-08-01 13:34:01.633 INFO 17084 --- [ main] c.x.a.m.listener.AggregationListener : register : ad_data-ad_unit_keyword
2019-08-01 13:34:01.633 INFO 17084 --- [ main] c.x.a.m.listener.AggregationListener : register : ad_data-ad_unit_district
2019-08-01 13:34:01.676 INFO 17084 --- [ main] o.s.ui.freemarker.SpringTemplateLoader : SpringTemplateLoader for FreeMarker: using resource loader [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6ed3f258: startup date [Thu Aug 01 13:33:56 CST 2019]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@49438269] and template loader path [classpath:/templates/]
2019-08-01 13:34:01.677 INFO 17084 --- [ main] o.s.w.s.v.f.FreeMarkerConfigurer : ClassTemplateLoader for Spring macros added to FreeMarker configuration
2019-08-01 13:34:01.721 WARN 17084 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources
写回答
1回答
-
同学你好:
看这个启动日志,是没有任何问题的。我建议在监听 Binlog 的代码处打印一些日志,修改数据之后,看看日志是否打印,以此来确定监听 Binlog 是否生效。
欢迎来 QQ 群随时交流、讨论,也非常感谢同学的支持!
132019-08-01