You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2009/07/01 18:37:47 UTC
[jira] Commented: (AVRO-66) add RPC per-call metadata and a plugin
API to access it
[ https://issues.apache.org/jira/browse/AVRO-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726125#action_12726125 ]
Doug Cutting commented on AVRO-66:
----------------------------------
A simpler and more complete way to implement this might be to:
{code}
private static final Schema META = Schema.createMap(Schema.create(Schema.Type.BYTES));
private static final GenericDatumReader META_READER = new GenericDatumReader(META);
private static final GenericDatumWriter META_WRITER = new GenericDatumWriter(META);
...
Map<String,ByteBuffer> meta = (Map<String,ByteBuffer>)META_READER.read(null, in);
...
META_WRITER.write(meta, out);
{code}
Also, it would be good to have a Python impl committed alongside this, so that interop tests still pass. This could probably do something similar to the above. Do you think you'll be able to do this today?
> add RPC per-call metadata and a plugin API to access it
> -------------------------------------------------------
>
> Key: AVRO-66
> URL: https://issues.apache.org/jira/browse/AVRO-66
> Project: Avro
> Issue Type: New Feature
> Components: c, c++, java, python, spec
> Reporter: George Porter
> Attachments: AVRO-66.patch
>
>
> The RPC specification should support per-call metadata maps. Requestor and Responder should have methods that access this per-call metadata.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (AVRO-66) add RPC per-call metadata and a plugin
API to access it
Posted by George Porter <Ge...@Sun.COM>.
On the Java side, yes. I'm not as familiiar with Python, but will
give it a try.
-George
On Jul 1, 2009, at 9:37 AM, Doug Cutting (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/AVRO-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726125
> #action_12726125 ]
>
> Doug Cutting commented on AVRO-66:
> ----------------------------------
>
> A simpler and more complete way to implement this might be to:
>
> {code}
> private static final Schema META =
> Schema.createMap(Schema.create(Schema.Type.BYTES));
> private static final GenericDatumReader META_READER = new
> GenericDatumReader(META);
> private static final GenericDatumWriter META_WRITER = new
> GenericDatumWriter(META);
> ...
> Map<String,ByteBuffer> meta =
> (Map<String,ByteBuffer>)META_READER.read(null, in);
> ...
> META_WRITER.write(meta, out);
> {code}
>
> Also, it would be good to have a Python impl committed alongside
> this, so that interop tests still pass. This could probably do
> something similar to the above. Do you think you'll be able to do
> this today?
>
>> add RPC per-call metadata and a plugin API to access it
>> -------------------------------------------------------
>>
>> Key: AVRO-66
>> URL: https://issues.apache.org/jira/browse/AVRO-66
>> Project: Avro
>> Issue Type: New Feature
>> Components: c, c++, java, python, spec
>> Reporter: George Porter
>> Attachments: AVRO-66.patch
>>
>>
>> The RPC specification should support per-call metadata maps.
>> Requestor and Responder should have methods that access this per-
>> call metadata.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
[George.Porter@Sun.com][+1.858.320.9932]
[Principal Investigator][Project BigData][Sun Labs]
[twitter.com/SunLabsBigData][blogs.sun.com/george]