Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Call Pig from Java


+
Wenhao Xu 2010-08-05, 03:56
+
Harsh J 2010-08-05, 04:01
Copy link to this message
-
Re: Call Pig from Java
Sorry, forgot the API link:
http://hadoop.apache.org/pig/docs/r0.7.0/api/org/apache/pig/PigServer.html

On Thu, Aug 5, 2010 at 9:31 AM, Harsh J <[EMAIL PROTECTED]> wrote:
> You need to use the class PigServer.
>
> PigServer pigServer = new PigServer("mapreduce"); // Or "local" for local mode
> pigServer.registerQuery("A = LOAD ...");
> (...) // Your statements here.
> pigServer.store("A", "filename");
>
> On Thu, Aug 5, 2010 at 9:26 AM, Wenhao Xu <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>   I am new to pig. I am wondering is there any recommended way to call Pig
>> code from Java?
>>   Is there any Java interface which can be called directly from Java and
>> makes them work smoothly? It seems each keyword (filter, group, cogrape,
>> generate) and data types in Pig can have a counterpart in Java by using
>> Class, interface and data type. Is these Java interface available to Java
>> programmers to use? If not, why not?
>>    Thanks very much for help!
>>
>> regards,
>> Wenhao
>>
>> --
>> ~_~
>>
>
>
>
> --
> Harsh J
> www.harshj.com
>

--
Harsh J
www.harshj.com
+
Dmitriy Lyubimov 2010-08-05, 04:19
+
Vincent Barat 2010-08-05, 06:08
+
Wenhao Xu 2010-08-05, 04:13
+
Dmitriy Lyubimov 2010-08-05, 04:21
+
Jeff Zhang 2010-08-05, 04:25
+
Gerrit van Vuuren 2010-08-05, 06:27
+
Dmitriy Lyubimov 2010-08-05, 17:14
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB