[jira] [Commented] (KAFKA-3189) Kafka server always return UnknownServerException.
[ https://issues.apache.org/jira/browse/KAFKA-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128739#comment-15128739 ] Jiangjie Qin commented on KAFKA-3189: - [~granthenke] The exception I saw was InvalidMessageException. I saw it is inherited from CorruptRecordException. But it seems Errors.forException() needs the exception class to be the exact class, so it does not map the subclass InvalidMessageException to the correct error code. Instead it returns -1 which is UnknownServerException. > Kafka server always return UnknownServerException. > -- > > Key: KAFKA-3189 > URL: https://issues.apache.org/jira/browse/KAFKA-3189 > Project: Kafka > Issue Type: Bug > Components: core >Reporter: Jiangjie Qin >Assignee: Grant Henke > Fix For: 0.9.1.0 > > > This issue was introduced in KAFKA-2929. The problem is that we are using > o.a.k.common.protocol.Errors.forException() while all exceptions thrown by > the broker are still using old scala exception. This cause > Errors.forException() always return UnknownServerException. > We should either switch back to Errors.forException() to > ErrorMapping.codeFor() or migrate all the exceptions to Java exception. > I prefer the latter option since it seems to be a simple class replacement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3189) Kafka server always return UnknownServerException.
[ https://issues.apache.org/jira/browse/KAFKA-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128284#comment-15128284 ] Grant Henke commented on KAFKA-3189: [~becket_qin] Could you be more specific how/when you are seeing the issue? Most of the server side exceptions were migrated to the new clients exception classes and the ones that weren't inherit from them so they can still be caught. There could be a place that was missed. I will look through the code to try and find any gaps. > Kafka server always return UnknownServerException. > -- > > Key: KAFKA-3189 > URL: https://issues.apache.org/jira/browse/KAFKA-3189 > Project: Kafka > Issue Type: Bug > Components: core >Reporter: Jiangjie Qin >Assignee: Grant Henke > Fix For: 0.9.1.0 > > > This issue was introduced in KAFKA-2929. The problem is that we are using > o.a.k.common.protocol.Errors.forException() while all exceptions thrown by > the broker are still using old scala exception. This cause > Errors.forException() always return UnknownServerException. > We should either switch back to Errors.forException() to > ErrorMapping.codeFor() or migrate all the exceptions to Java exception. > I prefer the latter option since it seems to be a simple class replacement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3189) Kafka server always return UnknownServerException.
[ https://issues.apache.org/jira/browse/KAFKA-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15127475#comment-15127475 ] Jiangjie Qin commented on KAFKA-3189: - [~junrao] Would like to see if you have any concern on moving all the exceptions to client exception class? It looks a simple replacement. > Kafka server always return UnknownServerException. > -- > > Key: KAFKA-3189 > URL: https://issues.apache.org/jira/browse/KAFKA-3189 > Project: Kafka > Issue Type: Bug > Components: core >Reporter: Jiangjie Qin > Fix For: 0.9.0.1 > > > This issue was introduced in KAFKA-2929. The problem is that we are using > o.a.k.common.protocol.Errors.forException() while all exceptions thrown by > the broker are still using old scala exception. This cause > Errors.forException() always return UnknownServerException. > We should either switch back to Errors.forException() to > ErrorMapping.codeFor() or migrate all the exceptions to Java exception. > I prefer the latter option since it seems to be a simple class replacement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3189) Kafka server always return UnknownServerException.
[ https://issues.apache.org/jira/browse/KAFKA-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15127813#comment-15127813 ] Ismael Juma commented on KAFKA-3189: Changed the fix version to 0.9.1.0 as it doesn't affect the 0.9.0 branch. The aim of KAFKA-2929 was to switch the broker to the Java exceptions. cc [~granthenke] > Kafka server always return UnknownServerException. > -- > > Key: KAFKA-3189 > URL: https://issues.apache.org/jira/browse/KAFKA-3189 > Project: Kafka > Issue Type: Bug > Components: core >Reporter: Jiangjie Qin > Fix For: 0.9.1.0 > > > This issue was introduced in KAFKA-2929. The problem is that we are using > o.a.k.common.protocol.Errors.forException() while all exceptions thrown by > the broker are still using old scala exception. This cause > Errors.forException() always return UnknownServerException. > We should either switch back to Errors.forException() to > ErrorMapping.codeFor() or migrate all the exceptions to Java exception. > I prefer the latter option since it seems to be a simple class replacement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)