hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shivzone <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-120. Descriptive error message i...
Date Fri, 20 Nov 2015 17:19:05 GMT
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"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message