You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by ZhangBing Lin <li...@zte.com.cn> on 2017/06/22 03:18:28 UTC

Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/
-----------------------------------------------------------

(Updated 六月 22, 2017, 3:18 a.m.)


Review request for hive, cheng xu and Xuefu Zhang.


Summary (updated)
-----------------

HIVE-16929 User-defined UDF functions can be registered as invariant functions


Bugs: HIVE-16929
    https://issues.apache.org/jira/browse/HIVE-16929


Repository: hive-git


Description
-------

Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
Such as,
<property>
  <name>hive.aux.udf.package.name.list</name>
  <value>com.sample.udf,com.test.udf</value>
</property>
Instructions:
   1, upload your jar file to $ HIVE_HOME/auxlib
   2, configure your UDF function corresponding to the package to the following configuration parameters
   <property>
        <name>hive.aux.udf.package.name.list</name>
        <value>com.sample.udf</value>
   </property>
  
   3, the configuration items need to be placed in the hive-site.xml file
   4, restart the Hive service to take effect


Diffs
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
  ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 


Diff: https://reviews.apache.org/r/60355/diff/1/


Testing
-------


Thanks,

ZhangBing Lin


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.

> On 六月 28, 2017, 10:49 a.m., Barna Zsombor Klara wrote:
> > Sorry for getting back this late and thank you for the updates. I don't want to be too nitpicky but I did have another comment about rewording a log line, sorry.
> > As for testing, you do have jars on the classpath during testing. So for example you can be pretty sure that the junit jar will be on your classpath somewhere, and you could write tests against ClassUtil using the junit packages.
> > 
> > But the patch LGTM.

Thank you for your suggest,I will try to write a unit test case based on your advice.


> On 六月 28, 2017, 10:49 a.m., Barna Zsombor Klara wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java
> > Lines 85 (patched)
> > <https://reviews.apache.org/r/60355/diff/4/?file=1760292#file1760292line85>
> >
> >     Nit:
> >     I think what you meant should be one of the following:
> >     - Exception occured while executing getJarFile
> >     - Exception occured during the execution of getJarFile
> >     - getJarFile encountered an exception
> >     
> >     Same on line 90.

Thank you for your review,I will modify it


- ZhangBing


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review179085
-----------------------------------------------------------


On 六月 23, 2017, 3:56 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated 六月 23, 2017, 3:56 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/4/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.

> On 六月 28, 2017, 10:49 a.m., Barna Zsombor Klara wrote:
> > Sorry for getting back this late and thank you for the updates. I don't want to be too nitpicky but I did have another comment about rewording a log line, sorry.
> > As for testing, you do have jars on the classpath during testing. So for example you can be pretty sure that the junit jar will be on your classpath somewhere, and you could write tests against ClassUtil using the junit packages.
> > 
> > But the patch LGTM.
> 
> ZhangBing Lin wrote:
>     Thank you for your suggest,I will try to write a unit test case based on your advice.

Resubmit a new patch,Patch add the following:
1.add two unit tests for ClassUtil and UDFResister
2.Adjust the custom function registration function to the end of the registration, to prevent the same name function to register when the system function can not be covered by abnormal
3.Fix the contents of the log


- ZhangBing


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review179085
-----------------------------------------------------------


On 六月 29, 2017, 6:37 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated 六月 29, 2017, 6:37 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/util/TestClassUtil.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/util/TestUDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/5/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by Barna Zsombor Klara <zs...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review179085
-----------------------------------------------------------



Sorry for getting back this late and thank you for the updates. I don't want to be too nitpicky but I did have another comment about rewording a log line, sorry.
As for testing, you do have jars on the classpath during testing. So for example you can be pretty sure that the junit jar will be on your classpath somewhere, and you could write tests against ClassUtil using the junit packages.

But the patch LGTM.


ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java
Lines 85 (patched)
<https://reviews.apache.org/r/60355/#comment253520>

    Nit:
    I think what you meant should be one of the following:
    - Exception occured while executing getJarFile
    - Exception occured during the execution of getJarFile
    - getJarFile encountered an exception
    
    Same on line 90.


- Barna Zsombor Klara


On June 23, 2017, 3:56 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated June 23, 2017, 3:56 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/4/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/
-----------------------------------------------------------

(Updated 六月 29, 2017, 6:37 a.m.)


Review request for hive, cheng xu and Xuefu Zhang.


Bugs: HIVE-16929
    https://issues.apache.org/jira/browse/HIVE-16929


Repository: hive-git


Description
-------

Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
Such as,
<property>
  <name>hive.aux.udf.package.name.list</name>
  <value>com.sample.udf,com.test.udf</value>
