kafka git commit: KAFKA-2386; increase timeouts for transient test failure in ConsumerCoordinatorResponseTests

2015-08-03 Thread gwenshap
Repository: kafka
Updated Branches:
  refs/heads/trunk cd3dc7a5c - 3c0963084


KAFKA-2386; increase timeouts for transient test failure in 
ConsumerCoordinatorResponseTests

There are two race conditions in the test case 
testGenerationIdIncrementsOnRebalance. First, a delay before the second join 
group request can timeout the initial group and cause the generationId to 
unexpectedly reset. Second, a delay in the join group request handling will 
timeout the request itself and cause the test to fail.  This commit doesn't 
address these race conditions, but increases the timeouts to make them more 
unlikely. If the problem reoccurs, then we'll probably need a better solution.

Author: Jason Gustafson ja...@confluent.io

Reviewers: Gwen Shapira csh...@gmail.com

Closes #107 from hachikuji/KAFKA-2386 and squashes the following commits:

a53460a [Jason Gustafson] KAFKA-2386; increase timeouts for transient test 
failure in ConsumerCoordinatorResponseTest


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/3c096308
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/3c096308
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/3c096308

Branch: refs/heads/trunk
Commit: 3c09630844f6e70793f53a9d4f0ef562fe9d91d3
Parents: cd3dc7a
Author: Jason Gustafson ja...@confluent.io
Authored: Mon Aug 3 15:42:33 2015 -0700
Committer: Chen Shapira g...@macbook-pro.gateway.sonic.net
Committed: Mon Aug 3 15:42:33 2015 -0700

--
 .../kafka/coordinator/ConsumerCoordinatorResponseTest.scala | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kafka/blob/3c096308/core/src/test/scala/unit/kafka/coordinator/ConsumerCoordinatorResponseTest.scala
--
diff --git 
a/core/src/test/scala/unit/kafka/coordinator/ConsumerCoordinatorResponseTest.scala
 
b/core/src/test/scala/unit/kafka/coordinator/ConsumerCoordinatorResponseTest.scala
index 87a5330..058daef 100644
--- 
a/core/src/test/scala/unit/kafka/coordinator/ConsumerCoordinatorResponseTest.scala
+++ 
b/core/src/test/scala/unit/kafka/coordinator/ConsumerCoordinatorResponseTest.scala
@@ -43,8 +43,8 @@ class ConsumerCoordinatorResponseTest extends JUnitSuite {
   type HeartbeatCallback = Short = Unit
 
   val ConsumerMinSessionTimeout = 10
-  val ConsumerMaxSessionTimeout = 100
-  val DefaultSessionTimeout = 20
+  val ConsumerMaxSessionTimeout = 200
+  val DefaultSessionTimeout = 100
   var consumerCoordinator: ConsumerCoordinator = null
   var offsetManager : OffsetManager = null
 
@@ -238,7 +238,7 @@ class ConsumerCoordinatorResponseTest extends JUnitSuite {
 
 // First start up a group (with a slightly larger timeout to give us time 
to heartbeat when the rebalance starts)
 val joinGroupResult = joinGroup(groupId, 
JoinGroupRequest.UNKNOWN_CONSUMER_ID, partitionAssignmentStrategy,
-  100, isCoordinatorForGroup = true)
+  DefaultSessionTimeout, isCoordinatorForGroup = true)
 val assignedConsumerId = joinGroupResult._2
 val initialGenerationId = joinGroupResult._3
 val joinGroupErrorCode = joinGroupResult._4
@@ -310,7 +310,8 @@ class ConsumerCoordinatorResponseTest extends JUnitSuite {
 sessionTimeout: Int,
 isCoordinatorForGroup: Boolean): 
