You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aurora.apache.org by Ahmed Aley <ah...@cs.umu.se> on 2014/06/18 22:46:52 UTC

Help with thrift's TFileTransport

Hi,


Mark suggested that I ask here for help too. I am trying to use
TFileTransport between Java and Python to wrap Suro's Java logging client.
While I can use TJSON and TBinary in Python with no troubles (for both
writing to a file and reading from it), it has been problematic to read the
file contents using the Java TJSON library. I have asked for help on
StackOverFlow and got a suggestion that it seems to be some sort of a bug.
I would highly appreciate if someone familiar with thrift could help me on
this one. Full details in thrift's JIRA ticket I started.
https://issues.apache.org/jira/browse/THRIFT-2582

Best,
--Ahmed

Re: Help with thrift's TFileTransport

Posted by Ahmed Aley <ah...@cs.umu.se>.
Thanks bill !
I had already started building the wrapper without using thrift before i
got your email. A couple of days ago Jens Geyer also told me where the
problem was. I should have been using another class instead of the one I
used.

"

According to the docs in the wiki
<http://people.apache.org/%7Ejfarrell/thrift/0.7.0/javadoc/org/apache/thrift/transport/TFileTransport.html>,
the Java and C++ TFileTransport is actually a TFramedFileTransport.

In contrast, the Python TFileObjectTransport used is just a simple wrapper.
The Java counterpart is TSimpleFileTransport."
I am already past that any way since I had already started with
implementing another solution which is working fine now.
Thanks for your help!

--Ahmed


On Thu, Jun 19, 2014 at 9:36 PM, Bill Farner <wf...@apache.org> wrote:

> Disclaimer: i'm familiar with thrift, but not so much with TFileTransport.
>
> This SO question seems potentially relevant (specifically the bit about
> reading chunks by numeric ID):
>
> http://stackoverflow.com/questions/22580930/example-on-how-to-use-tfiletransport-in-thrift-client-server
>
> Can you take a stab at setting up a github repo that reproduces the
> behavior?  That will make it easier for us to swoop in and poke at it.
>
>
> -=Bill
>
>
> On Wed, Jun 18, 2014 at 1:46 PM, Ahmed Aley <ah...@cs.umu.se> wrote:
>
> > Hi,
> >
> >
> > Mark suggested that I ask here for help too. I am trying to use
> > TFileTransport between Java and Python to wrap Suro's Java logging
> client.
> > While I can use TJSON and TBinary in Python with no troubles (for both
> > writing to a file and reading from it), it has been problematic to read
> the
> > file contents using the Java TJSON library. I have asked for help on
> > StackOverFlow and got a suggestion that it seems to be some sort of a
> bug.
> > I would highly appreciate if someone familiar with thrift could help me
> on
> > this one. Full details in thrift's JIRA ticket I started.
> > https://issues.apache.org/jira/browse/THRIFT-2582
> >
> > Best,
> > --Ahmed
> >
>

Re: Help with thrift's TFileTransport

Posted by Bill Farner <wf...@apache.org>.
Disclaimer: i'm familiar with thrift, but not so much with TFileTransport.

This SO question seems potentially relevant (specifically the bit about
reading chunks by numeric ID):
http://stackoverflow.com/questions/22580930/example-on-how-to-use-tfiletransport-in-thrift-client-server

Can you take a stab at setting up a github repo that reproduces the
behavior?  That will make it easier for us to swoop in and poke at it.


-=Bill


On Wed, Jun 18, 2014 at 1:46 PM, Ahmed Aley <ah...@cs.umu.se> wrote:

> Hi,
>
>
> Mark suggested that I ask here for help too. I am trying to use
> TFileTransport between Java and Python to wrap Suro's Java logging client.
> While I can use TJSON and TBinary in Python with no troubles (for both
> writing to a file and reading from it), it has been problematic to read the
> file contents using the Java TJSON library. I have asked for help on
> StackOverFlow and got a suggestion that it seems to be some sort of a bug.
> I would highly appreciate if someone familiar with thrift could help me on
> this one. Full details in thrift's JIRA ticket I started.
> https://issues.apache.org/jira/browse/THRIFT-2582
>
> Best,
> --Ahmed
>