[jira] [Created] (KAFKA-5286) Producer should await transaction completion in close

2017-05-18 Thread Jason Gustafson (JIRA)
Jason Gustafson created KAFKA-5286:
--

 Summary: Producer should await transaction completion in close
 Key: KAFKA-5286
 URL: https://issues.apache.org/jira/browse/KAFKA-5286
 Project: Kafka
  Issue Type: Sub-task
Reporter: Jason Gustafson


We should wait at least as long as the timeout for a transaction which has 
begun completion (commit or abort) to be finished. Tricky thing is whether we 
should abort a transaction which is in progress. It seems reasonable since 
that's the coordinator will either timeout and abort the transaction or the 
next producer using the same transactionalId will fence the producer and abort 
the transaction. In any case, the transaction will be aborted, so perhaps we 
should do it proactively.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Jenkins build is back to normal : kafka-trunk-jdk7 #2231

2017-05-18 Thread Apache Jenkins Server
See 




Build failed in Jenkins: kafka-trunk-jdk7 #2230

2017-05-18 Thread Apache Jenkins Server
See 


Changes:

[ismael] KAFKA-5250: Do fetch down conversion after throttling

--
[...truncated 819.69 KB...]

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotOverwriteLogEndOffsetForALeaderEpochOnceItHasBeenAssigned STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotOverwriteLogEndOffsetForALeaderEpochOnceItHasBeenAssigned PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnUndefinedOffsetIfUndefinedEpochRequested STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnUndefinedOffsetIfUndefinedEpochRequested PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldIncreaseAndTrackEpochsAsLeadersChangeManyTimes STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldIncreaseAndTrackEpochsAsLeadersChangeManyTimes PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldSupportEpochsThatDoNotStartFromZero STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldSupportEpochsThatDoNotStartFromZero PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnUnsupportedIfRequestedEpochLessThanFirstEpoch STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnUnsupportedIfRequestedEpochLessThanFirstEpoch PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnNextAvailableEpochIfThereIsNoExactEpochForTheOneRequested STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnNextAvailableEpochIfThereIsNoExactEpochForTheOneRequested PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldAddEpochAndMessageOffsetToCache STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldAddEpochAndMessageOffsetToCache PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldDropEntriesOnEpochBoundaryWhenRemovingLatestEntries STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldDropEntriesOnEpochBoundaryWhenRemovingLatestEntries PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldUpdateSavedOffsetWhenOffsetToClearToIsBetweenEpochs STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldUpdateSavedOffsetWhenOffsetToClearToIsBetweenEpochs PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotResetEpochHistoryTailIfUndefinedPassed STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotResetEpochHistoryTailIfUndefinedPassed PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnUnsupportedIfNoEpochRecorded STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnUnsupportedIfNoEpochRecorded PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldRetainLatestEpochOnClearAllEarliest STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldRetainLatestEpochOnClearAllEarliest PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldPersistEpochsBetweenInstances STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldPersistEpochsBetweenInstances PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotClearAnythingIfOffsetToFirstOffset STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotClearAnythingIfOffsetToFirstOffset PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotLetOffsetsGoBackwardsEvenIfEpochsProgress STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldNotLetOffsetsGoBackwardsEvenIfEpochsProgress PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldGetFirstOffsetOfSubsequentEpochWhenOffsetRequestedForPreviousEpoch STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldGetFirstOffsetOfSubsequentEpochWhenOffsetRequestedForPreviousEpoch PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldUpdateOffsetBetweenEpochBoundariesOnClearEarliest2 STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldUpdateOffsetBetweenEpochBoundariesOnClearEarliest2 PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > shouldClearEarliestOnEmptyCache 
STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > shouldClearEarliestOnEmptyCache 
PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldPreserveResetOffsetOnClearEarliestIfOneExists STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldPreserveResetOffsetOnClearEarliestIfOneExists PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldUpdateOffsetBetweenEpochBoundariesOnClearEarliest STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldUpdateOffsetBetweenEpochBoundariesOnClearEarliest PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnInvalidOffsetIfEpochIsRequestedWhichIsNotCurrentlyTracked STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > 
shouldReturnInvalidOffsetIfEpochIsRequestedWhichIsNotCurrentlyTracked PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > shouldFetchEndOffsetOfEmptyCache 
STARTED

kafka.server.epoch.LeaderEpochFileCacheTest > shouldFetchEndOffsetOfEmptyCache 
PASSED

kafka.server.epoch.LeaderEpochFileCacheTest > 

Build failed in Jenkins: kafka-0.11.0-jdk7 #2

2017-05-18 Thread Apache Jenkins Server
See 


Changes:

[wangguoz] KAFKA-5192: add WindowStore range scan (KIP-155)

--
[...truncated 884.98 KB...]
kafka.admin.TopicCommandTest > testCreateIfNotExists PASSED

kafka.admin.TopicCommandTest > testCreateAlterTopicWithRackAware STARTED

kafka.admin.TopicCommandTest > testCreateAlterTopicWithRackAware PASSED

kafka.admin.TopicCommandTest > testTopicDeletion STARTED

kafka.admin.TopicCommandTest > testTopicDeletion PASSED

kafka.admin.TopicCommandTest > testConfigPreservationAcrossPartitionAlteration 
STARTED

kafka.admin.TopicCommandTest > testConfigPreservationAcrossPartitionAlteration 
PASSED

kafka.admin.TopicCommandTest > testAlterIfExists STARTED

kafka.admin.TopicCommandTest > testAlterIfExists PASSED

kafka.admin.TopicCommandTest > testDeleteIfExists STARTED

kafka.admin.TopicCommandTest > testDeleteIfExists PASSED

kafka.controller.ControllerIntegrationTest > 
testPartitionReassignmentWithOfflineReplicaHaltingProgress STARTED

kafka.controller.ControllerIntegrationTest > 
testPartitionReassignmentWithOfflineReplicaHaltingProgress PASSED

kafka.controller.ControllerIntegrationTest > 
testControllerEpochPersistsWhenAllBrokersDown STARTED

kafka.controller.ControllerIntegrationTest > 
testControllerEpochPersistsWhenAllBrokersDown PASSED

kafka.controller.ControllerIntegrationTest > 
testTopicCreationWithOfflineReplica STARTED

kafka.controller.ControllerIntegrationTest > 
testTopicCreationWithOfflineReplica PASSED

kafka.controller.ControllerIntegrationTest > 
testPartitionReassignmentResumesAfterReplicaComesOnline STARTED

kafka.controller.ControllerIntegrationTest > 
testPartitionReassignmentResumesAfterReplicaComesOnline PASSED

kafka.controller.ControllerIntegrationTest > 
testLeaderAndIsrWhenEntireIsrOfflineAndUncleanLeaderElectionDisabled STARTED

kafka.controller.ControllerIntegrationTest > 
testLeaderAndIsrWhenEntireIsrOfflineAndUncleanLeaderElectionDisabled PASSED

kafka.controller.ControllerIntegrationTest > 
testTopicPartitionExpansionWithOfflineReplica STARTED

kafka.controller.ControllerIntegrationTest > 
testTopicPartitionExpansionWithOfflineReplica PASSED

kafka.controller.ControllerIntegrationTest > 
testPreferredReplicaLeaderElectionWithOfflinePreferredReplica STARTED

kafka.controller.ControllerIntegrationTest > 
testPreferredReplicaLeaderElectionWithOfflinePreferredReplica PASSED

kafka.controller.ControllerIntegrationTest > 
testAutoPreferredReplicaLeaderElection STARTED

kafka.controller.ControllerIntegrationTest > 
testAutoPreferredReplicaLeaderElection PASSED

kafka.controller.ControllerIntegrationTest > testTopicCreation STARTED

kafka.controller.ControllerIntegrationTest > testTopicCreation PASSED

kafka.controller.ControllerIntegrationTest > testPartitionReassignment STARTED

kafka.controller.ControllerIntegrationTest > testPartitionReassignment PASSED

kafka.controller.ControllerIntegrationTest > testTopicPartitionExpansion STARTED

kafka.controller.ControllerIntegrationTest > testTopicPartitionExpansion PASSED

kafka.controller.ControllerIntegrationTest > 
testControllerMoveIncrementsControllerEpoch STARTED

kafka.controller.ControllerIntegrationTest > 
testControllerMoveIncrementsControllerEpoch PASSED

kafka.controller.ControllerIntegrationTest > 
testLeaderAndIsrWhenEntireIsrOfflineAndUncleanLeaderElectionEnabled STARTED

kafka.controller.ControllerIntegrationTest > 
testLeaderAndIsrWhenEntireIsrOfflineAndUncleanLeaderElectionEnabled PASSED

kafka.controller.ControllerIntegrationTest > testEmptyCluster STARTED

kafka.controller.ControllerIntegrationTest > testEmptyCluster PASSED

kafka.controller.ControllerIntegrationTest > testPreferredReplicaLeaderElection 
STARTED

kafka.controller.ControllerIntegrationTest > testPreferredReplicaLeaderElection 
PASSED

kafka.controller.ControllerFailoverTest > testMetadataUpdate STARTED

kafka.controller.ControllerFailoverTest > testMetadataUpdate SKIPPED

kafka.tools.ConsoleProducerTest > testParseKeyProp STARTED

kafka.tools.ConsoleProducerTest > testParseKeyProp PASSED

kafka.tools.ConsoleProducerTest > testValidConfigsOldProducer STARTED

kafka.tools.ConsoleProducerTest > testValidConfigsOldProducer PASSED

kafka.tools.ConsoleProducerTest > testInvalidConfigs STARTED

kafka.tools.ConsoleProducerTest > testInvalidConfigs PASSED

kafka.tools.ConsoleProducerTest > testValidConfigsNewProducer STARTED

kafka.tools.ConsoleProducerTest > testValidConfigsNewProducer PASSED

kafka.tools.ConsoleConsumerTest > shouldLimitReadsToMaxMessageLimit STARTED

kafka.tools.ConsoleConsumerTest > shouldLimitReadsToMaxMessageLimit PASSED

kafka.tools.ConsoleConsumerTest > shouldParseValidNewConsumerValidConfig STARTED

kafka.tools.ConsoleConsumerTest > shouldParseValidNewConsumerValidConfig PASSED

kafka.tools.ConsoleConsumerTest > shouldStopWhenOutputCheckErrorFails STARTED

kafka.tools.ConsoleConsumerTest > 

0.11.0.0 Feature Freeze Update

2017-05-18 Thread Ismael Juma
Hi all,

As you hopefully know, are now past the feature freeze for 0.11.0.0. As
such, I have created the 0.11.0 branch, its Jenkins job and bumped the
Kafka version in trunk. From now on, if a change needs to be in 0.11.0.0,
it needs to be merged to trunk and the 0.11.0 branch.

As documented in the release plan, major features should now be merged and
we will be working on stabilization (tests, fixes, documentation, etc.).
Minor features (including minor changes to major features) with a PR can be
merged until next Wednesday (24th May). After that, it's all about fixes,
tests and documentation.

As a reminder, here are the upcoming important dates (also documented in
the release plan https://cwiki.apache.org/confluence/display/KAFKA/Release+
Plan+0.11.0.0):

   - Code Freeze: May 31, 2017 (first RC created now)
   - Release: June 14, 2017

Not long to go now. :)

KIPs: we have 32 adopted with almost all of them already committed. We have
bumped 7 KIPs to the next release. Now that we have created the 0.11.0
branch, we can start merging PRs for the next release.

Open JIRAs: As usual, we have a lot!

*https://issues.apache.org/jira/issues/?jql=project%20%3D%20KAFKA%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened%2C%20%22Patch%20Available%22)%20AND%20fixVersion%20%3D%200.11.0.0%20ORDER%20BY%20priority%20DESC
*

157 at the moment. Now that we are past the feature freeze, I will start
moving JIRAs to the next release.

* Closed JIRAs: So far ~265 closed tickets for 0.11.0.0:
https://issues.apache.org/jira/issues/?jql=project%20%3D%
20KAFKA%20AND%20status%20in%20(Resolved%2C%20Closed)%20AND
%20fixVersion%20%3D%200.11.0.0%20ORDER%20BY%20priority%20DESC

* Release features:
https://cwiki.apache.org/confluence/display/KAFKA/Release+Plan+0.11.0.0 has
a "Release Features" section that will be included with the release
notes/email for the release. I added some items to get it going. Please add
to
this list anything you think is worth noting.

If you missed any of the updates on the new time-based releases we'll be
following, see
https://cwiki.apache.org/confluence/display/KAFKA/Time+Based+Release+Plan
for an explanation.

I'll plan to give another update a week from now.

Thanks,
Ismael


[jira] [Updated] (KAFKA-5285) optimize upper / lower byte range for key range scan on windowed stores

2017-05-18 Thread Guozhang Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang updated KAFKA-5285:
-
Labels: performance  (was: )

> optimize upper / lower byte range for key range scan on windowed stores
> ---
>
> Key: KAFKA-5285
> URL: https://issues.apache.org/jira/browse/KAFKA-5285
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: Xavier Léauté
>Assignee: Xavier Léauté
>  Labels: performance
>
> The current implementation of {{WindowKeySchema}} / {{SessionKeySchema}} 
> {{upperRange}} and {{lowerRange}} does not make any assumptions with respect 
> to the other key bound (e.g. the upper byte bound does not depends on lower 
> key bound).
> It should be possible to optimize the byte range somewhat further using the 
> information provided by the lower bound.
> More specifically, by incorporating that information, we should be able to 
> eliminate the corresponding {{upperRangeFixedSize}} and 
> {{lowerRangeFixedSize}}, since the result should be the same if we implement 
> that optimization.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (KAFKA-5285) optimize upper / lower byte range for key range scan on windowed stores

