phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3556) Remove usage of com.google.common.collect.Iterators.emptyIterator()
Date Wed, 11 Oct 2017 06:56:00 GMT

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

Hudson commented on PHOENIX-3556:
---------------------------------

SUCCESS: Integrated in Jenkins build Phoenix-master #1839 (See [https://builds.apache.org/job/Phoenix-master/1839/])
PHOENIX-3556 Remove usage of (tdsilva: rev 024f407f25208e396908b2d783166e0fbf22c1dc)
* (edit) phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/TraverseNoExpressionVisitor.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/OrderPreservingTracker.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/ScanRanges.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/iterate/DistinctAggregatingResultIterator.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/AggregationManager.java


> Remove usage of com.google.common.collect.Iterators.emptyIterator()
> -------------------------------------------------------------------
>
>                 Key: PHOENIX-3556
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3556
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.5.2
>         Environment: MacOs, Phoenix 4.5.2-HBase-0.98, Guava 20.0
>            Reporter: Bo Gao
>            Assignee: Thomas D'Silva
>            Priority: Critical
>             Fix For: 4.13.0, 4.12.1
>
>         Attachments: PHOENIX-3556-v2.patch, PHOENIX-3556.patch
>
>
> I am working on a project with Google ads-lib latest version 2.22.0(Dec, 2016), and it
requires Guava version 20.0(Oct, 2016). My phoneix-core version is 4.5.2-HBase-0.98. I got
the following exception when trying to get Phoenix connection:
> {noformat}
> java.lang.IllegalAccessError: tried to access method com.google.common.collect.Iterators.emptyIterator()Lcom/google/common/collect/UnmodifiableIterator;
from class org.apache.phoenix.schema.MetaDataClient
> 	at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1501)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:751) ~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:186)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:315) ~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:307) ~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) ~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:305)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1364)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1927)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1896)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1896)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151) ~[phoenix-core-4.5.2-HBase-0.98.jar:4.5.2-HBase-0.98]
> 	at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[na:1.8.0_65]
> 	at java.sql.DriverManager.getConnection(DriverManager.java:247) ~[na:1.8.0_65]
> {noformat}
> The issue is that from Guava 20.0 Google changed the visibility of com.google.common.collect.Iterators#emptyIterator()
from public to default as it was announced earlier to be deprecated.
> I checked several versions of phoenix-core from old to new, looks like all versions are
using com.google.common.collect.Iterators#emptyIterator() in org.apache.phoenix.schema.MetaDataClient.
So the affected versions should be all.
> Better to replace the usage of emptyIterator() as https://google.github.io/guava/releases/18.0/api/docs/com/google/common/collect/Iterators.html#emptyIterator()
recommends.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message