druid icon indicating copy to clipboard operation
druid copied to clipboard

BUG: repeat fail if 'broker' time zone set to 'Asia/Shanghai' for 'Kafka Indexing Service'

Open hamlet-lee opened this issue 10 years ago • 7 comments

In overlord log, I can see something like below:

2016-07-14T12:39:23,487 INFO [qtp1522494105-153] io.druid.indexing.common.actions.LocalTaskActionClient - Performing action for task[index_kafka_test1_analyzer2.web_5d13bbec2501a66_iefcihpc]: SegmentAllocateAction{dataSource='test1_analyzer2.web', timestamp=2016-07-14T12:36:27.000+08:00, queryGranularity=DurationGranularity{length=60000, origin=0}, preferredSegmentGranularity=DAY, sequenceName='index_kafka_test1_analyzer2.web_5d13bbec2501a66_3', previousSegmentId='null'}
2016-07-14T12:39:23,491 WARN [qtp1522494105-153] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T00:00:00.000+08:00/2016-07-15T00:00:00.000+08:00], maxVersion[2016-07-14T12:39:23.489+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:23,493 WARN [qtp1522494105-153] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:00:00.000+08:00/2016-07-14T18:00:00.000+08:00], maxVersion[2016-07-14T12:39:23.489+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:23,494 WARN [qtp1522494105-153] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:00:00.000+08:00/2016-07-14T13:00:00.000+08:00], maxVersion[2016-07-14T12:39:23.489+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:23,496 WARN [qtp1522494105-153] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:30:00.000+08:00/2016-07-14T12:45:00.000+08:00], maxVersion[2016-07-14T12:39:23.489+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:23,498 WARN [qtp1522494105-153] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:30:00.000+08:00/2016-07-14T12:40:00.000+08:00], maxVersion[2016-07-14T12:39:23.489+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:23,500 WARN [qtp1522494105-153] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:35:00.000+08:00/2016-07-14T12:40:00.000+08:00], maxVersion[2016-07-14T12:39:23.489+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:23,502 WARN [qtp1522494105-153] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:36:00.000+08:00/2016-07-14T12:37:00.000+08:00], maxVersion[2016-07-14T12:39:23.489+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:39,053 INFO [qtp1522494105-115] io.druid.indexing.common.actions.LocalTaskActionClient - Performing action for task[index_kafka_test1_analyzer2.web_5d13bbec2501a66_kckkgaak]: SegmentAllocateAction{dataSource='test1_analyzer2.web', timestamp=2016-07-14T12:36:27.000+08:00, queryGranularity=DurationGranularity{length=60000, origin=0}, preferredSegmentGranularity=DAY, sequenceName='index_kafka_test1_analyzer2.web_5d13bbec2501a66_3', previousSegmentId='null'}
2016-07-14T12:39:39,055 WARN [qtp1522494105-115] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T00:00:00.000+08:00/2016-07-15T00:00:00.000+08:00], maxVersion[2016-07-14T12:39:39.054+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:39,057 WARN [qtp1522494105-115] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:00:00.000+08:00/2016-07-14T18:00:00.000+08:00], maxVersion[2016-07-14T12:39:39.054+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:39,058 WARN [qtp1522494105-115] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:00:00.000+08:00/2016-07-14T13:00:00.000+08:00], maxVersion[2016-07-14T12:39:39.054+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:39,060 WARN [qtp1522494105-115] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:30:00.000+08:00/2016-07-14T12:45:00.000+08:00], maxVersion[2016-07-14T12:39:39.054+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:39,061 WARN [qtp1522494105-115] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:30:00.000+08:00/2016-07-14T12:40:00.000+08:00], maxVersion[2016-07-14T12:39:39.054+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:39,062 WARN [qtp1522494105-115] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:35:00.000+08:00/2016-07-14T12:40:00.000+08:00], maxVersion[2016-07-14T12:39:39.054+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].
2016-07-14T12:39:39,064 WARN [qtp1522494105-115] io.druid.metadata.IndexerSQLMetadataStorageCoordinator - Cannot allocate new segment for dataSource[test1_analyzer2.web], interval[2016-07-14T12:36:00.000+08:00/2016-07-14T12:37:00.000+08:00], maxVersion[2016-07-14T12:39:39.054+08:00]: conflicting segment[test1_analyzer2.web_2016-07-14T00:00:00.000+08:00_2016-07-15T00:00:00.000+08:00_2016-07-14T11:47:50.363+08:00].

