You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Philip Zeyliger (JIRA)" <ji...@apache.org> on 2009/12/29 22:03:29 UTC

[jira] Created: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Tool (for "avroj") to send and receive a single RPC from the commandline
------------------------------------------------------------------------

                 Key: AVRO-267
                 URL: https://issues.apache.org/jira/browse/AVRO-267
             Project: Avro
          Issue Type: New Feature
          Components: java
            Reporter: Philip Zeyliger
            Assignee: Philip Zeyliger


Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795643#action_12795643 ] 

Doug Cutting commented on AVRO-267:
-----------------------------------

Overall this looks good.  Some comments:
 - the new public methods in JsonDecoder need javadoc.
 - the "Expected two arguments" message expects four.
 - the checking of the message name is redundant with checks Requestor and Responder perform, no?


> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>         Attachments: AVRO-267.patch.txt, AVRO-267.patch.txt, AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Zeyliger updated AVRO-267:
---------------------------------

    Attachment: AVRO-267.patch.txt

Updating post AVRO-243 (return values in tools).  This still depends on AVRO-245.

> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>         Attachments: AVRO-267.patch.txt, AVRO-267.patch.txt, AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Zeyliger updated AVRO-267:
---------------------------------

    Attachment: AVRO-267.patch.txt

Attaching a patch that implements rpcsend and rpcreceive.

One questionable thing I'll point out is that I extended JsonDecoder to take a String (in addition to an InputStream).  Since command-line arguments end up as strings, I wanted to avoid converting a string to a byte array in order to make an InputStream.  Jackson has lots of constructors, Reader and String amongst them.  What do you think?

I thought about the server accepting many RPCs (not just one), but I decided against it.  Partially because of netcat's model, and partially because the server has to return something, and "null" isn't always an option (since it may not be in the schema).  Returning an exception is always possible, but since these are essentially tools for facilitating testing of servers I went for one message.

Finally, applying this patch depends very slightly (Main and Util classes) on AVRO-245.

-- Philip

> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>         Attachments: AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Zeyliger updated AVRO-267:
---------------------------------

    Attachment: AVRO-267.patch.txt

Thanks for the review!

bq. the new public methods in JsonDecoder need javadoc.

Done.

bq. the "Expected two arguments" message expects four.

Whoops; fixed.

bq. the checking of the message name is redundant with checks Requestor and Responder perform, no?

I think I have to do the check to avoid throwing NPE when I convert the data from JSON into a datum.

> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>         Attachments: AVRO-267.patch.txt, AVRO-267.patch.txt, AVRO-267.patch.txt, AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Zeyliger updated AVRO-267:
---------------------------------

    Attachment: AVRO-267.patch.txt

Updating patch to get rid of some unused imports and a tab character (the horror!).  Thanks checkstyle.

> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>         Attachments: AVRO-267.patch.txt, AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Zeyliger updated AVRO-267:
---------------------------------

    Status: Patch Available  (was: Open)

> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>         Attachments: AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-267:
------------------------------

    Status: Open  (was: Patch Available)

This needs to be updated post AVRO-263.

> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>         Attachments: AVRO-267.patch.txt, AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AVRO-267) Tool (for "avroj") to send and receive a single RPC from the commandline

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting resolved AVRO-267.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0
     Hadoop Flags: [Reviewed]

I committed this with the following changes:
 - skip tools in first java compilation pass, as they now depend on specific compiler
 - remove dependency on logger from rpcreceive tool, since a logging backend is not included in avroj.

It appears that 'ant clean test-java test-avroj' was not performed before posting this patch.



> Tool (for "avroj") to send and receive a single RPC from the commandline
> ------------------------------------------------------------------------
>
>                 Key: AVRO-267
>                 URL: https://issues.apache.org/jira/browse/AVRO-267
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>             Fix For: 1.3.0
>
>         Attachments: AVRO-267.patch.txt, AVRO-267.patch.txt, AVRO-267.patch.txt, AVRO-267.patch.txt
>
>
> Vaguely similar to "netcat" and "netcat -l", "avroj rpcreceive" and "avroj rpcsend" would send receive or send a single RPC (using the HTTP transport).  The former is required to have a response pre-determined and echoes the request; the latter echoes any response it receives.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.