2017-05-18 Thread JIRA
Xavier Léauté created KAFKA-5285:


 Summary: optimize upper / lower byte range for key range scan on 
windowed stores
 Key: KAFKA-5285
 URL: https://issues.apache.org/jira/browse/KAFKA-5285
 Project: Kafka
  Issue Type: Improvement
  Components: streams
Reporter: Xavier Léauté
Assignee: Xavier Léauté


The current implementation of {{WindowKeySchema}} / {{SessionKeySchema}} 
{{upperRange}} and {{lowerRange}} does not make any assumptions with respect to 
the other key bound (e.g. the upper byte bound does not depends on lower key 
bound).

It should be possible to optimize the byte range somewhat further using the 
information provided by the lower bound.

More specifically, by incorporating that information, we should be able to 
eliminate the corresponding {{upperRangeFixedSize}} and 
{{lowerRangeFixedSize}}, since the result should be the same if we implement 
that optimization.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5275) Review and potentially tweak AdminClient API for the initial release (KIP-117)

2017-05-18 Thread dan norwood (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016718#comment-16016718
 ] 

dan norwood commented on KAFKA-5275:


it would be nice to have a default {{describeTopics()}} that doesn't need a 
list of topics and just returns the description for all topics, right now i 
have to do 
{{adminClient.describeTopics(a.listTopics().names().get()).all().get();}} :/



> Review and potentially tweak AdminClient API for the initial release (KIP-117)
> --
>
> Key: KAFKA-5275
> URL: https://issues.apache.org/jira/browse/KAFKA-5275
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Ismael Juma
>Assignee: Ismael Juma
> Fix For: 0.11.0.0
>
>
> Once all the pieces are in, we should take a pass and ensure that the APIs 
> work well together and that they are consistent.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3027: KAFKA-5192 WindowStore range scan KIP-155

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3027


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (KAFKA-5192) Range Scan for Windowed State Stores

2017-05-18 Thread Guozhang Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang resolved KAFKA-5192.
--
   Resolution: Fixed
Fix Version/s: 0.11.0.0

Issue resolved by pull request 3027
[https://github.com/apache/kafka/pull/3027]

> Range Scan for Windowed State Stores
> 
>
> Key: KAFKA-5192
> URL: https://issues.apache.org/jira/browse/KAFKA-5192
> Project: Kafka
>  Issue Type: New Feature
>  Components: streams
>Reporter: Xavier Léauté
>Assignee: Xavier Léauté
> Fix For: 0.11.0.0
>
>
> Windowed state stores currently do not support key range scans, even though 
> it seems reasonable to be able to – at least in a given window – do the same 
> operations you would do on a key-value store.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5192) Range Scan for Windowed State Stores

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016708#comment-16016708
 ] 

ASF GitHub Bot commented on KAFKA-5192:
---

Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3027


> Range Scan for Windowed State Stores
> 
>
> Key: KAFKA-5192
> URL: https://issues.apache.org/jira/browse/KAFKA-5192
> Project: Kafka
>  Issue Type: New Feature
>  Components: streams
>Reporter: Xavier Léauté
>Assignee: Xavier Léauté
> Fix For: 0.11.0.0
>
>
> Windowed state stores currently do not support key range scans, even though 
> it seems reasonable to be able to – at least in a given window – do the same 
> operations you would do on a key-value store.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3095: MINOR: Bump Kafka version to 0.11.1.0-SNAPSHOT

2017-05-18 Thread ijuma
GitHub user ijuma opened a pull request:

https://github.com/apache/kafka/pull/3095

MINOR: Bump Kafka version to 0.11.1.0-SNAPSHOT



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ijuma/kafka bump-kafka-version

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3095.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3095


commit 8fc273bf379f24212771290dacdfb23f618480d5
Author: Ismael Juma 
Date:   2017-05-18T23:59:54Z

MINOR: Bump Kafka version to 0.11.1.0-SNAPSHOT




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [DISCUSS]: KIP-149: Enabling key access in ValueTransformer, ValueMapper, and ValueJoiner

2017-05-18 Thread Jeyhun Karimov
Hi,

Thanks. I initiated the PR as well, to get a better overview.

The only reason that I used abstract class instead of interface for Rich
functions is that in future if we will have some AbstractRichFunction
abstract classes,
we can easily extend:

public abstract class RichValueMapper  implements
ValueMapperWithKey, RichFunction *extends  AbstractRichFunction*{
}
 With interfaces we are only limited to interfaces for inheritance.

However, I think we can easily change it (from abstract class -> interface)
if you think interface is a better fit.


Cheers,
Jeyhun


On Fri, May 19, 2017 at 1:00 AM Matthias J. Sax 
wrote:

> Thanks for the update and explanations. The KIP is quite improved now --
> great job!
>
> One more question: Why are RichValueMapper etc abstract classes and not
> interfaces?
>
>
> Overall, I like the KIP a lot!
>
>
> -Matthias
>
>
> On 5/16/17 7:03 AM, Jeyhun Karimov wrote:
> > Hi,
> >
> > Thanks for your comments.
> >
> > I think supporting Lambdas for `withKey` and `AbstractRichFunction`
> >> don't go together, as Lambdas are only supported for interfaces AFAIK.
> >
> >
> > Maybe I misunderstood your comment.
> > *withKey* and and *withOnlyValue* are interfaces. So they don't have
> direct
> > relation with *AbstractRichFunction*.
> > *withKey* and and *withOnlyValue* interfaces have only one  method , so
> we
> > can use lambdas.
> > Where does the *AbstractRichFunction* comes to play? Inside Rich
> functions.
> > And we use Rich functions in 2 places:
> >
> > 1. User doesn't use rich functions. Just regular *withKey* and and
> > *withOnlyValue* interfaces(both support lambdas) . We get those
> interfaces
> > and wrap into Rich function while building the topology, and send to
> > Processor.
> > 2. User does use rich functions (Rich functions implement *withKey*
> > interface). As a result no lamdas here by definition. In this case, while
> > building the topology we do a type check if the object type is
> > *withKey* or *RichFunction*.
> >
> > So *AbstractRichFunction* is just syntactic sugar for Rich functions and
> > does not affect using lambdas.
> >
> > Thus, if we want to support Lambdas for `withKey`, we need to have a
> >> interface approach like this
> >>   - RichFunction -> only adding init() and close()
> >>   - ValueMapper
> >>   - ValueMapperWithKey
> >>   - RichValueMapper extends ValueMapperWithKey, RichFunction
> >
> >
> > As I said above, currently we support lambdas for *withKey* interfaces as
> > well.  However, I agree with your idea and I will remove the
> > AbstractRichFunction from the design.
> >
> > As an alternative, we could argue, that it is sufficient to support
> >> Lambdas for the "plain" API only, but not for any "extended API". For
> >> this, RichFunction could add key+init+close and AbstractRichFunction
> >> would allow to only care about getting the key.
> >> Not sure, which one is better. I don't like the idea of more overloaded
> >> methods to get Lambdas for `withKey` interfaces too much because we have
> >> already so many overlaods. On the other hand, I do see value in
> >> supporting Lambdas for `withKey`.
> >
> >
> > Just to clarify, with current design we have only one extra overloaded
> > method per *withOnlyValue* interface:  which is *withKey* version of
> > particular interface.
> > We don't need extra overload for Rich function as Rich function
> implements
> > *withKey* interface as a result they have same type. We differentiate
> them
> > while building the topology.
> > We supported lambdas for *withKey* APIs because of the comment:
> >
> > @Jeyhun: I did not put any thought into this, but can we have a design
> >> that allows for both? Also, with regard to lambdas, it might make sense
> >> to allow for both `V -> newV` and `(K, V) -> newV` ?
> >
> >
> > However, I don't think that this complicates the overall design
> > significantly.
> >
> >
> > Depending on what we want to support, it might make sense to
> >> include/exclude RichFunctions from this KIP -- and thus, this also
> >> determines if we should have a "ProcessorContext KIP" before driving
> >> this KIP further.
> >
> >
> > Based on our discussion I think we should keep Rich functions as I don't
> > think that they bring extra layer of overhead to library.
> >
> > Any comments are appreciated.
> >
> > Cheers,
> > Jeyhun
> >
> >
> > On Tue, May 16, 2017 at 12:10 AM Matthias J. Sax 
> > wrote:
> >
> >> Jeyhun,
> >>
> >> thanks for the update.
> >>
> >> I think supporting Lambdas for `withKey` and `AbstractRichFunction`
> >> don't go together, as Lambdas are only supported for interfaces AFAIK.
> >>
> >> Thus, if we want to support Lambdas for `withKey`, we need to have a
> >> interface approach like this
> >>
> >>   - RichFunction -> only adding init() and close()
> >>
> >>   - ValueMapper
> >>   - ValueMapperWithKey
> >>
> >>   - RichValueMapper extends ValueMapperWithKey, RichFunction
> >>
> >> For this 

[jira] [Comment Edited] (KAFKA-877) Still getting kafka.common.NotLeaderForPartitionException

2017-05-18 Thread Robert P. Thille (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016655#comment-16016655
 ] 

Robert P. Thille edited comment on KAFKA-877 at 5/18/17 11:32 PM:
--

I have logs from a 3-node cluster which got into a bad state after ZK expired:
{noformat}
[2017-05-09 18:33:42,897] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 05:06:13,469] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 16:33:43,349] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 16:33:44,059] INFO [Controller 2]: Broker 2 starting become 
controller state transition (kafka.controller.KafkaController)
{noformat}
The first two ZK session expirations were handled fine. The 3rd blew everything 
up.


was (Author: rthille):
I have logs from a 3-node cluster which got into a bad state after ZK expired:
{noformat}
[2017-05-09 18:33:42,897] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 05:06:13,469] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 16:33:43,349] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 16:33:44,059] INFO [Controller 2]: Broker 2 starting become 
controller state transition (kafka.controller.KafkaController)
{noformat}

> Still getting kafka.common.NotLeaderForPartitionException
> -
>
> Key: KAFKA-877
> URL: https://issues.apache.org/jira/browse/KAFKA-877
> Project: Kafka
>  Issue Type: Bug
>Affects Versions: 0.8.0
> Environment: DEV
>Reporter: BalajiSeshadri
>Priority: Blocker
> Attachments: KAFKA-816.jpg
>
>
> Using the below trunk and i still see error happening.Please let us know if 
> this can be fixed.
> https://github.com/apache/kafka.git
> [2013-04-25 16:47:08,924] WARN 
> [console-consumer-24019_MERD7-21964-1366930009136-8b7f9eb7-leader-finder-thread],
>  Failed to add fetcher for [mytopic,0] to broker 
> id:0,host:MERD7-21964.echostar.com,port:9092 
> (kafka.consumer.ConsumerFetcherManager$$anon$1)
> kafka.common.NotLeaderForPartitionException
> at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown 
> Source)
> at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> at java.lang.Class.newInstance0(Class.java:372)
> at java.lang.Class.newInstance(Class.java:325)
> at kafka.common.ErrorMapping$.exceptionFor(ErrorMapping.scala:72)
> at 
> kafka.consumer.SimpleConsumer.earliestOrLatestOffset(SimpleConsumer.scala:163)
> at 
> kafka.consumer.ConsumerFetcherThread.handleOffsetOutOfRange(ConsumerFetcherThread.scala:61)
> at 
> kafka.server.AbstractFetcherThread.addPartition(AbstractFetcherThread.scala:167)
> at 
> kafka.server.AbstractFetcherManager.addFetcher(AbstractFetcherManager.scala:48)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:79)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:75)
> at 
> scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
> at 
> scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
> at scala.collection.Iterator$class.foreach(Iterator.scala:772)
> at 
> scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:157)
> at 
> scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:190)
> at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:45)
> at scala.collection.mutable.HashMap.foreach(HashMap.scala:95)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1.doWork(ConsumerFetcherManager.scala:75)
> at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:51)
> We are evaluating Kafka for our new messaging system and we had tough time 
> running in windows.
> We somehow managed to run 0.8 using cygwin but when we run the console 
> 

[jira] [Commented] (KAFKA-877) Still getting kafka.common.NotLeaderForPartitionException

2017-05-18 Thread Robert P. Thille (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016655#comment-16016655
 ] 

Robert P. Thille commented on KAFKA-877:


I have logs from a 3-node cluster which got into a bad state after ZK expired:
{noformat}
[2017-05-09 18:33:42,897] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 05:06:13,469] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 16:33:43,349] INFO [SessionExpirationListener on 2], ZK expired; 
shut down all controller components and try to re-elect 
(kafka.controller.KafkaController$SessionExpirationListener)
[2017-05-17 16:33:44,059] INFO [Controller 2]: Broker 2 starting become 
controller state transition (kafka.controller.KafkaController)
{noformat}

