You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Shashikant K <sh...@gmail.com> on 2016/02/02 15:52:19 UTC

Re: Pig script to load C++ library

Hello,

How can I read the return values from the external libraries back in PIG
script again? I tried to find a solution but unable to find references.

Please help.


On 14 December 2015 at 12:27, inelu nagamallikarjuna <ma...@gmail.com>
wrote:

> Hi Shashikant.
>
> Pig supports streaming with help of *stream *operator. This allows invoking
> any external executables i.e., perl, python, c++, php etc... inside your
> pig scripts.
>
> Thanks
> Naga
>
> On Mon, Dec 14, 2015 at 12:18 PM, Shashikant K <
> shashikant.kulkarni76@gmail.com> wrote:
>
> > Hi All,
> >
> > Here is what I am trying to do.
> >
> >    - I have a C++ library which I use to load from PHP script using PHP's
> >    exec() function. It works perfect. PHP sends the input parameter and
> > gets
> >    the result in output parameter.
> >    - I want to make use of the same C++ library in my Pig Script and
> >    perform the same operation. Is there any way to do this?
> >    - Can you point me to some documentation, because I tried to find it.
> >
> >
> > Thanks in advance.
> >
> > Regards,
> > Shashikant
> >
>
>
>
> --
> Thanks and Regards
> Nagamallikarjuna
>

Re: Pig script to load C++ library

Posted by Shashikant K <sh...@gmail.com>.
@Divya: The link is not useful for me. Here is my use case
1. I have a PIG script. In this script I want to invoke a C++ library which
is external to PIG script. I do this by using STREAM operator.
2. Now when I invoke the C++ lib, it does some processing with the inputs
provided and returns array of values.
3. I want to get that returned array of values back in PIG script from
where I invoked the C++ lib.

Is this possible?

On 3 February 2016 at 07:55, Divya Gehlot <di...@gmail.com> wrote:

> @Shashikant -Check the  link
> <http://codereview.stackexchange.com/questions/91048/c-pig-latin-program
> >..
>
> On 2 February 2016 at 22:52, Shashikant K <shashikant.kulkarni76@gmail.com
> >
> wrote:
>
> > Hello,
> >
> > How can I read the return values from the external libraries back in PIG
> > script again? I tried to find a solution but unable to find references.
> >
> > Please help.
> >
> >
> > On 14 December 2015 at 12:27, inelu nagamallikarjuna <
> malli3131@gmail.com>
> > wrote:
> >
> > > Hi Shashikant.
> > >
> > > Pig supports streaming with help of *stream *operator. This allows
> > invoking
> > > any external executables i.e., perl, python, c++, php etc... inside
> your
> > > pig scripts.
> > >
> > > Thanks
> > > Naga
> > >
> > > On Mon, Dec 14, 2015 at 12:18 PM, Shashikant K <
> > > shashikant.kulkarni76@gmail.com> wrote:
> > >
> > > > Hi All,
> > > >
> > > > Here is what I am trying to do.
> > > >
> > > >    - I have a C++ library which I use to load from PHP script using
> > PHP's
> > > >    exec() function. It works perfect. PHP sends the input parameter
> and
> > > > gets
> > > >    the result in output parameter.
> > > >    - I want to make use of the same C++ library in my Pig Script and
> > > >    perform the same operation. Is there any way to do this?
> > > >    - Can you point me to some documentation, because I tried to find
> > it.
> > > >
> > > >
> > > > Thanks in advance.
> > > >
> > > > Regards,
> > > > Shashikant
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks and Regards
> > > Nagamallikarjuna
> > >
> >
>

Re: Pig script to load C++ library

Posted by Divya Gehlot <di...@gmail.com>.
@Shashikant -Check the  link
<http://codereview.stackexchange.com/questions/91048/c-pig-latin-program>..

On 2 February 2016 at 22:52, Shashikant K <sh...@gmail.com>
wrote:

> Hello,
>
> How can I read the return values from the external libraries back in PIG
> script again? I tried to find a solution but unable to find references.
>
> Please help.
>
>
> On 14 December 2015 at 12:27, inelu nagamallikarjuna <ma...@gmail.com>
> wrote:
>
> > Hi Shashikant.
> >
> > Pig supports streaming with help of *stream *operator. This allows
> invoking
> > any external executables i.e., perl, python, c++, php etc... inside your
> > pig scripts.
> >
> > Thanks
> > Naga
> >
> > On Mon, Dec 14, 2015 at 12:18 PM, Shashikant K <
> > shashikant.kulkarni76@gmail.com> wrote:
> >
> > > Hi All,
> > >
> > > Here is what I am trying to do.
> > >
> > >    - I have a C++ library which I use to load from PHP script using
> PHP's
> > >    exec() function. It works perfect. PHP sends the input parameter and
> > > gets
> > >    the result in output parameter.
> > >    - I want to make use of the same C++ library in my Pig Script and
> > >    perform the same operation. Is there any way to do this?
> > >    - Can you point me to some documentation, because I tried to find
> it.
> > >
> > >
> > > Thanks in advance.
> > >
> > > Regards,
> > > Shashikant
> > >
> >
> >
> >
> > --
> > Thanks and Regards
> > Nagamallikarjuna
> >
>