Re: Reading Java byte[] data stream over standard input

2008-05-19 Thread sapsi
I should also mention that for some reason there are several binay values popping in between for some reason. This behavior (for the inputr stream) is not expected Now, the incoming data is binary(though mine is actually merely ascii text) but the output is not what is expected. I expect for

Re: Reading Java byte[] data stream over standard input

2008-05-19 Thread Marc 'BlackJack' Rintsch
On Sun, 18 May 2008 22:11:33 -0700, sapsi wrote: I am using HadoopStreaming using a BinaryInputStream. What this basically does is send a stream of bytes ( the java type is : private byte[] bytes) to my python program. I have done a test like this, while 1: x=sys.stdin.read(100)

Re: Reading Java byte[] data stream over standard input

2008-05-19 Thread sapsi
Yes, that could be the case. Browsing through hadoop's source, i see stdin in the above code is reading from piped Java DataOutputStream. I read of a libray on the net Javadata.py that reads this but it has disappeared. What is involved in reading from a Dataoutputstream? Thank you Sapsi --

Re: Reading Java byte[] data stream over standard input

2008-05-19 Thread Marc 'BlackJack' Rintsch
On Mon, 19 May 2008 00:14:25 -0700, sapsi wrote: Yes, that could be the case. Browsing through hadoop's source, i see stdin in the above code is reading from piped Java DataOutputStream. I read of a libray on the net Javadata.py that reads this but it has disappeared. What is involved in

Re: Reading Java byte[] data stream over standard input

2008-05-19 Thread Giles Brown
On 19 May, 06:11, sapsi [EMAIL PROTECTED] wrote: Hello, I am using HadoopStreaming using a BinaryInputStream. What this basically does is send a stream of bytes ( the java type is : private byte[] bytes) to my python program. I have done a test like this, while 1:

Re: Reading Java byte[] data stream over standard input

2008-05-19 Thread John Machin
sapsi wrote: I should also mention that for some reason there are several binay values popping in between for some reason. This behavior (for the inputr stream) is not expected Now, the incoming data is binary(though mine is actually merely ascii text) but the output is not what is expected.

Reading Java byte[] data stream over standard input

2008-05-18 Thread sapsi
Hello, I am using HadoopStreaming using a BinaryInputStream. What this basically does is send a stream of bytes ( the java type is : private byte[] bytes) to my python program. I have done a test like this, while 1: x=sys.stdin.read(100) if x: print x