> Still getting kafka.common.NotLeaderForPartitionException
> -
>
> Key: KAFKA-877
> URL: https://issues.apache.org/jira/browse/KAFKA-877
> Project: Kafka
>  Issue Type: Bug
>Affects Versions: 0.8.0
> Environment: DEV
>Reporter: BalajiSeshadri
>Priority: Blocker
> Attachments: KAFKA-816.jpg
>
>
> Using the below trunk and i still see error happening.Please let us know if 
> this can be fixed.
> https://github.com/apache/kafka.git
> [2013-04-25 16:47:08,924] WARN 
> [console-consumer-24019_MERD7-21964-1366930009136-8b7f9eb7-leader-finder-thread],
>  Failed to add fetcher for [mytopic,0] to broker 
> id:0,host:MERD7-21964.echostar.com,port:9092 
> (kafka.consumer.ConsumerFetcherManager$$anon$1)
> kafka.common.NotLeaderForPartitionException
> at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown 
> Source)
> at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> at java.lang.Class.newInstance0(Class.java:372)
> at java.lang.Class.newInstance(Class.java:325)
> at kafka.common.ErrorMapping$.exceptionFor(ErrorMapping.scala:72)
> at 
> kafka.consumer.SimpleConsumer.earliestOrLatestOffset(SimpleConsumer.scala:163)
> at 
> kafka.consumer.ConsumerFetcherThread.handleOffsetOutOfRange(ConsumerFetcherThread.scala:61)
> at 
> kafka.server.AbstractFetcherThread.addPartition(AbstractFetcherThread.scala:167)
> at 
> kafka.server.AbstractFetcherManager.addFetcher(AbstractFetcherManager.scala:48)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:79)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:75)
> at 
> scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
> at 
> scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
> at scala.collection.Iterator$class.foreach(Iterator.scala:772)
> at 
> scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:157)
> at 
> scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:190)
> at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:45)
> at scala.collection.mutable.HashMap.foreach(HashMap.scala:95)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1.doWork(ConsumerFetcherManager.scala:75)
> at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:51)
> We are evaluating Kafka for our new messaging system and we had tough time 
> running in windows.
> We somehow managed to run 0.8 using cygwin but when we run the console 
> producer/consumer,we are not getting messages from consumer.
> Please help us to fix this issue,this might not be related but its keeping on 
> throwing this error on consumer side. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (KAFKA-5284) Add tools and metrics to diagnose problems with the idempotent producer and transactions

2017-05-18 Thread Apurva Mehta (JIRA)
Apurva Mehta created KAFKA-5284:
---

 Summary: Add tools and metrics to diagnose problems with the 
idempotent producer and transactions
 Key: KAFKA-5284
 URL: https://issues.apache.org/jira/browse/KAFKA-5284
 Project: Kafka
  Issue Type: Sub-task
Reporter: Apurva Mehta
 Fix For: 0.11.0.0


The KIP mentions a number of metrics which we should add, but haven't yet done 
so. IT would also be good to have tools to help diagnose degenerate situations 
like:
# If a consumer is stuck, we should be able to find the LSO of the partition it 
is blocked on, and which producer is holding up the advancement of the LSO.
# We should be able to force abort any inflight transaction to free up consumers
# etc.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-4950) ConcurrentModificationException when iterating over Kafka Metrics

2017-05-18 Thread Vahid Hashemian (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-4950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016640#comment-16016640
 ] 

Vahid Hashemian commented on KAFKA-4950:


[~dpostoronca] Still no luck on my side reproducing this error. I run two 
threads as you suggested. In one thread I run (in a loop) your metric 
collection code above (that leads to calling 
{{PartitionStates.partitionSet()}}; and in the other, I do repeating {{poll}} 
calls (that lead to calling {{PartitionStates.moveToEnd(..)}}). Both threads 
run with the same consumer instance.

> ConcurrentModificationException when iterating over Kafka Metrics
> -
>
> Key: KAFKA-4950
> URL: https://issues.apache.org/jira/browse/KAFKA-4950
> Project: Kafka
>  Issue Type: Bug
>Affects Versions: 0.10.1.1
>Reporter: Dumitru Postoronca
>Assignee: Vahid Hashemian
>Priority: Minor
> Fix For: 0.11.0.0
>
>
> It looks like the when calling {{PartitionStates.partitionSet()}}, while the 
> resulting Hashmap is being built, the internal state of the allocations can 
> change, which leads to ConcurrentModificationException during the copy 
> operation.
> {code}
> java.util.ConcurrentModificationException
> at 
> java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
> at 
> java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:742)
> at java.util.AbstractCollection.addAll(AbstractCollection.java:343)
> at java.util.HashSet.(HashSet.java:119)
> at 
> org.apache.kafka.common.internals.PartitionStates.partitionSet(PartitionStates.java:66)
> at 
> org.apache.kafka.clients.consumer.internals.SubscriptionState.assignedPartitions(SubscriptionState.java:291)
> at 
> org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$ConsumerCoordinatorMetrics$1.measure(ConsumerCoordinator.java:783)
> at 
> org.apache.kafka.common.metrics.KafkaMetric.value(KafkaMetric.java:61)
> at 
> org.apache.kafka.common.metrics.KafkaMetric.value(KafkaMetric.java:52)
> {code}
> {code}
> // client code:
> import java.util.Collections;
> import java.util.HashMap;
> import java.util.Map;
> import com.codahale.metrics.Gauge;
> import com.codahale.metrics.Metric;
> import com.codahale.metrics.MetricSet;
> import org.apache.kafka.clients.consumer.KafkaConsumer;
> import org.apache.kafka.common.MetricName;
> import static com.codahale.metrics.MetricRegistry.name;
> public class KafkaMetricSet implements MetricSet {
> private final KafkaConsumer client;
> public KafkaMetricSet(KafkaConsumer client) {
> this.client = client;
> }
> @Override
> public Map getMetrics() {
> final Map gauges = new HashMap();
> Map m = client.metrics();
> for (Map.Entry e : 
> m.entrySet()) {
> gauges.put(name(e.getKey().group(), e.getKey().name(), "count"), 
> new Gauge() {
> @Override
> public Double getValue() {
> return e.getValue().value(); // exception thrown here 
> }
> });
> }
> return Collections.unmodifiableMap(gauges);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3087: MINOR: Small refactor of request quotas handling i...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3087


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (KAFKA-5269) TransactionBounceTest occasionally fails due to partition errors

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016621#comment-16016621
 ] 

ASF GitHub Bot commented on KAFKA-5269:
---

GitHub user apurvam opened a pull request:

https://github.com/apache/kafka/pull/3094

KAFKA-5269: Correct handling of UNKNOWN_TOPIC_OR_PARTITION error 

We should retry AddPartitionsToTxnRequest and TxnOffsetCommitRequest when 
receiving an UNKNOWN_TOPIC_OR_PARTITION error.

As described in the JIRA: It turns out that the 
`UNKNOWN_TOPIC_OR_PARTITION` is returned from the request handler in KafkaAPis 
for the AddPartitionsToTxn and the TxnOffsetCommitRequest when the broker's 
metadata doesn't contain one or more partitions in the request. This can happen 
for instance when the broker is bounced and has not received the cluster 
metadata yet. 

We should retry in these cases, as this is the model followed by the 
consumer when committing offsets, and by the producer with a ProduceRequest.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apurvam/kafka 
KAFKA-5269-handle-unknown-topic-partition-in-transaction-manager

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3094.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3094


commit da2e3af528540f73d6d0a35c4c51b8a8dc7eef0d
Author: Apurva Mehta 
Date:   2017-05-18T23:01:33Z

Retry AddPartitionsToTxnRequest and TxnOffsetCommitRequest when receiving 
an UNKNOWN_TOPIC_OR_PARTITION error.




> TransactionBounceTest occasionally fails due to partition errors
> 
>
> Key: KAFKA-5269
> URL: https://issues.apache.org/jira/browse/KAFKA-5269
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
>
> The test sometimes encounters a partition level error 
> `UNKNOWN_TOPIC_OR_PARTITION` for the output topic. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-877) Still getting kafka.common.NotLeaderForPartitionException

2017-05-18 Thread Robert P. Thille (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016619#comment-16016619
 ] 

Robert P. Thille commented on KAFKA-877:


We see this in Kafka 0.8.2.1 when our systems get overloaded and either 
ZooKeeper gets stalled trying to fsync, or Kafka gets starved and loses its 
connection to ZK.  It takes a restart of the brokers to get them properly in 
sync thereafter.

> Still getting kafka.common.NotLeaderForPartitionException
> -
>
> Key: KAFKA-877
> URL: https://issues.apache.org/jira/browse/KAFKA-877
> Project: Kafka
>  Issue Type: Bug
>Affects Versions: 0.8.0
> Environment: DEV
>Reporter: BalajiSeshadri
>Priority: Blocker
> Attachments: KAFKA-816.jpg
>
>
> Using the below trunk and i still see error happening.Please let us know if 
> this can be fixed.
> https://github.com/apache/kafka.git
> [2013-04-25 16:47:08,924] WARN 
> [console-consumer-24019_MERD7-21964-1366930009136-8b7f9eb7-leader-finder-thread],
>  Failed to add fetcher for [mytopic,0] to broker 
> id:0,host:MERD7-21964.echostar.com,port:9092 
> (kafka.consumer.ConsumerFetcherManager$$anon$1)
> kafka.common.NotLeaderForPartitionException
> at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown 
> Source)
> at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> at java.lang.Class.newInstance0(Class.java:372)
> at java.lang.Class.newInstance(Class.java:325)
> at kafka.common.ErrorMapping$.exceptionFor(ErrorMapping.scala:72)
> at 
> kafka.consumer.SimpleConsumer.earliestOrLatestOffset(SimpleConsumer.scala:163)
> at 
> kafka.consumer.ConsumerFetcherThread.handleOffsetOutOfRange(ConsumerFetcherThread.scala:61)
> at 
> kafka.server.AbstractFetcherThread.addPartition(AbstractFetcherThread.scala:167)
> at 
> kafka.server.AbstractFetcherManager.addFetcher(AbstractFetcherManager.scala:48)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:79)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:75)
> at 
> scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
> at 
> scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
> at scala.collection.Iterator$class.foreach(Iterator.scala:772)
> at 
> scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:157)
> at 
> scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:190)
> at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:45)
> at scala.collection.mutable.HashMap.foreach(HashMap.scala:95)
> at 
> kafka.consumer.ConsumerFetcherManager$$anon$1.doWork(ConsumerFetcherManager.scala:75)
> at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:51)
> We are evaluating Kafka for our new messaging system and we had tough time 
> running in windows.
> We somehow managed to run 0.8 using cygwin but when we run the console 
> producer/consumer,we are not getting messages from consumer.
> Please help us to fix this issue,this might not be related but its keeping on 
> throwing this error on consumer side. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3094: KAFKA-5269: Correct handling of UNKNOWN_TOPIC_OR_P...

2017-05-18 Thread apurvam
GitHub user apurvam opened a pull request:

https://github.com/apache/kafka/pull/3094

KAFKA-5269: Correct handling of UNKNOWN_TOPIC_OR_PARTITION error 

We should retry AddPartitionsToTxnRequest and TxnOffsetCommitRequest when 
receiving an UNKNOWN_TOPIC_OR_PARTITION error.

As described in the JIRA: It turns out that the 
`UNKNOWN_TOPIC_OR_PARTITION` is returned from the request handler in KafkaAPis 
for the AddPartitionsToTxn and the TxnOffsetCommitRequest when the broker's 
metadata doesn't contain one or more partitions in the request. This can happen 
for instance when the broker is bounced and has not received the cluster 
metadata yet. 

We should retry in these cases, as this is the model followed by the 
consumer when committing offsets, and by the producer with a ProduceRequest.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apurvam/kafka 
KAFKA-5269-handle-unknown-topic-partition-in-transaction-manager

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3094.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3094


commit da2e3af528540f73d6d0a35c4c51b8a8dc7eef0d
Author: Apurva Mehta 
Date:   2017-05-18T23:01:33Z

Retry AddPartitionsToTxnRequest and TxnOffsetCommitRequest when receiving 
an UNKNOWN_TOPIC_OR_PARTITION error.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] kafka pull request #2984: KIP-154 KAFKA-4667 Connect uses AdminClient to cre...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/2984


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (KAFKA-4667) KIP-154: Connect should create internal topics

