Re: Phoenix Upgrade 4.7 to 4.14 - Cannot use Phoenix

2019-08-06 Thread Josh Elser
Looks like this is a bug in the system table upgrade code path which 
doesn't handle the jump from 4.7 to 4.14 correctly. This big of a 
version jump is not tested/supported in Apache.


Does CLABS give you a guarantee that this will work? It would likely be 
good to contact Cloudera support if you need help on this.


On 7/28/19 10:10 PM, Alexander Lytchier wrote:

Hi,

Following an update of Cloudera Manager and CDH from 5.7 to 5.14, and 
Phoenix from 4.7.0 (CLABS) to 4.14.0, sqlline.py is no longer working.


Apart from the upgrade of Phoenix I also created the table 
/SYSTEM.MUTEX/ in HBase since it’s not used in 4.7.0, based on 
http://apache-phoenix-user-list.1124778.n5.nabble.com/Error-upgrading-from-from-4-7-x-to-4-13-x-td4210.html


$ ./sqlline.py localhost:2181:/hbase

Setting property: [incremental, false]

Setting property: [isolation, TRANSACTION_READ_COMMITTED]

issuing: !connect jdbc:phoenix:localhost:2181:/hbase none none 
org.apache.phoenix.jdbc.PhoenixDriver


Connecting to jdbc:phoenix:localhost:2181:/hbase

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in 
[jar:file:/opt/cloudera/parcels/APACHE_PHOENIX-4.14.0-cdh5.14.2.p0.3/lib/phoenix/phoenix-4.14.0-cdh5.14.2-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]


SLF4J: Found binding in 
[jar:file:/opt/cloudera/parcels/CDH-5.14.4-1.cdh5.14.4.p0.3/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]


SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
explanation.


SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

19/07/26 17:40:07 WARN util.NativeCodeLoader: Unable to load 
native-hadoop library for your platform... using builtin-java classes 
where applicable


19/07/26 17:40:32 WARN query.ConnectionQueryServicesImpl: Starting 
restore of SYSTEM.CATALOG using snapshot 
SNAPSHOT_SYSTEM.CATALOG_4.7.x_TO_4.14.0_20190726174011 because upgrade 
failed


19/07/26 17:40:37 WARN query.ConnectionQueryServicesImpl: Successfully 
restored SYSTEM.CATALOG using snapshot 
SNAPSHOT_SYSTEM.CATALOG_4.7.x_TO_4.14.0_20190726174011


19/07/26 17:40:42 WARN query.ConnectionQueryServicesImpl: Successfully 
restored and enabled SYSTEM.CATALOG using snapshot 
SNAPSHOT_SYSTEM.CATALOG_4.7.x_TO_4.14.0_20190726174011


Error: ERROR 1012 (42M03): Table undefined. tableName=MYTABLE 
(state=42M03,code=1012)


org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): 
Table undefined. tableName=MYTABLE


     at 
org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:577)


     at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.(FromCompiler.java:391)


     at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.(FromCompiler.java:383)


     at 
org.apache.phoenix.compile.FromCompiler.getResolver(FromCompiler.java:263)


     at 
org.apache.phoenix.compile.CreateIndexCompiler.compile(CreateIndexCompiler.java:50)


     at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableCreateIndexStatement.compilePlan(PhoenixStatement.java:1073)


     at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableCreateIndexStatement.compilePlan(PhoenixStatement.java:1059)


     at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:401)


     at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)


     at 
org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)


     at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:389)


     at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)


     at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)


     at 
org.apache.phoenix.util.UpgradeUtil.upgradeLocalIndexes(UpgradeUtil.java:456)


     at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemCatalogIfRequired(ConnectionQueryServicesImpl.java:2899)


     at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemTables(ConnectionQueryServicesImpl.java:3050)


     at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2584)


     at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2491)


     at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)


     at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2491)


     at 
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)


     at 
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)


     

Phoenix Upgrade 4.7 to 4.14 - Cannot use Phoenix

2019-07-28 Thread Alexander Lytchier
Hi,

Following an update of Cloudera Manager and CDH from 5.7 to 5.14, and Phoenix 
from 4.7.0 (CLABS) to 4.14.0, sqlline.py is no longer working.

Apart from the upgrade of Phoenix I also created the table SYSTEM.MUTEX in 
HBase since it’s not used in 4.7.0, based on 
http://apache-phoenix-user-list.1124778.n5.nabble.com/Error-upgrading-from-from-4-7-x-to-4-13-x-td4210.html

$ ./sqlline.py localhost:2181:/hbase

Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:localhost:2181:/hbase none none 
org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:localhost:2181:/hbase
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in 
[jar:file:/opt/cloudera/parcels/APACHE_PHOENIX-4.14.0-cdh5.14.2.p0.3/lib/phoenix/phoenix-4.14.0-cdh5.14.2-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in 
[jar:file:/opt/cloudera/parcels/CDH-5.14.4-1.cdh5.14.4.p0.3/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
19/07/26 17:40:07 WARN util.NativeCodeLoader: Unable to load native-hadoop 
library for your platform... using builtin-java classes where applicable
19/07/26 17:40:32 WARN query.ConnectionQueryServicesImpl: Starting restore of 
SYSTEM.CATALOG using snapshot 
SNAPSHOT_SYSTEM.CATALOG_4.7.x_TO_4.14.0_20190726174011 because upgrade failed
19/07/26 17:40:37 WARN query.ConnectionQueryServicesImpl: Successfully restored 
SYSTEM.CATALOG using snapshot 
SNAPSHOT_SYSTEM.CATALOG_4.7.x_TO_4.14.0_20190726174011
19/07/26 17:40:42 WARN query.ConnectionQueryServicesImpl: Successfully restored 
and enabled SYSTEM.CATALOG using snapshot 
SNAPSHOT_SYSTEM.CATALOG_4.7.x_TO_4.14.0_20190726174011
Error: ERROR 1012 (42M03): Table undefined. tableName=MYTABLE 
(state=42M03,code=1012)
org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table 
undefined. tableName=MYTABLE
at 
org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:577)
at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.(FromCompiler.java:391)
at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.(FromCompiler.java:383)
at 
org.apache.phoenix.compile.FromCompiler.getResolver(FromCompiler.java:263)
at 
org.apache.phoenix.compile.CreateIndexCompiler.compile(CreateIndexCompiler.java:50)
at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableCreateIndexStatement.compilePlan(PhoenixStatement.java:1073)
at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableCreateIndexStatement.compilePlan(PhoenixStatement.java:1059)
at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:401)
at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:389)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
at 
org.apache.phoenix.util.UpgradeUtil.upgradeLocalIndexes(UpgradeUtil.java:456)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemCatalogIfRequired(ConnectionQueryServicesImpl.java:2899)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemTables(ConnectionQueryServicesImpl.java:3050)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2584)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2491)
at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2491)
at 
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
at 
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
at 
org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
at 
sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
at 
sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
at sqlline.Commands.connect(Commands.java:1064)
at sqlline.Commands.connect(Commands.java:996)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)