[
https://issues.apache.org/jira/browse/FLINK-3368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15150803#comment-15150803
]
ASF GitHub Bot commented on FLINK-3368:
---------------------------------------
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/1623#issuecomment-185307346
I have some comments, here is a first batch:
The `ZooKeeperStringSerializer` seems to be only used in tests, but adds a
hard compile-scope dependency to `org.I0Itec:ZkClient`. Moving this to test
scope gets rid of this.
There are some old functions that seem to have no more use:
- KafkaTopicPartitionLeader.replaceIgnoringLeader()
- KafkaTopicPartition.isContained()
In the `OffsetHandler` / `ZookeeperOffsetHandler`, the `getOffsets(...)`
methods can probably get rid of the `Fetcher` (since it does not position the
fetcher any more.
There is a lot of option parsing with no checks and proper exceptions. If
someone puts in a wrong value, all they see is an exception in
`Integer.valueOf()`. In most other places of the code, there is a lot of effort
to give good messages on parse errors.
Note: Given all the discussion about dependency clashes / shading and
resulting issues, I would like to reduce dependencies as much as possible. The
Kafka code adds the Guava dependency simply for the `checkNotNull` method. I
would simpyl use `java.util.Object.requiteNotNull` instead and get rid of the
dependency.
> Kafka 0.8 consumer fails to recover from broker shutdowns
> ---------------------------------------------------------
>
> Key: FLINK-3368
> URL: https://issues.apache.org/jira/browse/FLINK-3368
> Project: Flink
> Issue Type: Bug
> Components: Kafka Connector
> Affects Versions: 1.0.0
> Reporter: Robert Metzger
> Assignee: Robert Metzger
> Priority: Blocker
>
> It seems that the Kafka Consumer (0.8) fails to restart a job after it failed
> due to a Kafka broker shutdown.
> {code}
> java.lang.Exception: Unable to get last offset for partitions [FetchPartition
> {topic=a, partition=13, offset=-915623761776}, FetchPartition {topic=b,
> partition=13, offset=-915623761776}, FetchPartition {topic=c, partition=13,
> offset=-915623761776}, FetchPartition {topic=d, partition=13,
> offset=-915623761776}, FetchPartition {topic=e, partition=13,
> offset=-915623761776}, FetchPartition {topic=f, partition=13,
> offset=-915623761776}, FetchPartition {topic=g, partition=13,
> offset=-915623761776}].
> Exception for partition 13: kafka.common.NotLeaderForPartitionException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
> at java.lang.Class.newInstance(Class.java:442)
> at kafka.common.ErrorMapping$.exceptionFor(ErrorMapping.scala:86)
> at kafka.common.ErrorMapping.exceptionFor(ErrorMapping.scala)
> at
> org.apache.flink.streaming.connectors.kafka.internals.LegacyFetcher$SimpleConsumerThread.getLastOffset(LegacyFetcher.java:551)
> at
> org.apache.flink.streaming.connectors.kafka.internals.LegacyFetcher$SimpleConsumerThread.run(LegacyFetcher.java:379)
> {code}
> I haven't understood the cause of this issue, but I'll investigate it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)