2017-05-18 Thread Ewen Cheslack-Postava (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-4667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ewen Cheslack-Postava updated KAFKA-4667:
-
Resolution: Fixed
Status: Resolved  (was: Patch Available)

Issue resolved by pull request 2984
[https://github.com/apache/kafka/pull/2984]

> KIP-154: Connect should create internal topics
> --
>
> Key: KAFKA-4667
> URL: https://issues.apache.org/jira/browse/KAFKA-4667
> Project: Kafka
>  Issue Type: Bug
>  Components: KafkaConnect
>Reporter: Emanuele Cesena
>Assignee: Randall Hauch
>Priority: Critical
> Fix For: 0.11.0.0
>
>
> I'm reporting this as an issue but in fact it requires more investigation 
> (which unfortunately I'm not able to perform at this time).
> Repro steps:
> - configure Kafka for consistency, for example:
> default.replication.factor=3
> min.insync.replicas=2
> unclean.leader.election.enable=false
> - run Connect for the first time, which should create its internal topics
> I believe these topics are created with the broker's default, in particular:
> min.insync.replicas=2
> unclean.leader.election.enable=false
> but connect doesn't produce with acks=all, which in turn may cause the 
> cluster to go in a bad state (see, e.g., 
> https://issues.apache.org/jira/browse/KAFKA-4666).
> Solution would be to force availability mode, i.e. force:
> unclean.leader.election.enable=true
> when creating the connect topics, or viceversa detect availability vs 
> consistency mode and turn acks=all if needed.
> I assume the same happens with other kafka-based services such as streams.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Re: [DISCUSS]: KIP-149: Enabling key access in ValueTransformer, ValueMapper, and ValueJoiner

2017-05-18 Thread Matthias J. Sax
Thanks for the update and explanations. The KIP is quite improved now --
great job!

One more question: Why are RichValueMapper etc abstract classes and not
interfaces?


Overall, I like the KIP a lot!


-Matthias


On 5/16/17 7:03 AM, Jeyhun Karimov wrote:
> Hi,
> 
> Thanks for your comments.
> 
> I think supporting Lambdas for `withKey` and `AbstractRichFunction`
>> don't go together, as Lambdas are only supported for interfaces AFAIK.
> 
> 
> Maybe I misunderstood your comment.
> *withKey* and and *withOnlyValue* are interfaces. So they don't have direct
> relation with *AbstractRichFunction*.
> *withKey* and and *withOnlyValue* interfaces have only one  method , so we
> can use lambdas.
> Where does the *AbstractRichFunction* comes to play? Inside Rich functions.
> And we use Rich functions in 2 places:
> 
> 1. User doesn't use rich functions. Just regular *withKey* and and
> *withOnlyValue* interfaces(both support lambdas) . We get those interfaces
> and wrap into Rich function while building the topology, and send to
> Processor.
> 2. User does use rich functions (Rich functions implement *withKey*
> interface). As a result no lamdas here by definition. In this case, while
> building the topology we do a type check if the object type is
> *withKey* or *RichFunction*.
> 
> So *AbstractRichFunction* is just syntactic sugar for Rich functions and
> does not affect using lambdas.
> 
> Thus, if we want to support Lambdas for `withKey`, we need to have a
>> interface approach like this
>>   - RichFunction -> only adding init() and close()
>>   - ValueMapper
>>   - ValueMapperWithKey
>>   - RichValueMapper extends ValueMapperWithKey, RichFunction
> 
> 
> As I said above, currently we support lambdas for *withKey* interfaces as
> well.  However, I agree with your idea and I will remove the
> AbstractRichFunction from the design.
> 
> As an alternative, we could argue, that it is sufficient to support
>> Lambdas for the "plain" API only, but not for any "extended API". For
>> this, RichFunction could add key+init+close and AbstractRichFunction
>> would allow to only care about getting the key.
>> Not sure, which one is better. I don't like the idea of more overloaded
>> methods to get Lambdas for `withKey` interfaces too much because we have
>> already so many overlaods. On the other hand, I do see value in
>> supporting Lambdas for `withKey`.
> 
> 
> Just to clarify, with current design we have only one extra overloaded
> method per *withOnlyValue* interface:  which is *withKey* version of
> particular interface.
> We don't need extra overload for Rich function as Rich function implements
> *withKey* interface as a result they have same type. We differentiate them
> while building the topology.
> We supported lambdas for *withKey* APIs because of the comment:
> 
> @Jeyhun: I did not put any thought into this, but can we have a design
>> that allows for both? Also, with regard to lambdas, it might make sense
>> to allow for both `V -> newV` and `(K, V) -> newV` ?
> 
> 
> However, I don't think that this complicates the overall design
> significantly.
> 
> 
> Depending on what we want to support, it might make sense to
>> include/exclude RichFunctions from this KIP -- and thus, this also
>> determines if we should have a "ProcessorContext KIP" before driving
>> this KIP further.
> 
> 
> Based on our discussion I think we should keep Rich functions as I don't
> think that they bring extra layer of overhead to library.
> 
> Any comments are appreciated.
> 
> Cheers,
> Jeyhun
> 
> 
> On Tue, May 16, 2017 at 12:10 AM Matthias J. Sax 
> wrote:
> 
>> Jeyhun,
>>
>> thanks for the update.
>>
>> I think supporting Lambdas for `withKey` and `AbstractRichFunction`
>> don't go together, as Lambdas are only supported for interfaces AFAIK.
>>
>> Thus, if we want to support Lambdas for `withKey`, we need to have a
>> interface approach like this
>>
>>   - RichFunction -> only adding init() and close()
>>
>>   - ValueMapper
>>   - ValueMapperWithKey
>>
>>   - RichValueMapper extends ValueMapperWithKey, RichFunction
>>
>> For this approach, AbstractRichFunction does not make sense anymore, as
>> the only purpose of `RichFunction` is to allow the implementation of
>> init() and close() -- if you don't want those, you would implement a
>> different interface (ie, ValueMapperWithKey)
>>
>> As an alternative, we could argue, that it is sufficient to support
>> Lambdas for the "plain" API only, but not for any "extended API". For
>> this, RichFunction could add key+init+close and AbstractRichFunction
>> would allow to only care about getting the key.
>>
>> Not sure, which one is better. I don't like the idea of more overloaded
>> methods to get Lambdas for `withKey` interfaces too much because we have
>> already so many overlaods. On the other hand, I do see value in
>> supporting Lambdas for `withKey`.
>>
>> Depending on what we want to support, it might make sense to
>> include/exclude RichFunctions from 

[jira] [Created] (KAFKA-5283) Update clients and server code to make sure that epoch and sequence numbers wrap around

2017-05-18 Thread Apurva Mehta (JIRA)
Apurva Mehta created KAFKA-5283:
---

 Summary: Update clients and server code to make sure that epoch 
and sequence numbers wrap around
 Key: KAFKA-5283
 URL: https://issues.apache.org/jira/browse/KAFKA-5283
 Project: Kafka
  Issue Type: Sub-task
Reporter: Apurva Mehta
Priority: Blocker
 Fix For: 0.11.0.0


The design doc mentions that the epoch and sequence numbers will wrap around. 
However, the current client and server code (on the producer, in the 
`ProducerIdMapping` class, in the transaction coordinator) does not do this.
Once all the pieces are in place we should go through and make sure that the 
handling of sequence numbers and epoch is consistent across the board. Would be 
good to add a system or integration test for this as well, if possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5147) KafkaProducer's TransactionManager needs a review on synchronization

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5147:

Issue Type: Sub-task  (was: Bug)
Parent: KAFKA-4815

> KafkaProducer's TransactionManager needs a review on synchronization
> 
>
> Key: KAFKA-5147
> URL: https://issues.apache.org/jira/browse/KAFKA-5147
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently, the completion handlers are not synchronized, though they access 
> shared state like `partitionsInTransaction`, and `lastError`, 
> `pendingPartitionsToBeaddedToTransaction`, etc. 
> We should either make the collections concurrent or synchronize the handlers. 
> In general, we need to review this code to ensure that the synchronization is 
> correct. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5147) KafkaProducer's TransactionManager needs a review on synchronization

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5147:

   Labels: exactly-once  (was: )
 Priority: Blocker  (was: Major)
Fix Version/s: 0.11.0.0

> KafkaProducer's TransactionManager needs a review on synchronization
> 
>
> Key: KAFKA-5147
> URL: https://issues.apache.org/jira/browse/KAFKA-5147
> Project: Kafka
>  Issue Type: Bug
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently, the completion handlers are not synchronized, though they access 
> shared state like `partitionsInTransaction`, and `lastError`, 
> `pendingPartitionsToBeaddedToTransaction`, etc. 
> We should either make the collections concurrent or synchronize the handlers. 
> In general, we need to review this code to ensure that the synchronization is 
> correct. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Re: [VOTE] KIP 130: Expose states of active tasks to KafkaStreams public API

2017-05-18 Thread Matthias J. Sax
+1

On 5/18/17 8:26 AM, Bill Bejeck wrote:
> +1
> 
> On Thu, May 18, 2017 at 6:54 AM, Florian Hussonnois 
> wrote:
> 
>> Hi all,
>>
>> I've finally found time to update the KIP. The toString() is annotated as
>> deprecated. I have also rebase the PR with the current trunk.
>> So sorry to have been so long on this KIP.
>>
>> Thanks.
>>
>> 2017-04-24 18:56 GMT+02:00 Guozhang Wang :
>>
>>> Florian, could you also add the part of deprecating
>> `KafkaStreams.toString`
>>> in your KIP as well?
>>>
>>>
>>> Guozhang
>>>
>>> On Fri, Apr 21, 2017 at 8:32 AM, Damian Guy 
>> wrote:
>>>
 +1

 On Fri, 21 Apr 2017 at 09:06 Eno Thereska 
>>> wrote:

> +1 (non-binding)
>
> Thanks
> Eno
>
>> On 21 Apr 2017, at 05:58, Guozhang Wang 
>> wrote:
>>
>> +1. Thanks a lot for the KIP!
>>
>> Guozhang
>>
>> On Wed, Apr 5, 2017 at 1:57 PM, Florian Hussonnois <
> fhussonn...@gmail.com>
>> wrote:
>>
>>> Hi All,
>>>
>>> I would like to start the vote for the KIP-130 :
>>>
>>> https://cwiki.apache.org/confluence/display/KAFKA/KIP+
>>> 130%3A+Expose+states+of+active+tasks+to+KafkaStreams+public+API
>>>
>>> Thanks,
>>>
>>> --
>>> Florian HUSSONNOIS
>>>
>>
>>
>>
>> --
>> -- Guozhang
>
>

>>>
>>>
>>>
>>> --
>>> -- Guozhang
>>>
>>
>>
>>
>> --
>> Florian HUSSONNOIS
>>
> 



signature.asc
Description: OpenPGP digital signature


[GitHub] kafka pull request #3093: HOTFIX: Close transactional producers in all new t...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3093


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (KAFKA-5031) Additional validation in validateMessagesAndAssignOffsets

2017-05-18 Thread Janek P (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016553#comment-16016553
 ] 

Janek P commented on KAFKA-5031:


I would be very happy if I could get a stab at this task. Is this about 
checking if number of messages and headers before the validation process 
matches the respective numbers for validated messages?

> Additional validation in validateMessagesAndAssignOffsets
> -
>
> Key: KAFKA-5031
> URL: https://issues.apache.org/jira/browse/KAFKA-5031
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> In validateMessagesAndAssignOffsets(), when validating the 
> DefaultRecordBatch, we should also validate:
> 1. Message count matches the actual number of messages in the array
> 2. The header count matches the actual number of headers



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5282) Transactions integration test: Use factory methods to keep track of open producers and consumers and close them all on tearDown

2017-05-18 Thread Sriram Subramanian (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sriram Subramanian reassigned KAFKA-5282:
-

Assignee: (was: Apurva Mehta)

> Transactions integration test: Use factory methods to keep track of open 
> producers and consumers and close them all on tearDown
> ---
>
> Key: KAFKA-5282
> URL: https://issues.apache.org/jira/browse/KAFKA-5282
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Apurva Mehta
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> See: https://github.com/apache/kafka/pull/3093/files#r117354588
> The current transactions integration test creates individual producers and 
> consumer per test, and closes them independently. 
> It would be more robust to create them through a central factory method that 
> keeps track of each instance, and then close those instances on `tearDown`.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5093) Load only batch header when rebuilding producer ID map

2017-05-18 Thread Sriram Subramanian (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sriram Subramanian reassigned KAFKA-5093:
-

Assignee: (was: Jason Gustafson)

> Load only batch header when rebuilding producer ID map
> --
>
> Key: KAFKA-5093
> URL: https://issues.apache.org/jira/browse/KAFKA-5093
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Jason Gustafson
>Priority: Critical
> Fix For: 0.11.0.0
>
>
> When rebuilding the producer ID map for KIP-98, we unnecessarily load the 
> full record data into memory when scanning through the log. It would be 
> better to only load the batch header since it is all that is needed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5251) Producer should drop queued sends when transaction is aborted

2017-05-18 Thread Sriram Subramanian (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sriram Subramanian reassigned KAFKA-5251:
-

Assignee: (was: Apurva Mehta)

> Producer should drop queued sends when transaction is aborted
> -
>
> Key: KAFKA-5251
> URL: https://issues.apache.org/jira/browse/KAFKA-5251
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> As an optimization, if a transaction is aborted, we can drop any records 
> which have not yet been sent to the brokers. However, to avoid the sequence 
> number getting out of sync, we need to continue sending any request which has 
> been sent at least once.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5032) Think through implications of max.message.size affecting record batches in message format V2

2017-05-18 Thread Sriram Subramanian (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sriram Subramanian reassigned KAFKA-5032:
-

Assignee: (was: Apurva Mehta)

> Think through implications of max.message.size affecting record batches in 
> message format V2
> 
>
> Key: KAFKA-5032
> URL: https://issues.apache.org/jira/browse/KAFKA-5032
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Priority: Critical
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> It's worth noting that the new behaviour for uncompressed messages is the 
> same as the existing behaviour for compressed messages.
> A few things to think about:
> 1. Do the producer settings max.request.size and batch.size still make sense 
> and do we need to update the documentation? My conclusion is that things are 
> still fine, but we may need to revise the docs.
> 2. Consider changing default max message set size to include record batch 
> overhead. This is currently defined as:
> {code}
> val MessageMaxBytes = 100 + MessageSet.LogOverhead
> {code}
> We should consider changing it to (I haven't thought it through though):
> {code}
> val MessageMaxBytes = 100 + DefaultRecordBatch.RECORD_BATCH_OVERHEAD
> {code}
> 3. When a record batch is too large, we throw RecordTooLargeException, which 
> is confusing because there's also a RecordBatchTooLargeException. We should 
> consider renaming these exceptions to make the behaviour clearer.
> 4. We should consider deprecating max.message.bytes (server config) and 
> message.max.bytes (topic config) in favour of configs that make it clear that 
> we are talking about record batches instead of individual messages.
> Part of the work in this JIRA is working out what should be done for 0.11.0.0 
> and what can be done later.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5024) Old clients don't support message format V2

2017-05-18 Thread Sriram Subramanian (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sriram Subramanian reassigned KAFKA-5024:
-

Assignee: (was: Apurva Mehta)

> Old clients don't support message format V2
> ---
>
> Key: KAFKA-5024
> URL: https://issues.apache.org/jira/browse/KAFKA-5024
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
> Fix For: 0.11.0.0
>
>
> Is this OK? If so, we can close this JIRA, but we should make that decision 
> consciously.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5275) Review and potentially tweak AdminClient API for the initial release (KIP-117)

2017-05-18 Thread Randall Hauch (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016513#comment-16016513
 ] 

Randall Hauch commented on KAFKA-5275:
--

Also, a common use case for creating topics is going to be "create new topic(s) 
if they don't already exist". The current AdminClient can do this, but it 
requires a fair amount of error handling, especially when trying to create 
multiple topics at once. Would be great if this was easier, even if it's just 
an additional method on {{CreateTopicResults}} that perhaps gets the names of 
the topics that were created as part of the request. Again, see Kafka Connect's 
{{TopicAdmin}} code for an example that does this.

> Review and potentially tweak AdminClient API for the initial release (KIP-117)
> --
>
> Key: KAFKA-5275
> URL: https://issues.apache.org/jira/browse/KAFKA-5275
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Ismael Juma
>Assignee: Ismael Juma
> Fix For: 0.11.0.0
>
>
> Once all the pieces are in, we should take a pass and ensure that the APIs 
> work well together and that they are consistent.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Need CI access for a pull request

2017-05-18 Thread Brandon Bradley
Hello!

I made this PR . Care to let it
run on Jenkins?

Cheers!
Brandon Bradley


[jira] [Commented] (KAFKA-5250) handleFetchRequest should do down conversion after throttling

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016508#comment-16016508
 ] 

ASF GitHub Bot commented on KAFKA-5250:
---

Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3068


> handleFetchRequest should do down conversion after throttling
> -
>
> Key: KAFKA-5250
> URL: https://issues.apache.org/jira/browse/KAFKA-5250
> Project: Kafka
>  Issue Type: Bug
>Reporter: Ismael Juma
>Assignee: Rajini Sivaram
>Priority: Critical
> Fix For: 0.11.0.0
>
>
> We currently do down conversion before throttling. This is good from the 
> perspective of getting the correct message size, but it means that we can 
> cause OOMs due to excessive memory retention. That is, by performing down 
> conversion, we are loading the records into the heap even though we are not 
> ready to send them yet.
> It would be preferable to throttle before down conversion.
> In addition, we currently updates bytesOut before throttling. We should do it 
> after throttling as well.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3068: KAFKA-5250: Do fetch down conversion after throttl...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3068


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (KAFKA-5269) TransactionBounceTest occasionally fails due to partition errors

2017-05-18 Thread Apurva Mehta (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016496#comment-16016496
 ] 

Apurva Mehta commented on KAFKA-5269:
-

It turns out that the `UNKNOWN_TOPIC_OR_PARTITION` is returned from the request 
handler in KafkaAPis for the AddPartitionsToTxn and the TxnOffsetCommitRequest 
when the broker's metadata doesn't contain one or more partitions in the 
request. This can happen for instance when the broker is bounced and has not 
received the cluster metadata yet. 

The correct fix is simple: the client should retry the request when receiving 
this error. 

> TransactionBounceTest occasionally fails due to partition errors
> 
>
> Key: KAFKA-5269
> URL: https://issues.apache.org/jira/browse/KAFKA-5269
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
>
> The test sometimes encounters a partition level error 
> `UNKNOWN_TOPIC_OR_PARTITION` for the output topic. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5275) Review and potentially tweak AdminClient API for the initial release (KIP-117)

