phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-174) Zookeeper parameter in Phoenix JDBC URL should be optional as it can be specified in hbase-site.xml
Date Thu, 23 Apr 2015 07:28:38 GMT

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

ASF GitHub Bot commented on PHOENIX-174:
----------------------------------------

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

    https://github.com/apache/phoenix/pull/75#discussion_r28941403
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/types/PDataType.java ---
    @@ -1144,17 +1144,18 @@ public static PDataType fromLiteral(Object value) {
           return null;
         }
         for (PDataType type : PDataType.values()) {
    -      if (type.isArrayType()) {
    -        PhoenixArray arr = (PhoenixArray) value;
    -        if ((type.getSqlType() == arr.baseType.sqlType + PDataType.ARRAY_TYPE_BASE)
    -            && type.getJavaClass().isInstance(value)) {
    -          return type;
    -        }
    -      } else {
    -        if (type.getJavaClass().isInstance(value)) {
    -          return type;
    -        }
    -      }
    +			if (type.isArrayType() && type.getJavaClass().isInstance(value)) {
    --- End diff --
    
    Default implementation of isArrayType() returns false, hence I have not modified it. But
in ordered list PVarcharArray comes before PJsonDataType and so value is first testified against
PVarcharArraay. Now since PVarcharArray is ArrayType it gets inside the if() and type cast
the value which throws ClassCastException since value is of type PJsonDataType. After casting
the value, in next if (Line 1150) it validates whether this isInstance() which is not correct.
Instead before casting value we should check whether it is instance of current type or not
to avoid any ClassCastException. 


> Zookeeper parameter in Phoenix JDBC URL should be optional as it can be specified in
hbase-site.xml
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-174
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-174
>             Project: Phoenix
>          Issue Type: Task
>    Affects Versions: 1.1
>            Reporter: mujtaba
>              Labels: enhancement
>
> Currently, value from HBase zookeeper/port specified in Phoenix JDBC URL overrides the
value specified in hbase-site.xml. Override is fine, but it should use value specified in
hbase-site.xml if no value is specified in phoenix JDBC URL i.e. to make this parameter optional.



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

Mime
View raw message