tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [1/5] tajo git commit: TAJO-1479: NPE during startup CatalogStore. (jaehwa)
Date Thu, 02 Apr 2015 01:34:07 GMT
Repository: tajo
Updated Branches:
  refs/heads/index_support bba7d18c6 -> 1c53ccf7a


TAJO-1479: NPE during startup CatalogStore. (jaehwa)

Closes #481


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/487a0e51
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/487a0e51
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/487a0e51

Branch: refs/heads/index_support
Commit: 487a0e51af980eda1b00476cdc999f29b28cc8e3
Parents: 652e4db
Author: JaeHwa Jung <blrunner@apache.org>
Authored: Tue Mar 31 16:11:27 2015 +0900
Committer: JaeHwa Jung <blrunner@apache.org>
Committed: Tue Mar 31 16:11:27 2015 +0900

----------------------------------------------------------------------
 CHANGES                                                        | 2 ++
 .../apache/tajo/catalog/store/AbstractMySQLMariaDBStore.java   | 2 +-
 .../src/main/resources/schemas/mariadb/partition_keys.sql      | 4 ++--
 .../src/main/resources/schemas/mysql/partition_keys.sql        | 2 +-
 .../src/main/resources/schemas/oracle/oracle.xml               | 6 +++---
 .../src/main/resources/schemas/postgresql/postgresql.xml       | 4 ++--
 6 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/487a0e51/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index bf6cbcd..4e1a27c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -49,6 +49,8 @@ Release 0.11.0 - unreleased
 
   BUG FIXES
 
+    TAJO-1479: NPE during startup CatalogStore. (jaehwa)
+
     TAJO-1437: Resolve findbug warnings on Tajo JDBC Module. 
     (Contributed by Dongjoon Hyun, Committed by jihoon)
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/487a0e51/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractMySQLMariaDBStore.java
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractMySQLMariaDBStore.java
b/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractMySQLMariaDBStore.java
index be9727e..6f1b765 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractMySQLMariaDBStore.java
+++ b/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractMySQLMariaDBStore.java
@@ -206,7 +206,7 @@ public abstract class AbstractMySQLMariaDBStore extends AbstractDBStore
 {
 
       // PARTITION_KEYS
       if (!baseTableMaps.get(TB_PARTTION_KEYS)) {
-        String sql = readSchemaFile("partition_params.sql");
+        String sql = readSchemaFile("partition_keys.sql");
 
         if (LOG.isDebugEnabled()) {
           LOG.debug(sql.toString());

http://git-wip-us.apache.org/repos/asf/tajo/blob/487a0e51/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/partition_keys.sql
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/partition_keys.sql
b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/partition_keys.sql
index dd7f2b5..6f2f238 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/partition_keys.sql
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/partition_keys.sql
@@ -2,5 +2,5 @@ CREATE TABLE PARTITION_KEYS (
   PARTITION_ID INT NOT NULL,
   COLUMN_NAME VARCHAR(255) BINARY NOT NULL,
   PARTITION_VALUE VARCHAR(255) NOT NULL,
-  UNIQUE INDEX PARTITION_KEYS_IDX (PID, COLUMN_NAME, PARTITION_VALUE),
-  FOREIGN KEY (PID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE)
\ No newline at end of file
+  UNIQUE INDEX PARTITION_KEYS_IDX (PARTITION_ID, COLUMN_NAME, PARTITION_VALUE),
+  FOREIGN KEY (PARTITION_ID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/487a0e51/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/partition_keys.sql
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/partition_keys.sql
b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/partition_keys.sql
index a85b12f..6f2f238 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/partition_keys.sql
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/partition_keys.sql
@@ -3,4 +3,4 @@ CREATE TABLE PARTITION_KEYS (
   COLUMN_NAME VARCHAR(255) BINARY NOT NULL,
   PARTITION_VALUE VARCHAR(255) NOT NULL,
   UNIQUE INDEX PARTITION_KEYS_IDX (PARTITION_ID, COLUMN_NAME, PARTITION_VALUE),
-  FOREIGN KEY (PID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE)
\ No newline at end of file
+  FOREIGN KEY (PARTITION_ID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/487a0e51/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
index 84a92fb..c39f9c8 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
@@ -203,11 +203,11 @@
       <tns:Object order="20" type="trigger" name="PARTITIONS_AUTOINC">
         <tns:sql><![CDATA[
   			CREATE OR REPLACE TRIGGER PARTITIONS_AUTOINC
-				BEFORE INSERT ON TABLES
+				BEFORE INSERT ON PARTITIONS
 				FOR EACH ROW
 				WHEN (new.PARTITION_ID IS NULL)
 				BEGIN
-				  SELECT PARTITIONS_SEQ.NEXTVAL INTO :new.TID FROM DUAL;
+				  SELECT PARTITIONS_SEQ.NEXTVAL INTO :new.PARTITION_ID FROM DUAL;
 				END;]]>
         </tns:sql>
       </tns:Object>
@@ -220,7 +220,7 @@
             PARTITION_ID INT NOT NULL,
             COLUMN_NAME VARCHAR2(255) NOT NULL,
             PARTITION_VALUE VARCHAR(255) NULL,
-            FOREIGN KEY (PARTITION_ID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE)
+            FOREIGN KEY (PARTITION_ID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE
 				)]]>
         </tns:sql>
       </tns:Object>

http://git-wip-us.apache.org/repos/asf/tajo/blob/487a0e51/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/postgresql/postgresql.xml
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/postgresql/postgresql.xml
b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/postgresql/postgresql.xml
index 0f49f83..b51451b 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/postgresql/postgresql.xml
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/postgresql/postgresql.xml
@@ -168,9 +168,9 @@ xsi:schemaLocation="http://tajo.apache.org/catalogstore ../DBMSSchemaDefinition.
         <tns:sql><![CDATA[
           CREATE TABLE PARTITION_KEYS (
             PARTITION_ID INT NOT NULL,
-            COLUMN_NAME VARCHAR2(255) NOT NULL,
+            COLUMN_NAME VARCHAR(255) NOT NULL,
             PARTITION_VALUE VARCHAR(255) NULL,
-            FOREIGN KEY (PARTITION_ID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE)
+            FOREIGN KEY (PARTITION_ID) REFERENCES PARTITIONS (PARTITION_ID) ON DELETE CASCADE
 				)]]>
         </tns:sql>
       </tns:Object>


Mime
View raw message