2017-05-18 Thread Randall Hauch (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016495#comment-16016495
 ] 

Randall Hauch commented on KAFKA-5275:
--

It'd be great to simplify the creation of the {{NewTopic}} objects. As part of 
the [PR|https://github.com/apache/kafka/pull/2984] for 
[KIP-154|https://cwiki.apache.org/confluence/display/KAFKA/KIP-154+Add+Kafka+Connect+configuration+properties+for+creating+internal+topics]
 / KAFKA-4667 I added a [builder for 
NewTopic|https://github.com/apache/kafka/pull/2984/files#diff-649c20fa5a9f94e7221bf8ef8211afaeR44]
 that has methods to set replication factor, num partitions, the cleanup policy 
(currently compacted only), min ISRs, etc. It's currently an implementation 
detail of Kafka Connect, but it'd be great if that could move down to the 
AdminClient. 

> Review and potentially tweak AdminClient API for the initial release (KIP-117)
> --
>
> Key: KAFKA-5275
> URL: https://issues.apache.org/jira/browse/KAFKA-5275
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Ismael Juma
>Assignee: Ismael Juma
> Fix For: 0.11.0.0
>
>
> Once all the pieces are in, we should take a pass and ensure that the APIs 
> work well together and that they are consistent.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (KAFKA-5282) Transactions integration test: Use factory methods to keep track of open producers and consumers and close them all on tearDown

2017-05-18 Thread Apurva Mehta (JIRA)
Apurva Mehta created KAFKA-5282:
---

 Summary: Transactions integration test: Use factory methods to 
keep track of open producers and consumers and close them all on tearDown
 Key: KAFKA-5282
 URL: https://issues.apache.org/jira/browse/KAFKA-5282
 Project: Kafka
  Issue Type: Sub-task
Reporter: Apurva Mehta
Assignee: Apurva Mehta
 Fix For: 0.11.0.0


See: https://github.com/apache/kafka/pull/3093/files#r117354588

The current transactions integration test creates individual producers and 
consumer per test, and closes them independently. 

It would be more robust to create them through a central factory method that 
keeps track of each instance, and then close those instances on `tearDown`.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Re: Java Client Builder pattern for ProducerRecord - thoughts?

2017-05-18 Thread Andrew Coates
Thanks Mike
On Thu, 18 May 2017 at 21:33, Michael André Pearce <
michael.andre.pea...@me.com> wrote:

> Hi Andrew,
>
> There is already a kip discussion exactly around this if you look for KIP
> 141 discuss thread.
>
> Cheers
> Mike
>
> Sent from my iPhone
>
> > On 18 May 2017, at 18:29, Andrew Coates  wrote:
> >
> > Hi all,
> >
> > The `ProducerRecord` type has many optional fields and the list has
> grown over different revisions of Kafka. Kafka supports
> `ProducerInterceptor`s, which often need to construct new
> `ProducerRecord`s, based on those passed in, copying most fields from the
> old to the new record, e.g.:
> >
> > ```java
> >   public ProducerRecord onSend(ProducerRecord record) {
> >   return new ProducerRecord<>(record.topic(), record.partition(),
> getSpecificTimestampIWantToSet(), record.key(), record.value())
> >   }
> > ```
> >
> > If/when a new field is next added to the `ProducerRecord` all existing
> interceptor implementations will fail to copy across the new field,
> assuming a backwards compatible constructors exist that allow the old code
> to compile, (which the tend to do). This makes the code brittle and leaves
> me with a bad taste in my mouth.
> >
> > Additionally, the set of `ProducerRecord` constructors is multiplying as
> new optional fields are being added and not all combinations are supported,
> though they may be valid.
> >
> > I was wondering what peoples thoughts would be to introducing a builder
> pattern on the producer record?  If we did and a pre-initialised builder
> could be obtained from any existing record, then interceptors can just
> set/oeverwrite the fields they care about, without additional fields being
> lost, so the above code becomes:
> >
> > ```java
> >   public ProducerRecord onSend(ProducerRecord record) {
> >   return record.asBuilder()
> >.setTimestamp(getSpecificTimestampIWantToSet())
> >  .build();
> >   }
> > ```
> >
> > This has the benefits of less and more clear interceptor code, and the
> code will pass along new fields, added in a newer version, without
> modification. (Though interceptor authors can still make the choice to use
> a constructor instead, dropping new fields - but now they’d have a choice).
> >
> > If people like this idea then I can create a Jira and a PR. (Would a KIP
> be required also?). If people don’t, I’ll move along quietly…
> >
> > Thanks,
> >
> > Andy
> >
> >
>


[GitHub] kafka pull request #3093: HOTFIX: Close transactional producers in all new t...

2017-05-18 Thread apurvam
GitHub user apurvam opened a pull request:

https://github.com/apache/kafka/pull/3093

HOTFIX: Close transactional producers in all new tests



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apurvam/kafka 
HOTFIX-close-leaked-producers-in-transactions-test

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3093.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3093






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Java Client Builder pattern for ProducerRecord - thoughts?

2017-05-18 Thread Michael André Pearce
Hi Andrew,

There is already a kip discussion exactly around this if you look for KIP 141 
discuss thread.

Cheers
Mike

Sent from my iPhone

> On 18 May 2017, at 18:29, Andrew Coates  wrote:
> 
> Hi all,
> 
> The `ProducerRecord` type has many optional fields and the list has grown 
> over different revisions of Kafka. Kafka supports `ProducerInterceptor`s, 
> which often need to construct new `ProducerRecord`s, based on those passed 
> in, copying most fields from the old to the new record, e.g.:
> 
> ```java
>   public ProducerRecord onSend(ProducerRecord record) {
>   return new ProducerRecord<>(record.topic(), record.partition(), 
> getSpecificTimestampIWantToSet(), record.key(), record.value())
>   }
> ```
> 
> If/when a new field is next added to the `ProducerRecord` all existing 
> interceptor implementations will fail to copy across the new field, assuming 
> a backwards compatible constructors exist that allow the old code to compile, 
> (which the tend to do). This makes the code brittle and leaves me with a bad 
> taste in my mouth.
> 
> Additionally, the set of `ProducerRecord` constructors is multiplying as new 
> optional fields are being added and not all combinations are supported, 
> though they may be valid.
> 
> I was wondering what peoples thoughts would be to introducing a builder 
> pattern on the producer record?  If we did and a pre-initialised builder 
> could be obtained from any existing record, then interceptors can just 
> set/oeverwrite the fields they care about, without additional fields being 
> lost, so the above code becomes:
> 
> ```java
>   public ProducerRecord onSend(ProducerRecord record) {
>   return record.asBuilder()
>.setTimestamp(getSpecificTimestampIWantToSet())
>  .build();
>   }
> ```
> 
> This has the benefits of less and more clear interceptor code, and the code 
> will pass along new fields, added in a newer version, without modification. 
> (Though interceptor authors can still make the choice to use a constructor 
> instead, dropping new fields - but now they’d have a choice).
> 
> If people like this idea then I can create a Jira and a PR. (Would a KIP be 
> required also?). If people don’t, I’ll move along quietly…
> 
> Thanks,
> 
> Andy
> 
> 


[GitHub] kafka pull request #2878: KAFKA-3070: SASL unit tests dont work with IBM JDK

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/2878


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (KAFKA-3070) SASL unit tests dont work with IBM JDK

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-3070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016393#comment-16016393
 ] 

ASF GitHub Bot commented on KAFKA-3070:
---

Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/2878


> SASL unit tests dont work with IBM JDK
> --
>
> Key: KAFKA-3070
> URL: https://issues.apache.org/jira/browse/KAFKA-3070
> Project: Kafka
>  Issue Type: Bug
>  Components: security
>Affects Versions: 0.9.0.0
>Reporter: Rajini Sivaram
>Assignee: Rajini Sivaram
> Fix For: 0.11.0.0
>
>
> jaas.conf used for SASL tests in core use the Kerberos module 
> com.sun.security.auth.module.Krb5LoginModule and hence dont work with IBM 
> JDK. The IBM JDK Kerberos module com.ibm.security.auth.module.Krb5LoginModule 
> should be used along with properties corresponding to this module when tests 
> are run with IBM JDK.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-3070) SASL unit tests dont work with IBM JDK

2017-05-18 Thread Rajini Sivaram (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-3070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajini Sivaram updated KAFKA-3070:
--
   Resolution: Fixed
Fix Version/s: 0.11.0.0
   Status: Resolved  (was: Patch Available)

Issue resolved by pull request 2878
[https://github.com/apache/kafka/pull/2878]

> SASL unit tests dont work with IBM JDK
> --
>
> Key: KAFKA-3070
> URL: https://issues.apache.org/jira/browse/KAFKA-3070
> Project: Kafka
>  Issue Type: Bug
>  Components: security
>Affects Versions: 0.9.0.0
>Reporter: Rajini Sivaram
>Assignee: Rajini Sivaram
> Fix For: 0.11.0.0
>
>
> jaas.conf used for SASL tests in core use the Kerberos module 
> com.sun.security.auth.module.Krb5LoginModule and hence dont work with IBM 
> JDK. The IBM JDK Kerberos module com.ibm.security.auth.module.Krb5LoginModule 
> should be used along with properties corresponding to this module when tests 
> are run with IBM JDK.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5033) Reconsider default retries for idempotent producer

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016381#comment-16016381
 ] 

ASF GitHub Bot commented on KAFKA-5033:
---

Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3091


> Reconsider default retries for idempotent producer
> --
>
> Key: KAFKA-5033
> URL: https://issues.apache.org/jira/browse/KAFKA-5033
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> We currently set the default to 3 if idempotence is enabled. There was a 
> brief discussion in the PR, but it would be good to explain this choice in 
> more detail. Namely, what cases are we trying to cover with this number and 
> have we considered the fact that with the default retry backoff of 100ms, 3 
> retries are used pretty quickly.
> Is there a downside in using a larger retry count?
> cc [~apurva]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3091: KAFKA-5033: Set default retries for the idempotent...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3091


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (KAFKA-5033) Reconsider default retries for idempotent producer

2017-05-18 Thread Jason Gustafson (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Gustafson resolved KAFKA-5033.

Resolution: Fixed

Issue resolved by pull request 3091
[https://github.com/apache/kafka/pull/3091]

> Reconsider default retries for idempotent producer
> --
>
> Key: KAFKA-5033
> URL: https://issues.apache.org/jira/browse/KAFKA-5033
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> We currently set the default to 3 if idempotence is enabled. There was a 
> brief discussion in the PR, but it would be good to explain this choice in 
> more detail. Namely, what cases are we trying to cover with this number and 
> have we considered the fact that with the default retry backoff of 100ms, 3 
> retries are used pretty quickly.
> Is there a downside in using a larger retry count?
> cc [~apurva]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Jenkins build is back to normal : kafka-trunk-jdk8 #1555

2017-05-18 Thread Apache Jenkins Server
See 




Jenkins build is back to normal : kafka-trunk-jdk7 #2227

2017-05-18 Thread Apache Jenkins Server
See 




[jira] [Commented] (KAFKA-5277) Sticky Assignor should not cache the calculated assignment (KIP-54 follow-up)

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016325#comment-16016325
 ] 

ASF GitHub Bot commented on KAFKA-5277:
---

GitHub user vahidhashemian opened a pull request:

https://github.com/apache/kafka/pull/3092

KAFKA-5277: Sticky Assignor should not cache previous assignment

... plus some minor cleanup

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/vahidhashemian/kafka KAFKA-5277

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3092.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3092






> Sticky Assignor should not cache the calculated assignment (KIP-54 follow-up)
> -
>
> Key: KAFKA-5277
> URL: https://issues.apache.org/jira/browse/KAFKA-5277
> Project: Kafka
>  Issue Type: Improvement
>Reporter: Vahid Hashemian
>Assignee: Vahid Hashemian
>Priority: Minor
>
> As a follow-up to KIP-54, remove the dependency of Sticky Assignor to 
> previously calculated assignment. This dependency is not required because 
> each consumer participating in the rebalance now notifies the group leader of 
> their assignment prior to rebalance. So the leader can compile the previous 
> assignment of the whole group from this information. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3092: KAFKA-5277: Sticky Assignor should not cache previ...

2017-05-18 Thread vahidhashemian
GitHub user vahidhashemian opened a pull request:

https://github.com/apache/kafka/pull/3092

KAFKA-5277: Sticky Assignor should not cache previous assignment

... plus some minor cleanup

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/vahidhashemian/kafka KAFKA-5277

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3092.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3092






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (KAFKA-4171) Kafka-connect prints outs keystone and truststore password in log2

2017-05-18 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated KAFKA-4171:
--
Fix Version/s: 0.10.1.0

> Kafka-connect prints outs keystone and truststore password in log2
> --
>
> Key: KAFKA-4171
> URL: https://issues.apache.org/jira/browse/KAFKA-4171
> Project: Kafka
>  Issue Type: Improvement
>  Components: KafkaConnect
>Affects Versions: 0.10.0.0
>Reporter: Akshath Patkar
>Assignee: Bharat Viswanadham
> Fix For: 0.10.1.0
>
>
> Kafka-connect prints outs keystone and truststore password in log
> [2016-09-14 16:30:33,971] WARN The configuration 
> consumer.ssl.truststore.password = X was supplied but isn't a known 
> config. (org.apache.kafka.clients.consumer.ConsumerConfig:186)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (KAFKA-4171) Kafka-connect prints outs keystone and truststore password in log2

2017-05-18 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham resolved KAFKA-4171.
---
Resolution: Fixed

> Kafka-connect prints outs keystone and truststore password in log2
> --
>
> Key: KAFKA-4171
> URL: https://issues.apache.org/jira/browse/KAFKA-4171
> Project: Kafka
>  Issue Type: Improvement
>  Components: KafkaConnect
>Affects Versions: 0.10.0.0
>Reporter: Akshath Patkar
>Assignee: Bharat Viswanadham
>
> Kafka-connect prints outs keystone and truststore password in log
> [2016-09-14 16:30:33,971] WARN The configuration 
> consumer.ssl.truststore.password = X was supplied but isn't a known 
> config. (org.apache.kafka.clients.consumer.ConsumerConfig:186)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-4171) Kafka-connect prints outs keystone and truststore password in log2

2017-05-18 Thread Bharat Viswanadham (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016258#comment-16016258
 ] 

Bharat Viswanadham commented on KAFKA-4171:
---

[~ewencp] The behavior is changed in AbstractConfig logUnsed() method to print 
only keys not values. As a part of KAFKA-4056: Kafka logs values of sensitive 
configs like passwords  In case of unknown configs, only list the name without 
the value. So, I think this jira can be closed as fixed.

> Kafka-connect prints outs keystone and truststore password in log2
> --
>
> Key: KAFKA-4171
> URL: https://issues.apache.org/jira/browse/KAFKA-4171
> Project: Kafka
>  Issue Type: Improvement
>  Components: KafkaConnect
>Affects Versions: 0.10.0.0
>Reporter: Akshath Patkar
>Assignee: Bharat Viswanadham
>
> Kafka-connect prints outs keystone and truststore password in log
> [2016-09-14 16:30:33,971] WARN The configuration 
> consumer.ssl.truststore.password = X was supplied but isn't a known 
> config. (org.apache.kafka.clients.consumer.ConsumerConfig:186)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-4278) Undocumented REST resources

