You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sa...@apache.org on 2016/07/07 20:36:46 UTC

[3/7] incubator-trafodion git commit: Regression fix and fixes for emptyDirectory().

Regression fix and fixes for emptyDirectory().


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

Branch: refs/heads/master
Commit: ac1b131c86105a0e95c7061adba58d4c36510af6
Parents: 5ecd3c6
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Mon Jul 4 00:44:36 2016 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Mon Jul 4 00:44:36 2016 +0000

----------------------------------------------------------------------
 core/sql/executor/ExExeUtilMisc.cpp |  4 ++--
 core/sql/exp/ExpLOBaccess.cpp       | 14 ++------------
 core/sql/regress/hive/EXPECTED005   | 16 +++++++++++-----
 core/sql/regress/hive/TEST005       |  2 +-
 4 files changed, 16 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ac1b131c/core/sql/executor/ExExeUtilMisc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilMisc.cpp b/core/sql/executor/ExExeUtilMisc.cpp
index db760f9..300fd95 100644
--- a/core/sql/executor/ExExeUtilMisc.cpp
+++ b/core/sql/executor/ExExeUtilMisc.cpp
@@ -2261,8 +2261,8 @@ Int32 ExExeUtilHiveTruncateTcb::fixup()
   ExpLOBinterfaceInit
     (lobGlob_, getGlobals()->getDefaultHeap(),
      getGlobals()->castToExExeStmtGlobals()->getContext(),TRUE, 
-     fdTdb().getHiveHdfsHost(),
-     fdTdb().getHiveHdfsPort());
+     htTdb().getHdfsHost(),
+     htTdb().getHdfsPort());
 
   return 0;
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ac1b131c/core/sql/exp/ExpLOBaccess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBaccess.cpp b/core/sql/exp/ExpLOBaccess.cpp
index b3b7f23..67ea3be 100644
--- a/core/sql/exp/ExpLOBaccess.cpp
+++ b/core/sql/exp/ExpLOBaccess.cpp
@@ -456,17 +456,7 @@ Ex_Lob_Error ExLob::emptyDirectory(char *dirPath,
   hdfsFileInfo *fileInfos = hdfsGetPathInfo(fs_, dirPath);
   if (fileInfos == NULL)
     {
-      hdfsDisconnect(fs_);
-      fs_ = hdfsConnect(hdfsServer_, hdfsPort_);
-      if (fs_ == NULL)
-        return LOB_HDFS_CONNECT_ERROR;
-      
-      fileInfos = hdfsGetPathInfo(fs_, lobDataFile_);
-      if (fileInfos == NULL)
-        return LOB_DIR_NAME_ERROR;
-      
-      if (lobGlobals)
-        lobGlobals->setHdfsFs(fs_);
+      return LOB_DIR_NAME_ERROR;
     }
   
   Lng32 currNumFilesInDir = 0;
@@ -2484,7 +2474,7 @@ Ex_Lob_Error ExLobsOper (
       break;
 
     case Lob_Empty_Directory:    
-      err = lobPtr->emptyDirectory();
+      err = lobPtr->emptyDirectory(lobStorageLocation, lobGlobals);
 
       break;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ac1b131c/core/sql/regress/hive/EXPECTED005
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/EXPECTED005 b/core/sql/regress/hive/EXPECTED005
index e2d51ae..7ffc08a 100644
--- a/core/sql/regress/hive/EXPECTED005
+++ b/core/sql/regress/hive/EXPECTED005
@@ -712,14 +712,16 @@ A            B
 --- 1 row(s) selected.
 >>
 >>-- truncate of hive data
->>cqd query_cache '0';
-
---- SQL operation complete.
+>>--cqd query_cache '0';
 >>truncate hive.hive.thive;
 
 --- SQL operation complete.
 >>select * from hive.hive.thive;
 
+*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before each retry was 0 seconds. See next entry for the error that caused this retry. 
+
+*** WARNING[8436] Mismatch detected between compiletime and runtime hive table definitions.
+
 --- 0 row(s) selected.
 >>insert into hive.hive.thive values (10, 20);
 
@@ -740,6 +742,10 @@ A            B
 --- SQL operation complete.
 >>select * from hive.hive.thive;
 
+*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before each retry was 0 seconds. See next entry for the error that caused this retry. 
+
+*** WARNING[8436] Mismatch detected between compiletime and runtime hive table definitions.
+
 --- 0 row(s) selected.
 >>
 >>-- truncate of partitioned hive table
@@ -828,7 +834,7 @@ t005part.a	t005part.b	t005part.c
 >>invoke hive.hive.thive_insert_smallint;
 
 -- Definition of hive table THIVE_INSERT_SMALLINT
--- Definition current  Wed Jun 22 18:14:29 2016
+-- Definition current  Sat Jul  2 07:06:59 2016
 
   (
     A                                SMALLINT
@@ -933,7 +939,7 @@ A
 >>invoke hive.hive.thive_insert_varchar;
 
 -- Definition of hive table THIVE_INSERT_VARCHAR
--- Definition current  Wed Jun 22 18:14:36 2016
+-- Definition current  Sat Jul  2 07:07:07 2016
 
   (
     A                                VARCHAR(1 CHAR) CHARACTER SET UTF8 COLLATE

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ac1b131c/core/sql/regress/hive/TEST005
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/TEST005 b/core/sql/regress/hive/TEST005
index cf1cd5c..8a4c8b1 100644
--- a/core/sql/regress/hive/TEST005
+++ b/core/sql/regress/hive/TEST005
@@ -314,7 +314,7 @@ select a from hive.hive.thive;
 select * from hive.hive.thive;
 
 -- truncate of hive data
-cqd query_cache '0';
+--cqd query_cache '0';
 truncate hive.hive.thive;
 select * from hive.hive.thive;
 insert into hive.hive.thive values (10, 20);