trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION-2351] Bulk load with log error rows enhancements
Date Tue, 03 Jan 2017 21:51:49 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 848852d91 -> e7d54c6db


[TRAFODION-2351] Bulk load with log error rows enhancements

Changes to fix the hive failures due to core at
ExHbaseAccessTcb::buildLoggingFileName when the logging location is not set in TDB.


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

Branch: refs/heads/master
Commit: 8e6be59322c871352e336f0f047b70a700861a0a
Parents: e203d42
Author: selvaganesang <selva.govindarajan@esgyn.com>
Authored: Tue Dec 27 17:15:47 2016 +0000
Committer: selvaganesang <selva.govindarajan@esgyn.com>
Committed: Wed Dec 28 15:34:36 2016 +0000

----------------------------------------------------------------------
 core/sql/executor/ExHbaseAccess.cpp | 7 +++++--
 core/sql/executor/ExHbaseAccess.h   | 2 +-
 core/sql/executor/ExHdfsScan.cpp    | 1 -
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8e6be593/core/sql/executor/ExHbaseAccess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExHbaseAccess.cpp b/core/sql/executor/ExHbaseAccess.cpp
index a1eb0b7..7a71541 100644
--- a/core/sql/executor/ExHbaseAccess.cpp
+++ b/core/sql/executor/ExHbaseAccess.cpp
@@ -3189,10 +3189,13 @@ void ExHbaseAccessTcb::buildLoggingFileName(NAHeap *heap,
                              const char *tableName,
                              const char * loggingFileNamePrefix,
                              Lng32 instId,
-                             char * loggingFileName)
+                             char *&loggingFileName)
 {
   if (loggingFileName != NULL)
      NADELETEBASIC(loggingFileName, heap);
+  loggingFileName = NULL;
+  if (currCmdLoggingLocation == NULL)
+     return;
   short logLen = strlen(currCmdLoggingLocation)+strlen(loggingFileNamePrefix)+strlen(tableName)+100;
   loggingFileName = new (heap) char[logLen];
   sprintf(loggingFileName, "%s/%s_%s_%d",
@@ -3203,7 +3206,7 @@ void ExHbaseAccessTcb::buildLoggingPath(
                              const char *loggingLocation,
                              char * logId,
                              const char * tableName,
-                             char * currCmdLoggingLocation)
+                             char *currCmdLoggingLocation)
 {
   time_t t;
   char logId_tmp[30];

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8e6be593/core/sql/executor/ExHbaseAccess.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExHbaseAccess.h b/core/sql/executor/ExHbaseAccess.h
index f311119..fdb504c 100644
--- a/core/sql/executor/ExHbaseAccess.h
+++ b/core/sql/executor/ExHbaseAccess.h
@@ -190,7 +190,7 @@ public:
                                const char *tableName,
                                const char * loggingFileNamePrefix,
                                Lng32 instId,
-                               char * loggingFileName);
+                               char *& loggingFileName);
   static short setupError(NAHeap *heap, ex_queue_pair &qparent, Lng32 retcode, const
char * str, const char * str2 = NULL);
 
 protected:

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8e6be593/core/sql/executor/ExHdfsScan.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExHdfsScan.cpp b/core/sql/executor/ExHdfsScan.cpp
index d80f882..55b1723 100644
--- a/core/sql/executor/ExHdfsScan.cpp
+++ b/core/sql/executor/ExHdfsScan.cpp
@@ -189,7 +189,6 @@ ExHdfsScanTcb::ExHdfsScanTcb(
 
   Lng32 fileNum = getGlobals()->castToExExeStmtGlobals()->getMyInstanceNumber();
   ExHbaseAccessTcb::buildLoggingFileName((NAHeap *)getHeap(), ((ExHdfsScanTdb &)hdfsScanTdb).getLoggingLocation(),
-                     // (char *)((ExHdfsScanTdb &)hdfsScanTdb).getErrCountRowId(),
                      ((ExHdfsScanTdb &)hdfsScanTdb).tableName(),
                      "hive_scan_err",
                      fileNum,


Mime
View raw message