over and over again.

In middle manager I can see below:

2016-07-14T12:43:30,650 INFO [forking-task-runner-22] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_meffcpok] status changed to [RUNNING].
2016-07-14T12:43:38,554 INFO [forking-task-runner-22] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_meffcpok] status changed to [FAILED].
2016-07-14T12:43:38,572 INFO [forking-task-runner-23] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_opbejkbj] location changed to [TaskLocation{host='hd020.corp.yodao.com', port=8100}].
2016-07-14T12:43:38,572 INFO [forking-task-runner-23] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_opbejkbj] status changed to [RUNNING].
2016-07-14T12:43:41,725 INFO [forking-task-runner-23] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_opbejkbj] status changed to [FAILED].
2016-07-14T12:43:41,742 INFO [forking-task-runner-24] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_iljdcgnb] location changed to [TaskLocation{host='hd020.corp.yodao.com', port=8100}].
2016-07-14T12:43:41,742 INFO [forking-task-runner-24] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_iljdcgnb] status changed to [RUNNING].
2016-07-14T12:43:46,455 INFO [forking-task-runner-25] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_hkmiloml] location changed to [TaskLocation{host='hd020.corp.yodao.com', port=8100}].
2016-07-14T12:43:46,455 INFO [forking-task-runner-25] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_hkmiloml] status changed to [RUNNING].
2016-07-14T12:43:53,581 INFO [forking-task-runner-25] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_hkmiloml] status changed to [FAILED].
2016-07-14T12:43:53,599 INFO [forking-task-runner-26] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_kafka_test1_analyzer2.web_5d13bbec2501a66_mkalhfob] location changed to [TaskLocation{host='hd020.corp.yodao.com', port=8100}].

over and over again.

After debugging overlord's "AllocateSegmentAction", I found that this is related to timezone setting.

I had set "-Duser.timezone=Asia/Shanghai" for overlord and all druid process

And in the IndexerSQLMetadataStorageCoordinator:

              if (!max.getInterval().equals(interval) || max.getVersion().compareTo(maxVersion) > 0) 

this "equals" do not evaluates to TRUE if one time zone is "FixedDateTimeZone" (UTF+8) and another is "CachedDateTmieZone"(Asia/Shanghai) although they are both GMT+08:00.

After the investigation, I tried "-Duser.timezone=GMT+8" instead of "-Duser.timezone=Asia/Shanghai" for overlord. This setting works fine.

I think this is a BUG. Would you great developer fix this? thx~

hamlet-lee avatar Jul 18 '16 08:07 hamlet-lee

Thanks @hamlet-lee for the report. This looks like a special-case of #2619.

gianm avatar Jul 18 '16 17:07 gianm

I have set "-Duser.timezone=GMT+8" for overlord, but it still has this question. @hamlet-lee

licl2014 avatar Nov 22 '17 09:11 licl2014

maybe you could try to debug the code and find the cause @licl2014

hamlet-lee avatar Nov 23 '17 07:11 hamlet-lee

@hamlet-lee thanks, i have resolved that. After i set timeZone of segmentGranularity in supervisor-spec.json, it works fine.

licl2014 avatar Nov 23 '17 12:11 licl2014

@hamlet-lee @licl2014 there have been some commits recently that should make things work better in non-UTC server timezones. They are in 0.11.0 if you want to give the release candidate a shot: http://druid.io/downloads.html

gianm avatar Nov 28 '17 01:11 gianm

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

stale[bot] avatar Jun 21 '19 14:06 stale[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

stale[bot] avatar Jul 05 '19 15:07 stale[bot]