[ 
https://issues.apache.org/jira/browse/HAWQ-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018363#comment-15018363
 ] 

ASF GitHub Bot commented on HAWQ-120:
-------------------------------------

Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/123#discussion_r45493424
  
    --- Diff: 
pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/Utilities.java
 ---
    @@ -30,8 +30,27 @@
         public static Object createAnyInstance(Class<?> confClass,
                                                String className, InputData 
metaData)
                 throws Exception {
    -        Class<?> cls = Class.forName(className);
    +
    +        Class<?> cls = null;
    +        try {
    +            cls = Class.forName(className);
    +        } catch (ClassNotFoundException e) {
    +            // in case the class name uses the old "com.pivotal.pxf" 
package
    +            // name, recommend using the new package "org.apache.hawq.pxf".
    +            if (className.startsWith("com.pivotal.pxf")) {
    +                throw new Exception(
    +                        "Class "
    +                                + className
    +                                + " doesn't not appear in classpath. "
    +                                + "Try changing the plugin name to start 
with \"org.apache.hawq.pxf\"",
    --- End diff --
    
    If someone uses a custom plugin with their own implementation, it doesn't 
necessarily need to use this namespace right ? Can we instead mention "Plugins 
provided by PXF must start with org.apache.hawq.pxf"


> Add grace error message after namespace change
> ----------------------------------------------
>
>                 Key: HAWQ-120
>                 URL: https://issues.apache.org/jira/browse/HAWQ-120
>             Project: Apache HAWQ
>          Issue Type: Improvement
>          Components: PXF
>            Reporter: Goden Yao
>            Assignee: Noa Horn
>            Priority: Minor
>
> In HAWQ-45, we've updated pxf name space to org.apache.hawq.
> Given the legacy version of PXF might have existed with the old namespace 
> table definition, it'd be good to have error messages like "com.pivotal.pxf 
> was an old namespace used in the previous versions, please switch to 
> org.apache.pxf as the new namespace and update your table definitions." 
> during *SELECT..." or "UPDATE..." table queries.
> This is an addition to current error detection logic only when we figured 
> users were using the old namespace.
> The error message should apply to both READ and WRITE pxf tables.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to