2017-05-18 Thread Bharat Viswanadham (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-4278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016248#comment-16016248
 ] 

Bharat Viswanadham commented on KAFKA-4278:
---

[~ewencp]I thought of taking this work item.
Not sure how to get started on this, any pointers or example for making getting 
started for developing doc for Rest services.
In configs, I have seen there is a main function to convert config key value 
pair to HTML and print it. But I am not sure how to get started with Rest 
services?

> Undocumented REST resources
> ---
>
> Key: KAFKA-4278
> URL: https://issues.apache.org/jira/browse/KAFKA-4278
> Project: Kafka
>  Issue Type: Bug
>  Components: KafkaConnect
>Reporter: Gwen Shapira
>  Labels: newbie
>
> We've added some REST resources and I think we didn't document them.
> / - get version
> /connector-plugins - show installed connectors
> Those are the ones I've found (or rather, failed to find) - there could be 
> more.
> Perhaps the best solution is to auto-generate the REST documentation the way 
> we generate configuration docs?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5033) Reconsider default retries for idempotent producer

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016240#comment-16016240
 ] 

ASF GitHub Bot commented on KAFKA-5033:
---

GitHub user apurvam opened a pull request:

https://github.com/apache/kafka/pull/3091

KAFKA-5033: Set default retries for the idempotent producer to be infinite.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apurvam/kafka 
KAFKA-5033-bump-retries-for-idempotent-producer

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3091.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3091






> Reconsider default retries for idempotent producer
> --
>
> Key: KAFKA-5033
> URL: https://issues.apache.org/jira/browse/KAFKA-5033
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> We currently set the default to 3 if idempotence is enabled. There was a 
> brief discussion in the PR, but it would be good to explain this choice in 
> more detail. Namely, what cases are we trying to cover with this number and 
> have we considered the fact that with the default retry backoff of 100ms, 3 
> retries are used pretty quickly.
> Is there a downside in using a larger retry count?
> cc [~apurva]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3091: KAFKA-5033: Set default retries for the idempotent...

2017-05-18 Thread apurvam
GitHub user apurvam opened a pull request:

https://github.com/apache/kafka/pull/3091

KAFKA-5033: Set default retries for the idempotent producer to be infinite.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apurvam/kafka 
KAFKA-5033-bump-retries-for-idempotent-producer

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3091.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3091






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Assigned] (KAFKA-4896) Offset loading can use more threads

2017-05-18 Thread Abhishek Mendhekar (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-4896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abhishek Mendhekar reassigned KAFKA-4896:
-

Assignee: Abhishek Mendhekar

> Offset loading can use more threads
> ---
>
> Key: KAFKA-4896
> URL: https://issues.apache.org/jira/browse/KAFKA-4896
> Project: Kafka
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 0.10.2.0
>Reporter: Jun Rao
>Assignee: Abhishek Mendhekar
>  Labels: newbie
>
> Currently, in GroupMetadataManager, we have a single thread for loading the 
> offset cache. We could speed it up with more threads.
>  /* single-thread scheduler to handle offset/group metadata cache loading and 
> unloading */
>   private val scheduler = new KafkaScheduler(threads = 1, threadNamePrefix = 
> "group-metadata-manager-")



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5171) TC should not accept empty string transactional id

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016232#comment-16016232
 ] 

ASF GitHub Bot commented on KAFKA-5171:
---

Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3086


> TC should not accept empty string transactional id
> --
>
> Key: KAFKA-5171
> URL: https://issues.apache.org/jira/browse/KAFKA-5171
> Project: Kafka
>  Issue Type: Sub-task
>  Components: core
>Reporter: Guozhang Wang
> Fix For: 0.11.0.0
>
>
> Currently on TC, both `null` and `empty string` will be accepted and a new 
> pid will be returned. However, on the producer client end empty string 
> transactional id is not allowed, and if user specifically set it with empty 
> string RTE will be thrown.
> We can make TC's behavior consistent with client to also reject empty string 
> transactional id.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3086: KAFKA-5171 : TC should not accept empty string tra...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3086


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (KAFKA-5171) TC should not accept empty string transactional id

2017-05-18 Thread Jason Gustafson (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Gustafson resolved KAFKA-5171.

Resolution: Fixed

Issue resolved by pull request 3086
[https://github.com/apache/kafka/pull/3086]

> TC should not accept empty string transactional id
> --
>
> Key: KAFKA-5171
> URL: https://issues.apache.org/jira/browse/KAFKA-5171
> Project: Kafka
>  Issue Type: Sub-task
>  Components: core
>Reporter: Guozhang Wang
> Fix For: 0.11.0.0
>
>
> Currently on TC, both `null` and `empty string` will be accepted and a new 
> pid will be returned. However, on the producer client end empty string 
> transactional id is not allowed, and if user specifically set it with empty 
> string RTE will be thrown.
> We can make TC's behavior consistent with client to also reject empty string 
> transactional id.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Build failed in Jenkins: kafka-trunk-jdk7 #2226

2017-05-18 Thread Apache Jenkins Server
See 


Changes:

[me] KAFKA-3487: Support classloading isolation in Connect (KIP-146)

--
[...truncated 882.98 KB...]
kafka.log.ProducerStateManagerTest > 
testNonTransactionalAppendWithOngoingTransaction PASSED

kafka.log.ProducerStateManagerTest > testSkipSnapshotIfOffsetUnchanged STARTED

kafka.log.ProducerStateManagerTest > testSkipSnapshotIfOffsetUnchanged PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[0] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[0] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[1] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[1] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[2] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[2] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[3] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[3] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[4] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[4] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[5] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[5] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[6] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[6] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[7] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[7] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[8] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[8] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[9] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[9] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[10] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[10] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[11] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[11] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[12] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[12] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[13] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[13] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[14] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[14] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[15] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[15] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[16] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[16] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[17] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[17] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[18] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[18] PASSED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[19] STARTED

kafka.log.BrokerCompressionTest > testBrokerSideCompression[19] PASSED

kafka.log.LogCleanerIntegrationTest > 
testCleansCombinedCompactAndDeleteTopic[0] STARTED

kafka.log.LogCleanerIntegrationTest > 
testCleansCombinedCompactAndDeleteTopic[0] PASSED

kafka.log.LogCleanerIntegrationTest > 
testCleaningNestedMessagesWithMultipleVersions[0] STARTED

kafka.log.LogCleanerIntegrationTest > 
testCleaningNestedMessagesWithMultipleVersions[0] PASSED

kafka.log.LogCleanerIntegrationTest > cleanerTest[0] STARTED

kafka.log.LogCleanerIntegrationTest > cleanerTest[0] PASSED

kafka.log.LogCleanerIntegrationTest > testCleanerWithMessageFormatV0[0] STARTED

kafka.log.LogCleanerIntegrationTest > testCleanerWithMessageFormatV0[0] PASSED

kafka.log.LogCleanerIntegrationTest > 
testCleansCombinedCompactAndDeleteTopic[1] STARTED

kafka.log.LogCleanerIntegrationTest > 
testCleansCombinedCompactAndDeleteTopic[1] PASSED

kafka.log.LogCleanerIntegrationTest > 
testCleaningNestedMessagesWithMultipleVersions[1] STARTED

kafka.log.LogCleanerIntegrationTest > 
testCleaningNestedMessagesWithMultipleVersions[1] PASSED

kafka.log.LogCleanerIntegrationTest > cleanerTest[1] STARTED

kafka.log.LogCleanerIntegrationTest > cleanerTest[1] PASSED

kafka.log.LogCleanerIntegrationTest > testCleanerWithMessageFormatV0[1] STARTED

kafka.log.LogCleanerIntegrationTest > testCleanerWithMessageFormatV0[1] PASSED

kafka.log.LogCleanerIntegrationTest > 
testCleansCombinedCompactAndDeleteTopic[2] STARTED

kafka.log.LogCleanerIntegrationTest > 
testCleansCombinedCompactAndDeleteTopic[2] PASSED

kafka.log.LogCleanerIntegrationTest > 
testCleaningNestedMessagesWithMultipleVersions[2] STARTED


[jira] [Commented] (KAFKA-5268) TransactionsBounceTest occasionally sees INVALID_TXN_STATE errors

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016202#comment-16016202
 ] 

ASF GitHub Bot commented on KAFKA-5268:
---

Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3089


> TransactionsBounceTest occasionally sees INVALID_TXN_STATE errors
> -
>
> Key: KAFKA-5268
> URL: https://issues.apache.org/jira/browse/KAFKA-5268
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Jason Gustafson
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> This test occasionally fails because we hit an invalid state on the 
> `TransactionCoordinator` when processing an EndTxnRequest.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] kafka pull request #3089: KAFKA-5268: Fix bounce test transient failure by c...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/kafka/pull/3089


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (KAFKA-5268) TransactionsBounceTest occasionally sees INVALID_TXN_STATE errors

