kafka git commit: KAFKA-2415; Fix transient failure in LogRecoveryTest

2015-08-07 Thread gwenshap
Repository: kafka
Updated Branches:
  refs/heads/trunk a36befd81 - 68ad80f85


KAFKA-2415; Fix transient failure in LogRecoveryTest

Author: Jiangjie Qin becket@gmail.com
Author: Jiangjie Qin j...@jqin-ld1.linkedin.biz

Reviewers: Ismael Juma, Gwen Shapira

Closes #121 from becketqin/KAFKA-2415 and squashes the following commits:

7a9f453 [Jiangjie Qin] Addressed Ismael's comment
346103c [Jiangjie Qin] KAFKA-2415: Fix transient failure in LogRecoveryTest


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

Branch: refs/heads/trunk
Commit: 68ad80f8524931222d78a8125cd012321d784337
Parents: a36befd
Author: Jiangjie Qin becket@gmail.com
Authored: Fri Aug 7 16:16:34 2015 -0700
Committer: Gwen Shapira csh...@gmail.com
Committed: Fri Aug 7 16:16:34 2015 -0700

--
 core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kafka/blob/68ad80f8/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
--
diff --git a/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala 
b/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
index 7688f26..21081ce 100755
--- a/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
+++ b/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
@@ -210,6 +210,9 @@ class LogRecoveryTest extends JUnit3Suite with 
ZooKeeperTestHarness {
 sendMessages(2)
 hw += 2
 
+// allow some time for the follower to create replica
+TestUtils.waitUntilTrue(() = server1.replicaManager.getReplica(topic, 
0).nonEmpty,
+  Failed to create replica in follower after timeout)
 // allow some time for the follower to get the leader HW
 TestUtils.waitUntilTrue(() =
   server1.replicaManager.getReplica(topic, 
0).get.highWatermark.messageOffset == hw,



kafka git commit: Minor: Fixes to Selector's javadoc

2015-08-07 Thread gwenshap
Repository: kafka
Updated Branches:
  refs/heads/trunk 63b820c59 - 47c99f387


Minor: Fixes to Selector's javadoc

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

Closes #126 from ijuma/minor-selector-javadoc-fixes and squashes the following 
commits:

a26f529 [Ismael Juma] Minor fixes to Selector's javadoc


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

Branch: refs/heads/trunk
Commit: 47c99f38726dd5bd3bf2c2f8a8a999d36b53ffcf
Parents: 63b820c
Author: Ismael Juma ism...@juma.me.uk
Authored: Fri Aug 7 16:07:45 2015 -0700
Committer: Gwen Shapira csh...@gmail.com
Committed: Fri Aug 7 16:07:45 2015 -0700

--
 .../org/apache/kafka/common/network/Selector.java| 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kafka/blob/47c99f38/clients/src/main/java/org/apache/kafka/common/network/Selector.java
--
diff --git 
a/clients/src/main/java/org/apache/kafka/common/network/Selector.java 
b/clients/src/main/java/org/apache/kafka/common/network/Selector.java
index aaf60c9..ce20111 100644
--- a/clients/src/main/java/org/apache/kafka/common/network/Selector.java
+++ b/clients/src/main/java/org/apache/kafka/common/network/Selector.java
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
  * A connection can be added to the nioSelector associated with an integer id 
by doing
  * 
  * pre
- * nioSelector.connect(42, new InetSocketAddress(quot;google.comquot;, 
server.port), 64000, 64000);
+ * nioSelector.connect(quot;42quot;, new 
InetSocketAddress(quot;google.comquot;, server.port), 64000, 64000);
  * /pre
  * 
  * The connect call does not block on the creation of the TCP connection, so 
the connect method only begins initiating
@@ -55,8 +55,9 @@ import org.slf4j.LoggerFactory;
  * connections are all done using the codepoll()/code call.
  * 
  * pre
- * Listlt;NetworkRequestgt; requestsToSend = Arrays.asList(new 
NetworkRequest(0, myBytes), new NetworkRequest(1, myOtherBytes));
- * nioSelector.poll(TIMEOUT_MS, requestsToSend);
+ * nioSelector.send(new NetworkSend(myDestination, myBytes));
+ * nioSelector.send(new NetworkSend(myOtherDestination, myOtherBytes));
+ * nioSelector.poll(TIMEOUT_MS);
  * /pre
  * 
  * The nioSelector maintains several lists that are reset by each call to 
codepoll()/code which are available via
@@ -123,7 +124,7 @@ public class Selector implements Selectable {
  * Begin connecting to the given address and add the connection to this 
nioSelector associated with the given id
  * number.
  * p
- * Note that this call only initiates the connection, which will be 
completed on a future {@link #poll(long, List)}
+ * Note that this call only initiates the connection, which will be 
completed on a future {@link #poll(long)}
  * call. Check {@link #connected()} to see which (if any) connections have 
completed after a given poll call.
  * @param id The id for the new connection
  * @param address The address to connect to
@@ -171,7 +172,7 @@ public class Selector implements Selectable {
 
 /**
  * Disconnect any connections for the given id (if there are any). The 
disconnection is asynchronous and will not be
- * processed until the next {@link #poll(long, List) poll()} call.
+ * processed until the next {@link #poll(long) poll()} call.
  */
 @Override
 public void disconnect(String id) {
@@ -228,8 +229,8 @@ public class Selector implements Selectable {
  * 
  * When this call is completed the user can check for completed sends, 
receives, connections or disconnects using
  * {@link #completedSends()}, {@link #completedReceives()}, {@link 
#connected()}, {@link #disconnected()}. These
- * lists will be cleared at the beginning of each {@link #poll(long, 
List)} call and repopulated by the call if any
- * completed I/O.
+ * lists will be cleared at the beginning of each {@link #poll(long)} call 
and repopulated by the call if there is
+ * any completed I/O.
  * 
  * @param timeout The amount of time to wait, in milliseconds. If 
negative, wait indefinitely.
  * @throws IllegalStateException If a send is given for which we have no 
existing connection or for which there is