</property>
Instructions:
   1, upload your jar file to $ HIVE_HOME/auxlib
   2, configure your UDF function corresponding to the package to the following configuration parameters
   <property>
        <name>hive.aux.udf.package.name.list</name>
        <value>com.sample.udf</value>
   </property>
  
   3, the configuration items need to be placed in the hive-site.xml file
   4, restart the Hive service to take effect


Diffs (updated)
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
  ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
  ql/src/test/org/apache/hadoop/hive/ql/util/TestClassUtil.java PRE-CREATION 
  ql/src/test/org/apache/hadoop/hive/ql/util/TestUDFRegister.java PRE-CREATION 


Diff: https://reviews.apache.org/r/60355/diff/5/

Changes: https://reviews.apache.org/r/60355/diff/4-5/


Testing
-------


Thanks,

ZhangBing Lin


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/
-----------------------------------------------------------

(Updated 六月 23, 2017, 3:56 a.m.)


Review request for hive, cheng xu and Xuefu Zhang.


Bugs: HIVE-16929
    https://issues.apache.org/jira/browse/HIVE-16929


Repository: hive-git


Description
-------

Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
Such as,
<property>
  <name>hive.aux.udf.package.name.list</name>
  <value>com.sample.udf,com.test.udf</value>
</property>
Instructions:
   1, upload your jar file to $ HIVE_HOME/auxlib
   2, configure your UDF function corresponding to the package to the following configuration parameters
   <property>
        <name>hive.aux.udf.package.name.list</name>
        <value>com.sample.udf</value>
   </property>
  
   3, the configuration items need to be placed in the hive-site.xml file
   4, restart the Hive service to take effect


Diffs (updated)
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
  ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 


Diff: https://reviews.apache.org/r/60355/diff/4/

Changes: https://reviews.apache.org/r/60355/diff/3-4/


Testing
-------


Thanks,

ZhangBing Lin


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/
-----------------------------------------------------------

(Updated 六月 23, 2017, 3:51 a.m.)


Review request for hive, cheng xu and Xuefu Zhang.


Bugs: HIVE-16929
    https://issues.apache.org/jira/browse/HIVE-16929


Repository: hive-git


Description
-------

Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
Such as,
<property>
  <name>hive.aux.udf.package.name.list</name>
  <value>com.sample.udf,com.test.udf</value>
</property>
Instructions:
   1, upload your jar file to $ HIVE_HOME/auxlib
   2, configure your UDF function corresponding to the package to the following configuration parameters
   <property>
        <name>hive.aux.udf.package.name.list</name>
        <value>com.sample.udf</value>
   </property>
  
   3, the configuration items need to be placed in the hive-site.xml file
   4, restart the Hive service to take effect


Diffs (updated)
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
  ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 


Diff: https://reviews.apache.org/r/60355/diff/3/

Changes: https://reviews.apache.org/r/60355/diff/2-3/


Testing
-------


Thanks,

ZhangBing Lin


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/
-----------------------------------------------------------

(Updated 六月 23, 2017, 3:13 a.m.)


Review request for hive, cheng xu and Xuefu Zhang.


Bugs: HIVE-16929
    https://issues.apache.org/jira/browse/HIVE-16929


Repository: hive-git


Description
-------

Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
Such as,
<property>
  <name>hive.aux.udf.package.name.list</name>
  <value>com.sample.udf,com.test.udf</value>
</property>
Instructions:
   1, upload your jar file to $ HIVE_HOME/auxlib
   2, configure your UDF function corresponding to the package to the following configuration parameters
   <property>
        <name>hive.aux.udf.package.name.list</name>
        <value>com.sample.udf</value>
   </property>
  
   3, the configuration items need to be placed in the hive-site.xml file
   4, restart the Hive service to take effect


Diffs (updated)
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
  ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 


Diff: https://reviews.apache.org/r/60355/diff/2/

Changes: https://reviews.apache.org/r/60355/diff/1-2/


Testing
-------


Thanks,

ZhangBing Lin


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.

> On 六月 22, 2017, 8:17 a.m., Barna Zsombor Klara wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java
> > Lines 110 (patched)
> > <https://reviews.apache.org/r/60355/diff/1/?file=1758013#file1758013line110>
> >
> >     Can we log this out instead of just writing to the err stream? Same on line 117,122 and 149.
> 
> ZhangBing Lin wrote:
>     I had log this out instead of just writing to the err stream

I had change it,But Issues list still exist


- ZhangBing


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review178639
-----------------------------------------------------------


On 六月 23, 2017, 3:13 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated 六月 23, 2017, 3:13 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.