2017-05-18 Thread Jason Gustafson (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Gustafson resolved KAFKA-5268.

Resolution: Fixed

Issue resolved by pull request 3089
[https://github.com/apache/kafka/pull/3089]

> TransactionsBounceTest occasionally sees INVALID_TXN_STATE errors
> -
>
> Key: KAFKA-5268
> URL: https://issues.apache.org/jira/browse/KAFKA-5268
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Jason Gustafson
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> This test occasionally fails because we hit an invalid state on the 
> `TransactionCoordinator` when processing an EndTxnRequest.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-4278) Undocumented REST resources

2017-05-18 Thread Ewen Cheslack-Postava (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-4278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016195#comment-16016195
 ] 

Ewen Cheslack-Postava commented on KAFKA-4278:
--

[~bharatviswa] Looks like you moved this to in progress. Are you working on 
this? If so, can you assign it to yourself so folks know who is working on it?

> Undocumented REST resources
> ---
>
> Key: KAFKA-4278
> URL: https://issues.apache.org/jira/browse/KAFKA-4278
> Project: Kafka
>  Issue Type: Bug
>  Components: KafkaConnect
>Reporter: Gwen Shapira
>  Labels: newbie
>
> We've added some REST resources and I think we didn't document them.
> / - get version
> /connector-plugins - show installed connectors
> Those are the ones I've found (or rather, failed to find) - there could be 
> more.
> Perhaps the best solution is to auto-generate the REST documentation the way 
> we generate configuration docs?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-4171) Kafka-connect prints outs keystone and truststore password in log2

2017-05-18 Thread Ewen Cheslack-Postava (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016189#comment-16016189
 ] 

Ewen Cheslack-Postava commented on KAFKA-4171:
--

[~bharatviswa] I'm not aware of any fixes made for this, but we can close if we 
can verify it no longer logs this. This might be related to the fact that the 
config may be specified multiple times in a worker config (for the worker 
itself and prefixed by consumer. and producer.). In this case the ones with the 
extra prefixes might be the ones that are getting logged, i.e. in some places 
in the log it may have the correct behavior but in other locations it may have 
the incorrect behavior.

> Kafka-connect prints outs keystone and truststore password in log2
> --
>
> Key: KAFKA-4171
> URL: https://issues.apache.org/jira/browse/KAFKA-4171
> Project: Kafka
>  Issue Type: Improvement
>  Components: KafkaConnect
>Affects Versions: 0.10.0.0
>Reporter: Akshath Patkar
>Assignee: Bharat Viswanadham
>
> Kafka-connect prints outs keystone and truststore password in log
> [2016-09-14 16:30:33,971] WARN The configuration 
> consumer.ssl.truststore.password = X was supplied but isn't a known 
> config. (org.apache.kafka.clients.consumer.ConsumerConfig:186)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-3596) Kafka Streams: Window expiration needs to consider more than event time

2017-05-18 Thread Guozhang Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang reassigned KAFKA-3596:


Assignee: (was: Guozhang Wang)

> Kafka Streams: Window expiration needs to consider more than event time
> ---
>
> Key: KAFKA-3596
> URL: https://issues.apache.org/jira/browse/KAFKA-3596
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Affects Versions: 0.10.0.0
>Reporter: Henry Cai
>Priority: Minor
>  Labels: architecture
>
> Currently in Kafka Streams, the way the windows are expired in RocksDB is 
> triggered by new event insertion.  When a window is created at T0 with 10 
> minutes retention, when we saw a new record coming with event timestamp T0 + 
> 10 +1, we will expire that window (remove it) out of RocksDB.
> In the real world, it's very easy to see event coming with future timestamp 
> (or out-of-order events coming with big time gaps between events), this way 
> of retiring a window based on one event's event timestamp is dangerous.  I 
> think at least we need to consider both the event's event time and 
> server/stream time elapse.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-4325) Improve processing of late records for window operations

2017-05-18 Thread Guozhang Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang reassigned KAFKA-4325:


Assignee: (was: Guozhang Wang)

> Improve processing of late records for window operations
> 
>
> Key: KAFKA-4325
> URL: https://issues.apache.org/jira/browse/KAFKA-4325
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: Matthias J. Sax
>Priority: Minor
>
> Windows are kept until their retention time passed. If a late arriving record 
> is processed that is older than any window kept, a new window is created 
> containing this single late arriving record, the aggregation is computed and 
> the window is immediately discarded afterward (as it is older than retention 
> time).
> This behavior might case problems for downstream application as the original 
> window aggregate might we overwritten with the late single-record- aggregate 
> value. Thus, we should rather not process the late arriving record for this 
> case.
> However, data loss might not be acceptable for all use cases. In order to 
> enable the use to not lose any data, window operators should allow to 
> register a handler function that is called instead of just dropping the late 
> arriving record.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5281) System tests for KIP-98 / transactions

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5281:

Issue Type: Sub-task  (was: Bug)
Parent: KAFKA-4815

> System tests for KIP-98 / transactions
> --
>
> Key: KAFKA-5281
> URL: https://issues.apache.org/jira/browse/KAFKA-5281
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Kafka core System tests:
> # Failures for consumer coordinator, transaction coordinator, producer, 
> partition leader, and controller.
> # Same as above, but with multiple producers.
> # Multiple producers and consumers work together in failure modes, with 
> aborts.
> # Hard and soft failures.
> Integration test:
> # Multiple producers and consumers work together in a normal mode, with 
> aborts.
> # Transaction expiration.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5281) System tests for KIP-98 / transactions

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5281:

Priority: Blocker  (was: Major)

> System tests for KIP-98 / transactions
> --
>
> Key: KAFKA-5281
> URL: https://issues.apache.org/jira/browse/KAFKA-5281
> Project: Kafka
>  Issue Type: Bug
>Reporter: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Kafka core System tests:
> # Failures for consumer coordinator, transaction coordinator, producer, 
> partition leader, and controller.
> # Same as above, but with multiple producers.
> # Multiple producers and consumers work together in failure modes, with 
> aborts.
> # Hard and soft failures.
> Integration test:
> # Multiple producers and consumers work together in a normal mode, with 
> aborts.
> # Transaction expiration.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5281) System tests for KIP-98 / transactions

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5281:

Summary: System tests for KIP-98 / transactions  (was: System tests for 
KIP-98 / transaction)

> System tests for KIP-98 / transactions
> --
>
> Key: KAFKA-5281
> URL: https://issues.apache.org/jira/browse/KAFKA-5281
> Project: Kafka
>  Issue Type: Bug
>Reporter: Apurva Mehta
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Kafka core System tests:
> # Failures for consumer coordinator, transaction coordinator, producer, 
> partition leader, and controller.
> # Same as above, but with multiple producers.
> # Multiple producers and consumers work together in failure modes, with 
> aborts.
> # Hard and soft failures.
> Integration test:
> # Multiple producers and consumers work together in a normal mode, with 
> aborts.
> # Transaction expiration.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (KAFKA-5281) System tests for KIP-98 / transaction

2017-05-18 Thread Apurva Mehta (JIRA)
Apurva Mehta created KAFKA-5281:
---

 Summary: System tests for KIP-98 / transaction
 Key: KAFKA-5281
 URL: https://issues.apache.org/jira/browse/KAFKA-5281
 Project: Kafka
  Issue Type: Bug
Reporter: Apurva Mehta
 Fix For: 0.11.0.0


Kafka core System tests:
# Failures for consumer coordinator, transaction coordinator, producer, 
partition leader, and controller.
# Same as above, but with multiple producers.
# Multiple producers and consumers work together in failure modes, with aborts.
# Hard and soft failures.

Integration test:
# Multiple producers and consumers work together in a normal mode, with aborts.
# Transaction expiration.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5279) TransactionCoordinator must expire transactionalIds

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta reassigned KAFKA-5279:
---

Assignee: Damian Guy  (was: Guozhang Wang)

> TransactionCoordinator must expire transactionalIds
> ---
>
> Key: KAFKA-5279
> URL: https://issues.apache.org/jira/browse/KAFKA-5279
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Damian Guy
>Priority: Blocker
>  Labels: exactly-once
>
> Currently transactionalIds are not expired anywhere, so we accumulate forever.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5273) KafkaConsumer.committed() should get latest committed offsets from the server

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta reassigned KAFKA-5273:
---

Assignee: Apurva Mehta

> KafkaConsumer.committed() should get latest committed offsets from the server
> -
>
> Key: KAFKA-5273
> URL: https://issues.apache.org/jira/browse/KAFKA-5273
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently, the `KafkaConsumer.committed(topicPartition)` will return the 
> current position of the consumer for that partition if the consumer has been 
> assigned the partition. Otherwise, it will lookup the committed position from 
> the server. 
> With the new producer `sendOffsetsToTransaction` api, we get into a state 
> where we can commit the offsets for an assigned partition through the 
> producer. So the consumer doesn't update it's cached view and subsequently 
> returns a stale committed offset for it's assigned partition. 
> We should either update the consumer's cache when offsets are committed 
> through the producer, or drop the cache totally and always lookup the server 
> to get the committed offset. This way the `committed` method will always 
> return the latest committed offset for any partition.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5273) KafkaConsumer.committed() should get latest committed offsets from the server

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5273:

Priority: Blocker  (was: Major)

> KafkaConsumer.committed() should get latest committed offsets from the server
> -
>
> Key: KAFKA-5273
> URL: https://issues.apache.org/jira/browse/KAFKA-5273
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently, the `KafkaConsumer.committed(topicPartition)` will return the 
> current position of the consumer for that partition if the consumer has been 
> assigned the partition. Otherwise, it will lookup the committed position from 
> the server. 
> With the new producer `sendOffsetsToTransaction` api, we get into a state 
> where we can commit the offsets for an assigned partition through the 
> producer. So the consumer doesn't update it's cached view and subsequently 
> returns a stale committed offset for it's assigned partition. 
> We should either update the consumer's cache when offsets are committed 
> through the producer, or drop the cache totally and always lookup the server 
> to get the committed offset. This way the `committed` method will always 
> return the latest committed offset for any partition.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5279) TransactionCoordinator must expire transactionalIds

2017-05-18 Thread Guozhang Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang reassigned KAFKA-5279:


Assignee: Guozhang Wang

> TransactionCoordinator must expire transactionalIds
> ---
>
> Key: KAFKA-5279
> URL: https://issues.apache.org/jira/browse/KAFKA-5279
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Guozhang Wang
>Priority: Blocker
>  Labels: exactly-once
>
> Currently transactionalIds are not expired anywhere, so we accumulate forever.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5269) TransactionBounceTest occasionally fails due to partition errors

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5269:

Priority: Blocker  (was: Major)

> TransactionBounceTest occasionally fails due to partition errors
> 
>
> Key: KAFKA-5269
> URL: https://issues.apache.org/jira/browse/KAFKA-5269
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
>
> The test sometimes encounters a partition level error 
> `UNKNOWN_TOPIC_OR_PARTITION` for the output topic. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5269) TransactionBounceTest occasionally fails due to partition errors

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5269:

Labels: exactly-once  (was: )

> TransactionBounceTest occasionally fails due to partition errors
> 
>
> Key: KAFKA-5269
> URL: https://issues.apache.org/jira/browse/KAFKA-5269
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
>
> The test sometimes encounters a partition level error 
> `UNKNOWN_TOPIC_OR_PARTITION` for the output topic. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5270) TransactionManager should send and `AddOffsetsToTxn` request only once per group per transaction

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5270:

Priority: Blocker  (was: Major)

> TransactionManager should send and `AddOffsetsToTxn` request only once per 
> group per transaction
> 
>
> Key: KAFKA-5270
> URL: https://issues.apache.org/jira/browse/KAFKA-5270
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently, we send the `AddOffsetsToTxn` request unconditionally every time, 
> even if we receive multiple sendOffsets for the same group. We could keep 
> track of the added groups in the TransactionManager and not resend this RPC 
> multiple times for the same transaction as the subsequent instances add no 
> new information.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5270) TransactionManager should send and `AddOffsetsToTxn` request only once per group per transaction

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5270:

Priority: Major  (was: Blocker)

> TransactionManager should send and `AddOffsetsToTxn` request only once per 
> group per transaction
> 
>
> Key: KAFKA-5270
> URL: https://issues.apache.org/jira/browse/KAFKA-5270
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Apurva Mehta
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently, we send the `AddOffsetsToTxn` request unconditionally every time, 
> even if we receive multiple sendOffsets for the same group. We could keep 
> track of the added groups in the TransactionManager and not resend this RPC 
> multiple times for the same transaction as the subsequent instances add no 
> new information.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5260) Producer should not send AbortTxn unless transaction has actually begun

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta reassigned KAFKA-5260:
---

