avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: bytes limit on rpc calls
Date Thu, 07 Apr 2011 17:22:50 GMT
Enrico,

This looks like it could be a bug.  What version of Avro are you using?

Can you please file a Jira issue for this?

Thanks,

Doug

On 04/07/2011 03:04 AM, Enrico Saviano wrote:
> Hello,
> 
> I'm using Avro RPC software to send messages, via
> SaslSocketServer/Transciever, and the Reflect method.
> 
> The problem I found is that I cannot send more than 49149 bytes on a
> single RPC call, 1 byte more and the software will lock.
> 
> Below, a class I wrote that replicates the issue.
> 
> Is it a bug, a limitation, or am I doing something wrong?
> 
> Thank you,
> Enrico.
> 
> 
> public class PoC {
>     private final static InetSocketAddress addr =
>         new InetSocketAddress("127.0.0.2", 12345);
>     
>     public interface ProtoInterface { int test(byte[] b); }
>     
>     public static void main (String[] args) {
>         try {
>             SaslSocketServer s = new SaslSocketServer(
>                     new ReflectResponder(ProtoInterface.class, new
> ProtoInterface() {
>                         public int test(byte[] b) { return b.length; }
> }), addr);
>             s.start();
>             SaslSocketTransceiver client = new SaslSocketTransceiver(addr);
>             ProtoInterface proxy = (ProtoInterface)
> ReflectRequestor.getClient(
>                     ProtoInterface.class, client);
> 
>             int res = proxy.test(new byte[49149]);
>             System.out.println("BYTE ARRAY LENGTH: "+res);
>             res = proxy.test(new byte[49150]);
>             System.out.println("NEVER REACH THIS POINT: "+res);
>             client.close();
>            
>             try { System.out.print("Shutting down server... ");
> s.notify();    }
>             catch (IllegalMonitorStateException e) { }   
>         }
>         catch (Exception e) { e.printStackTrace(); }
>     }
> }

Mime
View raw message