Jaehwa Jung created TAJO-1642:
---------------------------------
Summary: CatalogServer need to check meta table first.
Key: TAJO-1642
URL: https://issues.apache.org/jira/browse/TAJO-1642
Project: Tajo
Issue Type: Bug
Components: catalog
Reporter: Jaehwa Jung
Assignee: Jaehwa Jung
Fix For: 0.11.0, 0.10.1
When I start up tajo-0.11.0-SNAPSHOT with the catalog-site.xml which is set for
tajo-0.10.1-SNAPSHOT, I failed to start up TajoMaster as following
{code:xml}
09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create META databse
object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create
TABLESPACES databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create DATABASES_
databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create TABLES
databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create COLUMNS
databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create OPTIONS
databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create INDEXES
databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create STATS
databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create
PARTITION_METHODS databse object. Already exists.
15/06/09 11:20:52 INFO store.XMLCatalogSchemaManager: Skip to create PARTITIONS
databse object. Already exists.
15/06/09 11:20:52 WARN store.XMLCatalogSchemaManager: Failed to drop database
objects TABLE TABLESPACES,TABLE DATABASES_,TABLE TABLES,TABLE PARTITION_KEYS
15/06/09 11:20:52 ERROR catalog.CatalogServer: CatalogServer initialization
failed
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.apache.tajo.catalog.CatalogServer.serviceInit(CatalogServer.java:135)
at
org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
at
org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:107)
at org.apache.tajo.master.TajoMaster.serviceInit(TajoMaster.java:214)
at
org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
at org.apache.tajo.master.TajoMaster.main(TajoMaster.java:603)
Caused by: org.apache.tajo.catalog.exception.CatalogException: Cannot
initialize the persistent storage of Catalog
at
org.apache.tajo.catalog.store.AbstractDBStore.<init>(AbstractDBStore.java:162)
at org.apache.tajo.catalog.store.MySQLStore.<init>(MySQLStore.java:36)
... 10 more
Caused by: org.apache.tajo.catalog.exception.CatalogException: Cannot add
foreign key constraint
at
org.apache.tajo.catalog.store.XMLCatalogSchemaManager.createBaseSchema(XMLCatalogSchemaManager.java:305)
at
org.apache.tajo.catalog.store.AbstractDBStore.createBaseTable(AbstractDBStore.java:86)
at
org.apache.tajo.catalog.store.AbstractDBStore.<init>(AbstractDBStore.java:150)
... 11 more
Caused by: java.sql.SQLException: Cannot add foreign key constraint
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2531)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1618)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1549)
at
org.apache.tajo.catalog.store.XMLCatalogSchemaManager.createBaseSchema(XMLCatalogSchemaManager.java:301)
... 13 more
{code}
The cause of above error is that table schema difference with
tajo-0.10.1-SNAPSHOT and tajo-0.11.0-SNAPSHOT. A few new tables for table
partition management is added to tajo-0.11.0-SNAPSHOT.
I thought that the error was trivial. But I found that it had seriously
affected to existing catalog because all column informations had been deleted.
Fortunately, I found some problem of AbstractDBStore and I pland to send a PR
today.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)