[jira] Commented: (HIVE-1265) Function Registry should should auto-detect UDFs from UDF Description

2010-05-28 Thread Ashish Thusoo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12872993#action_12872993
 ] 

Ashish Thusoo commented on HIVE-1265:
-

Can you explain more what you mean by it is picking up the test class path? 
When you get the classes for a package, it should return you all the classes in 
that package irrespective of the location. 

+1 to the general approach here.

 Function Registry should should auto-detect UDFs  from UDF Description
 --

 Key: HIVE-1265
 URL: https://issues.apache.org/jira/browse/HIVE-1265
 Project: Hadoop Hive
  Issue Type: Improvement
Reporter: Edward Capriolo
Assignee: Edward Capriolo
 Attachments: hive-1265-patch.diff


 We should be able to register functions dynamically.

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



[jira] Commented: (HIVE-1265) Function Registry should should auto-detect UDFs from UDF Description

2010-05-28 Thread Edward Capriolo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12872996#action_12872996
 ] 

Edward Capriolo commented on HIVE-1265:
---

{noformat}
 public static ListClass getClassesForPackage(String packageName, Class 
classType){
+ListClass matchingClasses = new ArrayListClass();
+File directory = null;
+System.out.println(packageName.replace('.', File.separatorChar));
+URL u = Thread.currentThread().getContextClassLoader()
+//URL u = new Object().getClass().c
+.getResource(packageName.replace('.', File.separatorChar));
{noformat}

It seems like this section of code only picks up classes in 
ql/test/org.apache.hadoop.hive.ql.udf. This must have something to do with 
classloaders/threads/ and getResource(). It seems like getResource is unaware 
that two folders could be responsible for the same resource. Or I have to find 
a better way to do this.

 Function Registry should should auto-detect UDFs  from UDF Description
 --

 Key: HIVE-1265
 URL: https://issues.apache.org/jira/browse/HIVE-1265
 Project: Hadoop Hive
  Issue Type: Improvement
Reporter: Edward Capriolo
Assignee: Edward Capriolo
 Attachments: hive-1265-patch.diff


 We should be able to register functions dynamically.

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