JoinGroupCallbackParams = {
 val responseFuture = sendJoinGroup(groupId, consumerId, 
partitionAssignmentStrategy, sessionTimeout, isCoordinatorForGroup)
-Await.result(responseFuture, Duration(40, TimeUnit.MILLISECONDS))
+// should only have to wait as long as session timeout, but allow some 
extra time in case of an unexpected delay
+Await.result(responseFuture, Duration(sessionTimeout+100, 
TimeUnit.MILLISECONDS))
   }
 
   private def heartbeat(groupId: String,



kafka git commit: KAFKA-2384: Override commit message title in kafka-merge-pr.py

2015-08-03 Thread guozhang
Repository: kafka
Updated Branches:
  refs/heads/trunk 23a36eb54 - b152c0604


KAFKA-2384: Override commit message title in kafka-merge-pr.py

Author: Ismael Juma ism...@juma.me.uk

Reviewers: Guozhang

Closes #105 from ijuma/kafka-2384-override-commit-message-title and squashes 
the following commits:

e042242 [Ismael Juma] Support overriding of commit message title in 
kafka-merge-pr.py


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/b152c060
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/b152c060
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/b152c060

Branch: refs/heads/trunk
Commit: b152c0604cdce8882028b62601916b5d2b82d6a5
Parents: 23a36eb
Author: Ismael Juma ism...@juma.me.uk
Authored: Mon Aug 3 13:08:57 2015 -0700
Committer: Guozhang Wang wangg...@gmail.com
Committed: Mon Aug 3 13:08:57 2015 -0700

--
 kafka-merge-pr.py | 26 ++
 1 file changed, 14 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kafka/blob/b152c060/kafka-merge-pr.py
--
diff --git a/kafka-merge-pr.py b/kafka-merge-pr.py
index 876f530..576d315 100644
--- a/kafka-merge-pr.py
+++ b/kafka-merge-pr.py
@@ -380,22 +380,24 @@ def main():
 
 url = pr[url]
 
+pr_title = pr[title]
+commit_title = raw_input(Commit title [%s]:  % pr_title)
+if commit_title == :
+commit_title = pr_title
+
 # Decide whether to use the modified title or not
-modified_title = standardize_jira_ref(pr[title])
-if modified_title != pr[title]:
+modified_title = standardize_jira_ref(commit_title)
+if modified_title != commit_title:
 print I've re-written the title as follows to match the standard 
format:
-print Original: %s % pr[title]
+print Original: %s % commit_title
 print Modified: %s % modified_title
 result = raw_input(Would you like to use the modified title? (y/n): )
 if result.lower() == y:
-title = modified_title
+commit_title = modified_title
 print Using modified title:
 else:
-title = pr[title]
 print Using original title:
-print title
-else:
-title = pr[title]
+print commit_title
 
 body = pr[body]
 target_ref = pr[base][ref]
@@ -428,13 +430,13 @@ def main():
 continue_maybe(msg)
 
 print (\n=== Pull Request #%s === % pr_num)
-print (title\t%s\nsource\t%s\ntarget\t%s\nurl\t%s % (
-title, pr_repo_desc, target_ref, url))
+print (PR title\t%s\nCommit 
title\t%s\nSource\t\t%s\nTarget\t\t%s\nURL\t\t%s % (
+pr_title, commit_title, pr_repo_desc, target_ref, url))
 continue_maybe(Proceed with merging pull request #%s? % pr_num)
 
 merged_refs = [target_ref]
 
-merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+merge_hash = merge_pr(pr_num, target_ref, commit_title, body, pr_repo_desc)
 
 pick_prompt = Would you like to pick %s into another branch? % merge_hash
 while raw_input(\n%s (y/n):  % pick_prompt).lower() == y:
@@ -444,7 +446,7 @@ def main():
 if JIRA_USERNAME and JIRA_PASSWORD:
 continue_maybe(Would you like to update an associated JIRA?)
 jira_comment = Issue resolved by pull request %s\n[%s/%s] % 
(pr_num, GITHUB_BASE, pr_num)
-resolve_jira_issues(title, merged_refs, jira_comment)
+resolve_jira_issues(commit_title, merged_refs, jira_comment)
 else:
 print JIRA_USERNAME and JIRA_PASSWORD not set
 print Exiting without trying to close the associated JIRA.



kafka git commit: MINOR: Added to .gitignore Kafka server logs directory

2015-08-03 Thread gwenshap
Repository: kafka
Updated Branches:
  refs/heads/trunk b152c0604 - cd3dc7a5c


MINOR: Added to .gitignore Kafka server logs directory

When running Kafka server from sources, logs directory gets created in root of 
repository, and kafka server logs end up there. Currently that directory is not 
ignored by git.

This change adds root logs directory to .gitignore so that Kafka server logs 
are ignored and do not get tracked by git.

Author: Stevo Slavić ssla...@gmail.com

Reviewers: Ismael Juma

Closes #94 from sslavic/patch-7 and squashes the following commits:

c7b62a7 [Stevo Slavić] MINOR: Added to .gitignore Kafka server logs


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/cd3dc7a5
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/cd3dc7a5
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/cd3dc7a5

Branch: refs/heads/trunk
Commit: cd3dc7a5c9f3a68ad73d2ae7c975f9882f00036e
Parents: b152c06
Author: Stevo Slavić ssla...@gmail.com
Authored: Mon Aug 3 14:12:00 2015 -0700
Committer: Chen Shapira g...@macbook-pro.gateway.sonic.net
Committed: Mon Aug 3 14:12:00 2015 -0700

--
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/kafka/blob/cd3dc7a5/.gitignore
--
diff --git a/.gitignore b/.gitignore
index 4aae6e7..dbc0507 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ kafka.ipr
 kafka.iws
 .vagrant
 Vagrantfile.local
+/logs
 
 config/server-*
 config/zookeeper-*