One approach is to separate your code from the pig wrapper. That way you only need to unit test your business logic.
An example would be something like

public class wrapperUdf extends EvalFunc {
 public Integer exec() {
  foo.exec()
 }

 public List<String> getCachedFiles {
 }
}

public class foo {
 public Integer exec() {
 }
}


You can write unit test just again foo and leave UDF testing to component/functional testing.

David

On 10 Feb 2014, at 3:08, [email protected] wrote:

Is there a common way of writing a Unit Test around a UDF that makes use of the Distributed Cache? ie UDF that implements the getCacheFiles() function.

Thanks,
Lei




[email protected]

Reply via email to