请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

测试增量索引监听binlog没有效果

老师你好,我在测试增量索引服务的监听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 群随时交流、讨论,也非常感谢同学的支持!

1 回复 有任何疑惑可以回复我~
  • 提问者 慕数据3335118 #1
    Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
    老师他启动的时候报了这个有影响吗
    回复 有任何疑惑可以回复我~ 2019-08-01 13:49:12
  • 张勤一 回复 提问者 慕数据3335118 #2
    这个是驱动的 Warning,没有影响,也可以在 application.yml 中设置一下。可以参考我在 git 上上传的重构之后的代码的配置:https://git.imooc.com/coding-310/Imooc-Ad/src/master/project/refactor%20version/imooc-ad-spring-cloud/imooc-ad-service/ad-sponsor/src/main/resources/application.yml
    回复 有任何疑惑可以回复我~ 2019-08-01 13:57:28
  • 提问者 慕数据3335118 回复 张勤一 #3
    谢谢老师
    回复 有任何疑惑可以回复我~ 2019-08-01 15:11:46
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号