Assignee: Damian Guy

> Producer should not send AbortTxn unless transaction has actually begun
> ---
>
> Key: KAFKA-5260
> URL: https://issues.apache.org/jira/browse/KAFKA-5260
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>Assignee: Damian Guy
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> When there is an authorization error in AddOffsets or AddPartitions, the 
> producer will raise an authorization exception. When that happens, the user 
> should abort the transaction. The problem is that in an authorization error, 
> the coordinator will not have transitioned to a new state, so if it suddenly 
> receives an AbortTxnRequest, that request will fail with an InvalidTxnState, 
> which will be propagated to the error. The suggested solution is to keep 
> track locally when we are certain that no transaction has been officially 
> begun and to skip sending the AbortTxnRequest in that case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5260) Producer should not send AbortTxn unless transaction has actually begun

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5260:

Priority: Blocker  (was: Critical)

> Producer should not send AbortTxn unless transaction has actually begun
> ---
>
> Key: KAFKA-5260
> URL: https://issues.apache.org/jira/browse/KAFKA-5260
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> When there is an authorization error in AddOffsets or AddPartitions, the 
> producer will raise an authorization exception. When that happens, the user 
> should abort the transaction. The problem is that in an authorization error, 
> the coordinator will not have transitioned to a new state, so if it suddenly 
> receives an AbortTxnRequest, that request will fail with an InvalidTxnState, 
> which will be propagated to the error. The suggested solution is to keep 
> track locally when we are certain that no transaction has been officially 
> begun and to skip sending the AbortTxnRequest in that case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5260) Producer should not send AbortTxn unless transaction has actually begun

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5260:

Priority: Critical  (was: Major)

> Producer should not send AbortTxn unless transaction has actually begun
> ---
>
> Key: KAFKA-5260
> URL: https://issues.apache.org/jira/browse/KAFKA-5260
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>Priority: Critical
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> When there is an authorization error in AddOffsets or AddPartitions, the 
> producer will raise an authorization exception. When that happens, the user 
> should abort the transaction. The problem is that in an authorization error, 
> the coordinator will not have transitioned to a new state, so if it suddenly 
> receives an AbortTxnRequest, that request will fail with an InvalidTxnState, 
> which will be propagated to the error. The suggested solution is to keep 
> track locally when we are certain that no transaction has been officially 
> begun and to skip sending the AbortTxnRequest in that case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5259) TransactionalId authorization should imply ProducerId authorization

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5259:

Labels: exactly-once  (was: )

> TransactionalId authorization should imply ProducerId authorization
> ---
>
> Key: KAFKA-5259
> URL: https://issues.apache.org/jira/browse/KAFKA-5259
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>Assignee: Jason Gustafson
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> There is not much point to only authorizing a transactionalId: without 
> producerId authorization, a principal cannot actually write any transactional 
> data. So we may as well make ProducerId authorization implicit if a 
> transactionalId is authorized. 
> There are also a couple cases that we missed in the initial authorization 
> patch which we may as well handle here.
> 1. FindCoordinatorRequest should authorize by transactionalId
> 2. TxnOffsetCommitRequest should also authorize by transactionalId. Currently 
> this field is not included in the request type but it probably should be 
> since then writing any transactional data requires authorization to some 
> transactionalId.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5260) Producer should not send AbortTxn unless transaction has actually begun

2017-05-18 Thread Guozhang Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang updated KAFKA-5260:
-
Labels: exactly-once  (was: )

> Producer should not send AbortTxn unless transaction has actually begun
> ---
>
> Key: KAFKA-5260
> URL: https://issues.apache.org/jira/browse/KAFKA-5260
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> When there is an authorization error in AddOffsets or AddPartitions, the 
> producer will raise an authorization exception. When that happens, the user 
> should abort the transaction. The problem is that in an authorization error, 
> the coordinator will not have transitioned to a new state, so if it suddenly 
> receives an AbortTxnRequest, that request will fail with an InvalidTxnState, 
> which will be propagated to the error. The suggested solution is to keep 
> track locally when we are certain that no transaction has been officially 
> begun and to skip sending the AbortTxnRequest in that case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5032) Think through implications of max.message.size affecting record batches in message format V2

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta reassigned KAFKA-5032:
---

Assignee: Apurva Mehta

> Think through implications of max.message.size affecting record batches in 
> message format V2
> 
>
> Key: KAFKA-5032
> URL: https://issues.apache.org/jira/browse/KAFKA-5032
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Assignee: Apurva Mehta
>Priority: Critical
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> It's worth noting that the new behaviour for uncompressed messages is the 
> same as the existing behaviour for compressed messages.
> A few things to think about:
> 1. Do the producer settings max.request.size and batch.size still make sense 
> and do we need to update the documentation? My conclusion is that things are 
> still fine, but we may need to revise the docs.
> 2. Consider changing default max message set size to include record batch 
> overhead. This is currently defined as:
> {code}
> val MessageMaxBytes = 100 + MessageSet.LogOverhead
> {code}
> We should consider changing it to (I haven't thought it through though):
> {code}
> val MessageMaxBytes = 100 + DefaultRecordBatch.RECORD_BATCH_OVERHEAD
> {code}
> 3. When a record batch is too large, we throw RecordTooLargeException, which 
> is confusing because there's also a RecordBatchTooLargeException. We should 
> consider renaming these exceptions to make the behaviour clearer.
> 4. We should consider deprecating max.message.bytes (server config) and 
> message.max.bytes (topic config) in favour of configs that make it clear that 
> we are talking about record batches instead of individual messages.
> Part of the work in this JIRA is working out what should be done for 0.11.0.0 
> and what can be done later.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5093) Load only batch header when rebuilding producer ID map

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5093:

Priority: Critical  (was: Major)

> Load only batch header when rebuilding producer ID map
> --
>
> Key: KAFKA-5093
> URL: https://issues.apache.org/jira/browse/KAFKA-5093
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Jason Gustafson
>Assignee: Jason Gustafson
>Priority: Critical
> Fix For: 0.11.0.0
>
>
> When rebuilding the producer ID map for KIP-98, we unnecessarily load the 
> full record data into memory when scanning through the log. It would be 
> better to only load the batch header since it is all that is needed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5247) Consumer GroupCoordinator should continue to materialize committed offsets in offset order even for transactional offset commits

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5247:

Priority: Blocker  (was: Major)

> Consumer GroupCoordinator should continue to materialize committed offsets in 
> offset order even for transactional offset commits
> 
>
> Key: KAFKA-5247
> URL: https://issues.apache.org/jira/browse/KAFKA-5247
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> In the TxnOffsetCommit patch, we thought it was ok for the group coordinator 
> to use "transaction order" semantics when updating the cache, but we weren't 
> thinking about the log cleaner.
> The log cleaner uses offset order when cleaning which means that the key with 
> the largest offset always wins. So if we use transaction order when 
> dynamically updating the cache, we will get different results from when we're 
> loading the cache (even if the loading logic also uses transaction order).
> The fix should be straightforward: we need to remember the offset in the 
> offsets topic of the offset that we cache. Then we only update it if the new 
> entry has a higher offset.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KAFKA-5247) Consumer GroupCoordinator should continue to materialize committed offsets in offset order even for transactional offset commits

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta reassigned KAFKA-5247:
---

Assignee: Apurva Mehta

> Consumer GroupCoordinator should continue to materialize committed offsets in 
> offset order even for transactional offset commits
> 
>
> Key: KAFKA-5247
> URL: https://issues.apache.org/jira/browse/KAFKA-5247
> Project: Kafka
>  Issue Type: Sub-task
>Reporter: Apurva Mehta
>Assignee: Apurva Mehta
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> In the TxnOffsetCommit patch, we thought it was ok for the group coordinator 
> to use "transaction order" semantics when updating the cache, but we weren't 
> thinking about the log cleaner.
> The log cleaner uses offset order when cleaning which means that the key with 
> the largest offset always wins. So if we use transaction order when 
> dynamically updating the cache, we will get different results from when we're 
> loading the cache (even if the loading logic also uses transaction order).
> The fix should be straightforward: we need to remember the offset in the 
> offsets topic of the offset that we cache. Then we only update it if the new 
> entry has a higher offset.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5186) Avoid expensive initialization of producer state when upgrading

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5186:

Labels: exactly-once  (was: )

> Avoid expensive initialization of producer state when upgrading
> ---
>
> Key: KAFKA-5186
> URL: https://issues.apache.org/jira/browse/KAFKA-5186
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>Assignee: Jason Gustafson
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently the producer state is always loaded upon broker initialization. If 
> we don't find a snapshot file to load from, then we scan the log segments 
> from the beginning to rebuild the state. Of course, when users upgrade to the 
> new version, there will be no snapshot file, so the upgrade could be quite 
> intensive. It would be nice to avoid this by assuming instead that the 
> absence of a snapshot file means that the producer state should start clean 
> and we can avoid the expensive scanning.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5186) Avoid expensive initialization of producer state when upgrading

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5186:

Priority: Blocker  (was: Critical)

> Avoid expensive initialization of producer state when upgrading
> ---
>
> Key: KAFKA-5186
> URL: https://issues.apache.org/jira/browse/KAFKA-5186
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Jason Gustafson
>Assignee: Jason Gustafson
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> Currently the producer state is always loaded upon broker initialization. If 
> we don't find a snapshot file to load from, then we scan the log segments 
> from the beginning to rebuild the state. Of course, when users upgrade to the 
> new version, there will be no snapshot file, so the upgrade could be quite 
> intensive. It would be nice to avoid this by assuming instead that the 
> absence of a snapshot file means that the producer state should start clean 
> and we can avoid the expensive scanning.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5033) Reconsider default retries for idempotent producer

2017-05-18 Thread Guozhang Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang updated KAFKA-5033:
-
Labels: exactly-once  (was: )

> Reconsider default retries for idempotent producer
> --
>
> Key: KAFKA-5033
> URL: https://issues.apache.org/jira/browse/KAFKA-5033
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Assignee: Apurva Mehta
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> We currently set the default to 3 if idempotence is enabled. There was a 
> brief discussion in the PR, but it would be good to explain this choice in 
> more detail. Namely, what cases are we trying to cover with this number and 
> have we considered the fact that with the default retry backoff of 100ms, 3 
> retries are used pretty quickly.
> Is there a downside in using a larger retry count?
> cc [~apurva]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KAFKA-5033) Reconsider default retries for idempotent producer

2017-05-18 Thread Apurva Mehta (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016152#comment-16016152
 ] 

Apurva Mehta commented on KAFKA-5033:
-

A default of `MAX_INT` seems reasonable here.

> Reconsider default retries for idempotent producer
> --
>
> Key: KAFKA-5033
> URL: https://issues.apache.org/jira/browse/KAFKA-5033
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Assignee: Apurva Mehta
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> We currently set the default to 3 if idempotence is enabled. There was a 
> brief discussion in the PR, but it would be good to explain this choice in 
> more detail. Namely, what cases are we trying to cover with this number and 
> have we considered the fact that with the default retry backoff of 100ms, 3 
> retries are used pretty quickly.
> Is there a downside in using a larger retry count?
> cc [~apurva]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5033) Reconsider default retries for idempotent producer

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5033:

Priority: Blocker  (was: Major)

> Reconsider default retries for idempotent producer
> --
>
> Key: KAFKA-5033
> URL: https://issues.apache.org/jira/browse/KAFKA-5033
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Assignee: Apurva Mehta
>Priority: Blocker
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> We currently set the default to 3 if idempotence is enabled. There was a 
> brief discussion in the PR, but it would be good to explain this choice in 
> more detail. Namely, what cases are we trying to cover with this number and 
> have we considered the fact that with the default retry backoff of 100ms, 3 
> retries are used pretty quickly.
> Is there a downside in using a larger retry count?
> cc [~apurva]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KAFKA-5032) Think through implications of max.message.size affecting record batches in message format V2

2017-05-18 Thread Apurva Mehta (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apurva Mehta updated KAFKA-5032:

Labels: exactly-once  (was: )

> Think through implications of max.message.size affecting record batches in 
> message format V2
> 
>
> Key: KAFKA-5032
> URL: https://issues.apache.org/jira/browse/KAFKA-5032
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, core, producer 
>Reporter: Ismael Juma
>Priority: Critical
>  Labels: exactly-once
> Fix For: 0.11.0.0
>
>
> It's worth noting that the new behaviour for uncompressed messages is the 
> same as the existing behaviour for compressed messages.
> A few things to think about:
> 1. Do the producer settings max.request.size and batch.size still make sense 
> and do we need to update the documentation? My conclusion is that things are 
> still fine, but we may need to revise the docs.
> 2. Consider changing default max message set size to include record batch 
> overhead. This is currently defined as:
> {code}
> val MessageMaxBytes = 100 + MessageSet.LogOverhead
> {code}
> We should consider changing it to (I haven't thought it through though):
> {code}
> val MessageMaxBytes = 100 + DefaultRecordBatch.RECORD_BATCH_OVERHEAD
> {code}
> 3. When a record batch is too large, we throw RecordTooLargeException, which 
> is confusing because there's also a RecordBatchTooLargeException. We should 
> consider renaming these exceptions to make the behaviour clearer.
> 4. We should consider deprecating max.message.bytes (server config) and 
> message.max.bytes (topic config) in favour of configs that make it clear that 
> we are talking about record batches instead of individual messages.
> Part of the work in this JIRA is working out what should be done for 0.11.0.0 
> and what can be done later.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


  1   2   >