[prev in list] [next in list] [prev in thread] [next in thread]
List: avro-commits
Subject: svn commit: r1424699 - in /avro/trunk: CHANGES.txt doc/src/content/xdocs/spec.xml
From: cutting () apache ! org
Date: 2012-12-20 20:52:49
Message-ID: 20121220205249.AE10423888D2 () eris ! apache ! org
[Download RAW message or body]
Author: cutting
Date: Thu Dec 20 20:52:49 2012
New Revision: 1424699
URL: http://svn.apache.org/viewvc?rev=1424699&view=rev
Log:
AVRO-1008. Java: Improve support for forcing connection handshakes.
Modified:
avro/trunk/CHANGES.txt
avro/trunk/doc/src/content/xdocs/spec.xml
avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/Responder.java
avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestNettyServerConcurrentExecution.java
Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1424699&r1=1424698&r2=1424699&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Thu Dec 20 20:52:49 2012
@@ -12,6 +12,9 @@ Trunk (not yet released)
AVRO-1221. Java: Fix TestSaslDigestMd5 to pass on IBM JVM.
(Rodrigo Trujillo via cutting)
+ AVRO-1008. Java: Improve support for forcing connection
+ handshakes. (jbaldassari & cutting)
+
BUG FIXES
Avro 1.7.3 (6 December 2012)
Modified: avro/trunk/doc/src/content/xdocs/spec.xml
URL: http://svn.apache.org/viewvc/avro/trunk/doc/src/content/xdocs/spec.xml?rev=1424699&r1=1424698&r2=1424699&view=diff
==============================================================================
--- avro/trunk/doc/src/content/xdocs/spec.xml (original)
+++ avro/trunk/doc/src/content/xdocs/spec.xml Thu Dec 20 20:52:49 2012
@@ -1013,6 +1013,10 @@
declaration.</li>
</ul>
+ <p>When the empty string is used as a message name a server
+ should ignore the parameters and return an empty response. A
+ client may use this to ping a server or to perform a handshake
+ without sending a protocol message.</p>
<p>When a message is declared one-way and a stateful
connection has been established by a successful handshake
Modified: avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/Responder.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/Responder.java?rev=1424699&r1=1424698&r2=1424699&view=diff
==============================================================================
--- avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/Responder.java \
(original)
+++ avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/Responder.java Thu Dec \
20 20:52:49 2012 @@ -123,6 +123,8 @@ public abstract class Responder {
// read request using remote protocol specification
context.setRequestCallMeta(META_READER.read(null, in));
String messageName = in.readString(null).toString();
+ if (messageName.equals("")) // a handshake ping
+ return handshake;
Message rm = remote.getMessages().get(messageName);
if (rm == null)
throw new AvroRuntimeException("No such remote message: "+messageName);
Modified: avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestNettyServerConcurrentExecution.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/src/test/java/org/apache/av \
ro/ipc/TestNettyServerConcurrentExecution.java?rev=1424699&r1=1424698&r2=1424699&view=diff
==============================================================================
--- avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestNettyServerConcurrentExecution.java \
(original)
+++ avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestNettyServerConcurrentExecution.java \
Thu Dec 20 20:52:49 2012 @@ -93,11 +93,11 @@ public class TestNettyServerConcurrentEx
transceiver = new NettyTransceiver(new InetSocketAddress(
server.getPort()), TestNettyServer.CONNECT_TIMEOUT_MILLIS);
+
+ // 1. Create the RPC proxy, and establish the handshake:
final Simple.Callback simpleClient =
SpecificRequestor.getClient(Simple.Callback.class, transceiver);
-
- // 1. Execute the Client.add(int, int) RPC to establish the handshake:
- Assert.assertEquals(3, simpleClient.add(1, 2));
+ SpecificRequestor.getRemote(simpleClient); // force handshake
/*
* 2a. In a background thread, wait for the Client.hello("wait") call to be
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic