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 Threaded View
Pig >> mail # user >> PIG UDFs for parsing UserAgents


Copy link to this message
-
Re: PIG UDFs for parsing UserAgents
Hi Niels,

To write unit tests you could take a look at TestBuiltin.java which has a
tests for several UDFs -
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestBuiltin.java

Also, you can mock up input/ouput data using
http://pig.apache.org/docs/r0.11.1/api/org/apache/pig/builtin/mock/Storage.html.

On Sat, Apr 20, 2013 at 3:09 PM, Niels Basjes <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I created an addition to the ua-parser project (
> https://github.com/tobie/ua-parser ) so that the methods for parsing a
> useragent can be called as a UDF from Pig.
>
> https://github.com/nielsbasjes/ua-parser/tree/PIGSupport/pig
>
> One of the things I'm a bit worried about is that I have no idea on how to
> create a junit test for this.
> So I would really appreciate it if someone from the pig community could
> have a look at it before I submit a pull request.
>
> Thanks.
>
> --
> Best regards / Met vriendelijke groeten,
>
> Niels Basjes
>
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