[ 
https://issues.apache.org/jira/browse/PIG-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854260#action_12854260
 ] 

Dmitriy V. Ryaboy commented on PIG-1354:
----------------------------------------

Alan, I don't know that there are many methods that operate directly on byte 
arrays, but it would be easy to add if someone asks for it.

I will commit this (the test failure seems unrelated, see report below).

{code}
Error Message

Exception in constructor: testAggNoCombine 
(java.lang.ExceptionInInitializerError  at 
org.apache.pig.test.TestBuiltin.<init>(TestBuiltin.java:65)  at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  at 
java.lang.reflect.Constructor.newInstance(Constructor.java:513)  at 
junit.framework.TestSuite.createTest(TestSuite.java:61)  at 
junit.framework.TestSuite.addTestMethod(TestSuite.java:283)  at 
junit.framework.TestSuite.<init>(TestSuite.java:146)  at 
org.junit.internal.runners.JUnit38ClassRunner.<init>(JUnit38ClassRunner.java:67)
  at
org.junit.internal.builders.JUnit3Builder.runnerForClass(JUnit3Builder.java:14) 
 at 
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) 
 at 
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
  at 
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) 
 at 
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)  at 
junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:31)  at
junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:24)  at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  at 
java.lang.reflect.Constructor.newInstance(Constructor.java:513)  at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:386)
  at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
  at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
 

Caused by: java.lang.IllegalArgumentException: port out of range:-1  at 
java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)  at 
org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:250)
  at 
org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:202)  
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>
(NameNode.java:279)  at 
org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:956)
  at 
org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:275)  at 
org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:119)  
at 
org.apache.pig.test.MiniCluster.setupMiniDfsAndMrClusters(MiniCluster.java:57)  
at org.apache.pig.test.MiniCluster.<init>(MiniCluster.java:47)  at 
org.apache.pig.test.MiniCluster.<clinit>(MiniCluster.java:44)  ... 23 more )


Stacktrace

junit.framework.AssertionFailedError: Exception in constructor: 
testAggNoCombine (java.lang.ExceptionInInitializerError
        at org.apache.pig.test.TestBuiltin.<init>(TestBuiltin.java:65)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Caused by: java.lang.IllegalArgumentException: port out of range:-1
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:250)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:202)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:279)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:956)
        at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:275)
        at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:119)
        at 
org.apache.pig.test.MiniCluster.setupMiniDfsAndMrClusters(MiniCluster.java:57)
        at org.apache.pig.test.MiniCluster.<init>(MiniCluster.java:47)
        at org.apache.pig.test.MiniCluster.<clinit>(MiniCluster.java:44)
)
{code}

> UDFs for dynamic invocation of simple Java methods
> --------------------------------------------------
>
>                 Key: PIG-1354
>                 URL: https://issues.apache.org/jira/browse/PIG-1354
>             Project: Pig
>          Issue Type: New Feature
>    Affects Versions: 0.8.0
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>             Fix For: 0.8.0
>
>         Attachments: PIG-1354.patch, PIG-1354.patch, PIG-1354.patch
>
>
> The need to create wrapper UDFs for simple Java functions creates unnecessary 
> work for Pig users, slows down the development process, and produces a lot of 
> trivial classes. We can use Java's reflection to allow invoking a number of 
> methods on the fly, dynamically, by creating a generic UDF to accomplish this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to