> On 六月 22, 2017, 8:17 a.m., Barna Zsombor Klara wrote:
> > Thank you for the patch ZhangBing Lin. I only had a few minor comments and nits.
> > Since you are adding several utility methods, do you think it would be possible to add a few unit tests?
> > Thanks!

Thank you for your review,I will modify it with your suggest


- ZhangBing


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review178639
-----------------------------------------------------------


On 六月 22, 2017, 3:18 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated 六月 22, 2017, 3:18 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.

> On 六月 22, 2017, 8:17 a.m., Barna Zsombor Klara wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java
> > Lines 110 (patched)
> > <https://reviews.apache.org/r/60355/diff/1/?file=1758013#file1758013line110>
> >
> >     Can we log this out instead of just writing to the err stream? Same on line 117,122 and 149.

I had log this out instead of just writing to the err stream


- ZhangBing


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review178639
-----------------------------------------------------------


On 六月 23, 2017, 3:13 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated 六月 23, 2017, 3:13 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by ZhangBing Lin <li...@zte.com.cn>.

> On 六月 22, 2017, 8:17 a.m., Barna Zsombor Klara wrote:
> > Thank you for the patch ZhangBing Lin. I only had a few minor comments and nits.
> > Since you are adding several utility methods, do you think it would be possible to add a few unit tests?
> > Thanks!
> 
> ZhangBing Lin wrote:
>     Thank you for your review,I will modify it with your suggest

Thank you for your review,the unit tests need a jar file,How can I write these unit tests with no jar file?


> On 六月 22, 2017, 8:17 a.m., Barna Zsombor Klara wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java
> > Lines 40 (patched)
> > <https://reviews.apache.org/r/60355/diff/1/?file=1758014#file1758014line40>
> >
> >     nit: Should this be a warning instead of info?

I had use warn instead info


- ZhangBing


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review178639
-----------------------------------------------------------


On 六月 23, 2017, 3:13 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated 六月 23, 2017, 3:13 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>


Re: Review Request 60355: HIVE-16929 User-defined UDF functions can be registered as invariant functions

Posted by Barna Zsombor Klara <zs...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60355/#review178639
-----------------------------------------------------------



Thank you for the patch ZhangBing Lin. I only had a few minor comments and nits.
Since you are adding several utility methods, do you think it would be possible to add a few unit tests?
Thanks!


common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Lines 3475 (patched)
<https://reviews.apache.org/r/60355/#comment252787>

    nit: packagename*s*. I think you meant to use the plural.



ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
Line 22 (original), 22 (patched)
<https://reviews.apache.org/r/60355/#comment252785>

    Let's respect the Hive coding standards, please list all the imports instead of using the wildcard.



ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java
Lines 38 (patched)
<https://reviews.apache.org/r/60355/#comment252795>

    Could we get a javadoc here? Based on the method at a glance I'm not sure if this method will list all implementing classes or just the ones from the same package.



ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java
Lines 56 (patched)
<https://reviews.apache.org/r/60355/#comment252797>

    nit: Could we return an empty list instead on null to avoid NPEs?



ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java
Lines 110 (patched)
<https://reviews.apache.org/r/60355/#comment252796>

    Can we log this out instead of just writing to the err stream? Same on line 117,122 and 149.



ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java
Lines 40 (patched)
<https://reviews.apache.org/r/60355/#comment252791>

    nit: Should this be a warning instead of info?


- Barna Zsombor Klara


On June 22, 2017, 3:18 a.m., ZhangBing Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60355/
> -----------------------------------------------------------
> 
> (Updated June 22, 2017, 3:18 a.m.)
> 
> 
> Review request for hive, cheng xu and Xuefu Zhang.
> 
> 
> Bugs: HIVE-16929
>     https://issues.apache.org/jira/browse/HIVE-16929
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Add a configuration item "hive.aux.udf.package.name.list" in hive-site.xml, which is a scan corresponding to the $HIVE_HOME/auxlib/ directory jar package that contains the corresponding configuration package name under the class registered as a constant function.
> Such as,
> <property>
>   <name>hive.aux.udf.package.name.list</name>
>   <value>com.sample.udf,com.test.udf</value>
> </property>
> Instructions:
>    1, upload your jar file to $ HIVE_HOME/auxlib
>    2, configure your UDF function corresponding to the package to the following configuration parameters
>    <property>
>         <name>hive.aux.udf.package.name.list</name>
>         <value>com.sample.udf</value>
>    </property>
>   
>    3, the configuration items need to be placed in the hive-site.xml file
>    4, restart the Hive service to take effect
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java a8bdefdad6 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 9795f3ef98 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ClassUtil.java PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/util/UDFRegister.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60355/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> ZhangBing Lin
> 
>