tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blrun...@apache.org
Subject git commit: TAJO-431: HCatalogStore can't write any data using INSERT OVERWRITE clause. (jaehwa)
Date Sun, 22 Dec 2013 03:50:51 GMT
Updated Branches:
  refs/heads/master bd2b89199 -> 302824a39


TAJO-431: HCatalogStore can't write any data using INSERT OVERWRITE clause. (jaehwa)


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

Branch: refs/heads/master
Commit: 302824a390fcbe0f51914dd0347c5a17da22d298
Parents: bd2b891
Author: blrunner <jhjung@gruter.com>
Authored: Sun Dec 22 12:50:38 2013 +0900
Committer: blrunner <jhjung@gruter.com>
Committed: Sun Dec 22 12:50:38 2013 +0900

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 +
 .../tajo-catalog-drivers/tajo-hcatalog/pom.xml  | 42 +++++---------------
 .../tajo/catalog/store/HCatalogStore.java       |  2 +-
 .../tajo/catalog/store/TestHCatalogStore.java   | 12 ++++++
 4 files changed, 25 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/302824a3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 20df0b5..c717e9a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -164,6 +164,8 @@ Release 0.8.0 - unreleased
 
   BUG FIXES
 
+    TAJO-431: HCatalogStore can't write any data using INSERT OVERWRITE clause. (jaehwa)
+
     TAJO-442: Cast operator with nested functions causes NPE. (hyunsik)
 
     TAJO-426: HCatalogStore created partitions automatically. (jaehwa)

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/302824a3/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/pom.xml
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/pom.xml b/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/pom.xml
index 69b9b19..fb1b827 100644
--- a/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/pom.xml
+++ b/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/pom.xml
@@ -129,15 +129,16 @@
       </properties>
       <dependencies>
         <dependency>
+          <groupId>javax.jdo</groupId>
+          <artifactId>jdo2-api</artifactId>
+          <version>2.3-eb</version>
+        </dependency>
+        <dependency>
           <groupId>org.apache.hive</groupId>
           <artifactId>hive-exec</artifactId>
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>
@@ -169,10 +170,6 @@
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>
@@ -204,10 +201,6 @@
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>
@@ -239,10 +232,6 @@
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>
@@ -286,15 +275,16 @@
       </properties>
       <dependencies>
         <dependency>
+          <groupId>javax.jdo</groupId>
+          <artifactId>jdo2-api</artifactId>
+          <version>2.3-eb</version>
+        </dependency>
+        <dependency>
           <groupId>org.apache.hive</groupId>
           <artifactId>hive-exec</artifactId>
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>
@@ -326,10 +316,6 @@
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>
@@ -361,10 +347,6 @@
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>
@@ -396,10 +378,6 @@
           <version>${hive.version}</version>
           <exclusions>
             <exclusion>
-              <groupId>javax.jdo</groupId>
-              <artifactId>jdo2-api</artifactId>
-            </exclusion>
-            <exclusion>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-builtins</artifactId>
             </exclusion>

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/302824a3/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/main/java/org/apache/tajo/catalog/store/HCatalogStore.java
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/main/java/org/apache/tajo/catalog/store/HCatalogStore.java
b/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/main/java/org/apache/tajo/catalog/store/HCatalogStore.java
index 74c7cb5..72b2aff 100644
--- a/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/main/java/org/apache/tajo/catalog/store/HCatalogStore.java
+++ b/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/main/java/org/apache/tajo/catalog/store/HCatalogStore.java
@@ -336,7 +336,7 @@ public class HCatalogStore extends CatalogConstants implements CatalogStore
{
 
     try {
       client = HCatalogUtil.getHiveMetaClient(catalogUri, null);
-      client.dropTable(dbName, tableName);
+      client.dropTable(dbName, tableName, false, false);
     } catch (NoSuchObjectException nsoe) {
     } catch (Exception e) {
       throw new IOException(e);

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/302824a3/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/test/java/org/apache/tajo/catalog/store/TestHCatalogStore.java
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/test/java/org/apache/tajo/catalog/store/TestHCatalogStore.java
b/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/test/java/org/apache/tajo/catalog/store/TestHCatalogStore.java
index 9ab208f..fb2abea 100644
--- a/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/test/java/org/apache/tajo/catalog/store/TestHCatalogStore.java
+++ b/tajo-catalog/tajo-catalog-drivers/tajo-hcatalog/src/test/java/org/apache/tajo/catalog/store/TestHCatalogStore.java
@@ -170,6 +170,7 @@ public class TestHCatalogStore {
       if(fs.exists(path)) {
         fs.delete(path, true);
       }
+      fs.close();
     } catch (NoSuchObjectException e) {
     } catch (InvalidOperationException e) {
     } catch (Exception e) {
@@ -279,7 +280,18 @@ public class TestHCatalogStore {
 
   @Test
   public void testDeleteTable() throws Exception {
+    TableDesc table = store.getTable(DB_NAME + "." + CUSTOMER);
+    Path customerPath = table.getPath();
+
+    table = store.getTable(DB_NAME + "." + NATION);
+    Path nationPath = table.getPath();
+
     store.deleteTable(DB_NAME + "." + CUSTOMER);
     store.deleteTable(DB_NAME + "." + NATION);
+
+    FileSystem fs = FileSystem.getLocal(new Configuration());
+    assertTrue(fs.exists(customerPath));
+    assertTrue(fs.exists(nationPath));
+    fs.close();
   }
 }


Mime
View raw message