[
https://issues.apache.org/jira/browse/TAJO-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14578221#comment-14578221
]
ASF GitHub Bot commented on TAJO-1642:
--------------------------------------
GitHub user blrunner opened a pull request:
https://github.com/apache/tajo/pull/600
TAJO-1642: CatalogServer need to check meta table first.
I tested this patch on my laptop. When I tried to start up
tajo-0.11.0-SNAPSHOT with the catalog-site.xml file for tajo-0.10.1-SNAPSHOT,
TajoMaster printed following messages.
```
15/06/09 11:38:11 INFO store.MySQLStore: The meta table of CatalogServer
already is created.
15/06/09 11:38:11 ERROR store.MySQLStore: Catalog version (2) and current
driver version (4) are mismatch to each other
15/06/09 11:38:11 ERROR store.MySQLStore:
=========================================================================
15/06/09 11:38:11 ERROR store.MySQLStore: | Catalog Store Migration Is
Needed |
15/06/09 11:38:11 ERROR store.MySQLStore:
=========================================================================
15/06/09 11:38:11 ERROR store.MySQLStore: | You might downgrade or upgrade
Apache Tajo. Downgrading or upgrading |
15/06/09 11:38:11 ERROR store.MySQLStore: | Tajo without migration process
is only available in some versions. |
15/06/09 11:38:11 ERROR store.MySQLStore: | In order to learn how to
migration Apache Tajo instance, |
15/06/09 11:38:11 ERROR store.MySQLStore: | please refer
http://s.apache.org/0_8_migration. |
15/06/09 11:38:11 ERROR store.MySQLStore:
=========================================================================
```
And I found that existing column informations exists normally. For the
reference, I succeed to test with only tajo-0.11.0-SNAPSHOT.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/blrunner/tajo TAJO-1642
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tajo/pull/600.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #600
----
commit 97fb598fdd7826a5c4da4019bb2ecdc48e31d8cd
Author: JaeHwa Jung <[email protected]>
Date: 2015-06-09T02:39:00Z
TAJO-1642: CatalogServer need to check meta table first.
----
> 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)