trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [1/4] incubator-trafodion git commit: [TRAFODION-2594] Trafodion logs the same message twice in most of its log4j and log4cxx logs [TRAFODION-2420] RMS enhancements [TRAFODION-2478] Memory monitor Thread enhancements
Date Thu, 20 Apr 2017 00:00:30 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 6c7254742 -> f8c57fd6b


[TRAFODION-2594] Trafodion logs the same message twice in most of its log4j and log4cxx logs
[TRAFODION-2420] RMS enhancements
[TRAFODION-2478] Memory monitor Thread enhancements

a) Changed the configuration to have log4j.additive property set to false
b) ScratchIOSize is initialized so that this counter doesn't show invalid
   value
c) Cleaned up memory monitor concept and added code to log the memory monitoring
   counters to sccp log file every 5 minutes or when there is a pressure difference


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

Branch: refs/heads/master
Commit: a4df3302f5fdcbf8abd165fed8b0da48c2de132f
Parents: b53136f
Author: selvaganesang <selva.govindarajan@esgyn.com>
Authored: Sat Apr 15 18:53:34 2017 +0000
Committer: selvaganesang <selva.govindarajan@esgyn.com>
Committed: Mon Apr 17 22:35:47 2017 +0000

----------------------------------------------------------------------
 .../sqf/conf/log4cxx.trafodion.masterexe.config |  15 +-
 core/sqf/conf/log4cxx.trafodion.sscp.config     |  11 +-
 core/sqf/conf/log4cxx.trafodion.ssmp.config     |  13 +-
 core/sqf/conf/log4cxx.trafodion.tm.config       |   2 +
 core/sqf/conf/log4cxx.trafodion.udr.config      |  12 +-
 core/sql/cli/memorymonitor.cpp                  | 203 ++++++++-----------
 core/sql/cli/memorymonitor.h                    |   8 +-
 core/sql/executor/ExStats.cpp                   |   4 +-
 core/sql/qmscommon/QRLogger.h                   |   1 +
 core/sql/regress/core/EXPECTEDRTS               |  14 +-
 10 files changed, 129 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sqf/conf/log4cxx.trafodion.masterexe.config
----------------------------------------------------------------------
diff --git a/core/sqf/conf/log4cxx.trafodion.masterexe.config b/core/sqf/conf/log4cxx.trafodion.masterexe.config
index c1e0b80..2ed6cf8 100644
--- a/core/sqf/conf/log4cxx.trafodion.masterexe.config
+++ b/core/sqf/conf/log4cxx.trafodion.masterexe.config
@@ -22,16 +22,17 @@
 #
 
 # Define some default values that can be overridden by system properties
-trafodion.root.logger=INFO,  mxoAppender
+trafodion.root.logger=INFO, appender0 
 trafodion.log.dir=${TRAF_HOME}/logs
 trafodion.log.filename.suffix=${TRAFODION_LOG_FILENAME_SUFFIX}
 
-# Define the root logger to the system property "trafodion.root.logger".
-log4j.rootLogger=${trafodion.root.logger}
-
 # Logging Threshold
 log4j.threshhold=ALL
 
+# Define the root logger to the system property "trafodion.root.logger".
+log4j.rootLogger=${trafodion.root.logger}
+log4j.appender.appender0.file=${trafodion.log.dir}/master_exec${trafodion.log.filename.suffix}
+
 #
 # Rolling File Appender
 #
@@ -44,15 +45,15 @@ log4j.appender.mxoAppender.layout=org.apache.log4j.PatternLayout
 log4j.appender.mxoAppender.layout.ConversionPattern=%d, %p, %c, %m%n
 
 #MXOSRVR
+log4j.additive.mxoAppender=false 
 log4j.logger.MXOSRVR=ERROR, mxoAppender
 
 # SQL
 # uncomment the following line if you want to enable debug logging
-#log4j.logger.SQL.EXE=DEBUG
 log4j.logger.SQL=INFO
 log4j.logger.SQL.COMP=ERROR
-log4j.logger.SQL.EXE.Memory=INFO
-log4j.logger.SQL.ESP=ERROR
+log4j.logger.SQL.EXE=INFO
+log4j.logger.SQL.ESP=INFO
 log4j.logger.SQL.PRIVMGR=INFO
 #
 log4j.logger.SQL.HDFS.JniTop=FATAL

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sqf/conf/log4cxx.trafodion.sscp.config
----------------------------------------------------------------------
diff --git a/core/sqf/conf/log4cxx.trafodion.sscp.config b/core/sqf/conf/log4cxx.trafodion.sscp.config
index 0733514..9b4c1e2 100644
--- a/core/sqf/conf/log4cxx.trafodion.sscp.config
+++ b/core/sqf/conf/log4cxx.trafodion.sscp.config
@@ -22,16 +22,15 @@
 #
 
 # Define some default values that can be overridden by system properties
-trafodion.root.logger=INFO, sscpAppender
+trafodion.root.logger=INFO, appender0 
 trafodion.log.dir=${TRAF_HOME}/logs
 trafodion.log.filename.suffix=${TRAFODION_LOG_FILENAME_SUFFIX}
 
-# Define the root logger to the system property "trafodion.root.logger".
-log4j.rootLogger=${trafodion.root.logger}
-
 # Logging Threshold
 log4j.threshhold=ALL
 
+# Define the root logger to the system property "trafodion.root.logger".
+log4j.appender.appender0.file=${trafodion.log.dir}/sscp${trafodion.log.filename.suffix}
 #
 # Rolling File Appender
 #
@@ -45,4 +44,6 @@ log4j.appender.sscpAppender.layout.ConversionPattern=%d, %p, %c, %m%n
 log4j.appender.sscpAppender.Append=true
 
 #SSCP
-log4j.category.SQL.SSCP=INFO, sscpAppender
\ No newline at end of file
+log4j.category.SQL.SSCP=INFO, sscpAppender
+log4j.additive.sscpAppender=false 
+

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sqf/conf/log4cxx.trafodion.ssmp.config
----------------------------------------------------------------------
diff --git a/core/sqf/conf/log4cxx.trafodion.ssmp.config b/core/sqf/conf/log4cxx.trafodion.ssmp.config
index ce97ea6..7ef6d25 100644
--- a/core/sqf/conf/log4cxx.trafodion.ssmp.config
+++ b/core/sqf/conf/log4cxx.trafodion.ssmp.config
@@ -22,17 +22,15 @@
 #
 
 # Define some default values that can be overridden by system properties
-trafodion.root.logger=INFO, ssmpAppender
+trafodion.root.logger=INFO, appender0
 trafodion.log.dir=${TRAF_HOME}/logs
 trafodion.log.filename.suffix=${TRAFODION_LOG_FILENAME_SUFFIX}
 
-# Define the root logger to the system property "trafodion.root.logger".
-log4j.rootLogger=${trafodion.root.logger}
-
-# Logging Threshold
 log4j.threshhold=ALL
 
-#
+# Define the root logger to the system property "trafodion.root.logger".
+log4j.appender.appender0.file=${trafodion.log.dir}/ssmp${trafodion.log.filename.suffix}
+
 # Rolling File Appender
 #
 log4j.appender.ssmpAppender=org.apache.log4j.RollingFileAppender
@@ -45,4 +43,5 @@ log4j.appender.ssmpAppender.layout.ConversionPattern=%d, %p, %c, %m%n
 log4j.appender.ssmpAppender.Append=true
 
 #SSMP
-log4j.logger.SQL.SSMP=INFO, ssmpAppender
\ No newline at end of file
+log4j.category.SQL.SSMP=INFO, ssmpAppender
+log4j.additive.ssmpAppender=false 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sqf/conf/log4cxx.trafodion.tm.config
----------------------------------------------------------------------
diff --git a/core/sqf/conf/log4cxx.trafodion.tm.config b/core/sqf/conf/log4cxx.trafodion.tm.config
index 44b4e9b..98251bd 100644
--- a/core/sqf/conf/log4cxx.trafodion.tm.config
+++ b/core/sqf/conf/log4cxx.trafodion.tm.config
@@ -28,6 +28,7 @@ trafodion.log.filename.suffix=${TRAFODION_LOG_FILENAME_SUFFIX}
 
 # Define the root logger to the system property "trafodion.root.logger".
 log4j.rootLogger=${trafodion.root.logger}
+log4j.appender.appender0.file=${trafodion.log.dir}/tm${trafodion.log.filename.suffix}
 
 # Logging Threshold
 log4j.threshhold=ALL
@@ -45,5 +46,6 @@ log4j.appender.tmAppender.layout.ConversionPattern=%d, %p, %c, %m%n
 log4j.appender.tmAppender.Append=true
 
 #TM
+log4j.additive.tmAppender=false
 log4j.logger.TM=INFO, tmAppender
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sqf/conf/log4cxx.trafodion.udr.config
----------------------------------------------------------------------
diff --git a/core/sqf/conf/log4cxx.trafodion.udr.config b/core/sqf/conf/log4cxx.trafodion.udr.config
index e540c39..87941d3 100644
--- a/core/sqf/conf/log4cxx.trafodion.udr.config
+++ b/core/sqf/conf/log4cxx.trafodion.udr.config
@@ -22,16 +22,17 @@
 #
 
 # Define some default values that can be overridden by system properties
-trafodion.root.logger=INFO, udrAppender
+trafodion.root.logger=INFO, appender0
 trafodion.log.dir=${TRAF_HOME}/logs
 trafodion.log.filename.suffix=${TRAFODION_LOG_FILENAME_SUFFIX}
 
-# Define the root logger to the system property "trafodion.root.logger".
-log4j.rootLogger=${trafodion.root.logger}
-
 # Logging Threshold
 log4j.threshhold=ALL
 
+# Define the root logger to the system property "trafodion.root.logger".
+log4j.rootLogger=${trafodion.root.logger}
+log4j.appender.appender0.file=${trafodion.log.dir}/udr${trafodion.log.filename.suffix}
+
 #
 # Rolling File Appender
 #
@@ -45,4 +46,5 @@ log4j.appender.udrAppender.layout.ConversionPattern=%d, %p, %c, %m%n
 log4j.appender.udrAppender.Append=true
 
 #UDR
-log4j.logger.SQL.UDR=INFO, udrAppender
\ No newline at end of file
+log4j.additive.udrAppender=false
+log4j.logger.SQL.UDR=INFO, udrAppender

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sql/cli/memorymonitor.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/memorymonitor.cpp b/core/sql/cli/memorymonitor.cpp
index 33abc00..42101e4 100644
--- a/core/sql/cli/memorymonitor.cpp
+++ b/core/sql/cli/memorymonitor.cpp
@@ -44,25 +44,20 @@
 #include "PortProcessCalls.h"
 
 #include <time.h>
-
-
-
-
+#include "QRLogger.h"
 #include <cextdecs/cextdecs.h>
 #undef DllImport
 #define DllImport __declspec( dllimport )
-
+/*
 // fix a problem with different versions of pdh.dll 
 #ifdef PdhOpenQuery
 #undef PdhOpenQuery   //       PdhOpenQueryA or PdhOpenQueryW
 extern "C" Lng32 __stdcall 
 PdhOpenQuery (LPCSTR  szD, DWORD  dw, HQUERY  *phQ );
 #endif
-
+*/
 #define FREAD_BUFFER_SIZE 2048
 
-//SQ_LINUX #ifdef NA_WINNT
-
 NABoolean MemoryMonitor::threadIsCreated_ = 0;
 HANDLE MemoryMonitor::updateThread_ = (HANDLE) 0;
 ULng32 MemoryMonitor::threadId_ = 0;
@@ -71,14 +66,15 @@ DWORD WINAPI MemoryMonitor::memMonitorUpdateThread(void * param) {
   // params points to the memory monitor object
   MemoryMonitor *memMonitor = (MemoryMonitor*) param;
   Lng32 sleepTime = memMonitor->getSampleInterval();
-  float scale = 1.0;
   while (TRUE) {
-    memMonitor->update(scale);
-    Sleep((ULng32)(sleepTime * scale));
+    memMonitor->update();
+    Sleep((ULng32)(sleepTime));
   };
   return 0;
 };
 
+#define LOG_INTERVAL 300000000L
+
 MemoryMonitor::MemoryMonitor(Lng32 windowSize,
 			     Lng32 sampleInterval,
 			     CollHeap *heap)
@@ -92,13 +88,17 @@ MemoryMonitor::MemoryMonitor(Lng32 windowSize,
     pageFaultRate_(0),
     prevPageFault_(0),
     prevTime_(0),
+    currTime_(0),
+    logTime_(0),
     entryCount_(1),
     resetEntryCount_(TRUE),
     resetOnce_(FALSE),
 
     enable_(TRUE),
     pressure_(0),
-
+    memFree_(-1),
+    memActive_(-1),
+    memInactive_(-1),
     sampleInterval_(sampleInterval * 1000)
 {
   // if the windowSize is 0, we do not need memory monitor.
@@ -136,14 +136,6 @@ MemoryMonitor::MemoryMonitor(Lng32 windowSize,
     return;
   }
 
-  // log info to a file, if requested
-  char *lv_logfile = getenv("SQL_MEMMONITOR_LOGFILE");
-  if (lv_logfile) {
-    fd_logfile_ = fopen(lv_logfile, "a");
-  }
-  else
-    fd_logfile_ = NULL;
-
   ULng32 pageSize = 0;  
 
   fd_vmstat_ = fopen("/proc/vmstat", "r");
@@ -161,7 +153,6 @@ MemoryMonitor::MemoryMonitor(Lng32 windowSize,
 
 MemoryMonitor::~MemoryMonitor() {
 
-//SQ_LINUX #ifdef NA_WINNT
   if (fd_meminfo_)
   {
     fclose(fd_meminfo_);
@@ -187,130 +178,104 @@ void MemoryMonitor::updatePageFaultRate(Int64 pageFault) {
   if (delta < 0)
     return;
 
-  Int64 currTime = JULIANTIMESTAMP(OMIT,OMIT,OMIT,OMIT);
+  currTime_ = JULIANTIMESTAMP(OMIT,OMIT,OMIT,OMIT);
   
   // Just in case
-  if (currTime <= prevTime_)
+  if (currTime_ <= prevTime_)
     return;
 
   if (resetEntryCount_)
     { // Start a new cycle after the main thread sees pressure peek.
       resetEntryCount_ = FALSE;
       entryCount_ = 1;
+      prevTime_ = currTime_;
       prevPageFault_ = pageFault;
-      prevTime_ = currTime;
       return;
     }
 
   float ratio = (float)(1.0 / entryCount_);
-#pragma warning (disable : 4244)   //warning elimination
-#pragma nowarn(1506)   // warning elimination 
   pageFaultRate_ = (1 - ratio) * pageFaultRate_ + ratio * 
-                   delta / ((float)(currTime - prevTime_) / 1E6);
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)   //warning elimination
+                   delta / ((float)(currTime_ - prevTime_) / 1E6);
   prevPageFault_ = pageFault;
-  prevTime_ = currTime;
+  prevTime_ = currTime_;
   if (entryCount_ < 3)
     entryCount_++;
 }
 
-void MemoryMonitor::update(float &scale) {
-	
-	if (fd_meminfo_ == NULL) 
-		return; // error handling here.
-        Int32 success = fseek(fd_meminfo_, 0, SEEK_SET);
-        if (success != 0)
-                return;
-	char buffer[FREAD_BUFFER_SIZE+1];
+void MemoryMonitor::update() {
+        static char logBuffer[300];	
 	Int64 memFree = -1, memCommitAS = 0;
 	Int64 pgpgout = -1, pgpgin = -1;
+        Int64 memActive = -1, memInactive = -1;
 	size_t bytesRead = 0;
 	char * currPtr;
-        bytesRead = fread(buffer, 1, FREAD_BUFFER_SIZE, fd_meminfo_);
-        // Make sure there wasn't an error (next fseek will clear eof)
-        if (ferror(fd_meminfo_))
-           assert(false); 
-        if (feof(fd_meminfo_))
-           clearerr(fd_meminfo_); 
-        buffer[bytesRead] = '\0';
-        currPtr = strstr(buffer, "MemFree");
-	if (currPtr) sscanf(currPtr, "%*s " PF64 " kB", &memFree);
-        currPtr = strstr(buffer, "Committed_AS");
-	if (currPtr) sscanf(currPtr, "%*s " PF64 " kB", &memCommitAS);
-
-	Lng32 prevPressure = pressure_;
-	if (memTotal_ > 0 && memCommitAS > 0 && memFree > -1)
-		commitPhysRatio_ = (float)memCommitAS / (float) memTotal_;
-	else
-	{
-	        scale = 6;
-		pressure_ = 0;
-		return;
-	}
-        if(memFree > 0)
-        {
-          memFree_ = memFree;
+	char buffer[FREAD_BUFFER_SIZE+1];
+        Int32 success;
+
+	if (fd_meminfo_ != NULL)  {
+           success = fseek(fd_meminfo_, 0, SEEK_SET);
+           if (success == 0)
+              bytesRead = fread(buffer, 1, FREAD_BUFFER_SIZE, fd_meminfo_);
+           if (ferror(fd_meminfo_))
+               assert(false); 
+           if (feof(fd_meminfo_))
+              clearerr(fd_meminfo_); 
+           buffer[bytesRead] = '\0';
+           currPtr = strstr(buffer, "MemFree");
+	   if (currPtr) 
+              sscanf(currPtr, "%*s " PF64 " kB", &memFree);
+           currPtr = strstr(buffer, "Committed_AS");
+	   if (currPtr) 
+              sscanf(currPtr, "%*s " PF64 " kB", &memCommitAS);
+           currPtr = strstr(buffer, "Active:");
+	   if (currPtr) 
+              sscanf(currPtr, "%*s " PF64 " kB", &memActive);
+           currPtr = strstr(buffer, "Inactive:");
+	   if (currPtr) 
+              sscanf(currPtr, "%*s " PF64 " kB", &memInactive);
+	   if (memTotal_ > 0 && memCommitAS > 0 && memFree > -1)
+               commitPhysRatio_ = (float)memCommitAS / (float) memTotal_;
+           memFree_ = MAXOF(memFree, -1);
+           memActive_ = MAXOF(memActive, -1);
+           memInactive_ = MAXOF(memInactive, -1); 
         }
-        else
-        {
-           memFree_ = 0;
-           return;
+	if (fd_vmstat_ != NULL) {
+           success = fseek(fd_vmstat_, 0, SEEK_SET);
+           if (success == 0) 
+	      bytesRead = fread(buffer, 1, FREAD_BUFFER_SIZE, fd_vmstat_);
+           if (ferror(fd_vmstat_))
+              assert(false); 
+           if (feof(fd_vmstat_))
+              clearerr(fd_vmstat_); 
+           buffer[bytesRead] = '\0';
+           currPtr = strstr(buffer, "pgpgin");
+	   if (currPtr)  
+              sscanf(currPtr, "%*s " PF64 " kB", &pgpgin);
+           currPtr = strstr(buffer, "pgpgout");
+	   if (currPtr) 
+              sscanf(currPtr, "%*s " PF64 " kB", &pgpgout);
+	   if (pgpgin > -1 && pgpgout > -1)
+	      updatePageFaultRate(pgpgin + pgpgout);
         }
-
-	if (fd_vmstat_ == NULL) 
-		return; // error handling here.
-        success = fseek(fd_vmstat_, 0, SEEK_SET);
-        if (success != 0)
-	{
-	        scale = 6;
-		pressure_ = 0;
-		return;
-	}
-        bytesRead = 0;
-	bytesRead = fread(buffer, 1, FREAD_BUFFER_SIZE, fd_vmstat_);
-        if (ferror(fd_vmstat_))
-           assert(false); 
-        if (feof(fd_vmstat_))
-           clearerr(fd_vmstat_); 
-        buffer[bytesRead] = '\0';
-        currPtr = strstr(buffer, "pgpgin");
-	if (currPtr) sscanf(currPtr, "%*s " PF64 " kB", &pgpgin);
-        currPtr = strstr(buffer, "pgpgout");
-	if (currPtr) sscanf(currPtr, "%*s " PF64 " kB", &pgpgout);
-	if (pgpgin > -1 && pgpgout > -1)
-	  updatePageFaultRate(pgpgin + pgpgout);
-	else
-	{
-	        scale = 6;
-		pressure_ = 0;
-		return;
-	}
-        float percentFree = (float)memFree / (float)memTotal_;
+        float percentFree = (float)memFree_ / (float)memTotal_;
+        float percentActive = (float)memActive_ / (float)memTotal_;
+        float percentInactive = (float)memInactive_ / (float)memTotal_; 
         float normalizedPageFaultRate = pageFaultRate_ / physKBytesRatio_;
-        pressure_ = MAXOF(MINOF(((1 - 4 * percentFree) * (normalizedPageFaultRate / 25) *
commitPhysRatio_), 100), 0);
-	scale = 1 + (100 - pressure_) * 0.05;
-
-        if (fd_logfile_) {
-          time_t now = time(0);
-          char timebuf[32];
-          char* dt = ctime_r(&now, timebuf);
-          size_t dtLen = strlen(timebuf);
-
-          // remove trailing \n from timebuf
-          if (dtLen > 1)
-            timebuf[dtLen-1] = '\0';
-          fprintf(fd_logfile_,
-                  "%s: pctFree=%f, pageFaultRate=%f, (free*normpagefault*commitratio) = (%f
* %f * %f), pressure=%d\n",
-                  timebuf,
-                  percentFree,
-                  pageFaultRate_,
-                  (1 - 4 * percentFree),
-                  (normalizedPageFaultRate / 25),
-                  commitPhysRatio_,
-                  pressure_);
-          fflush(fd_logfile_);
-        }
+	Lng32 prevPressure = pressure_;
+        pressure_ = MAXOF(((1 - 4 * percentFree) * (normalizedPageFaultRate / 25) * commitPhysRatio_),
0);
+        if ((pressure_ != prevPressure) || (currTime_ - logTime_ > LOG_INTERVAL)) {
+           QRLogger::log(CAT_SQL_SSCP, LL_INFO,  
+                 "pctFree=%.3f, pctActive=%.3f, pctInactive=%.3f pageFaultRate=%.3f, (free*normpagefault*commitratio)
= (%.3f * %.3f * %.3f), pressure=%d\n",
+                 percentFree,
+                 percentActive,
+                 percentInactive,
+                 pageFaultRate_,
+                 (1 - 4 * percentFree),
+                 (normalizedPageFaultRate / 25),
+                 commitPhysRatio_,
+                 pressure_);
+           logTime_ = currTime_;
+        } 
 	return;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sql/cli/memorymonitor.h
----------------------------------------------------------------------
diff --git a/core/sql/cli/memorymonitor.h b/core/sql/cli/memorymonitor.h
index fe109e1..36e0b55 100644
--- a/core/sql/cli/memorymonitor.h
+++ b/core/sql/cli/memorymonitor.h
@@ -78,7 +78,7 @@ public:
   Int64 availablePhyMemKb() { return memFree_; }
   static DWORD WINAPI memMonitorUpdateThread(void * param);
 private:
-  void update(float &scale);
+  void update();
   void updatePageFaultRate(Int64 pageFaultValue);
 
 private:
@@ -94,8 +94,11 @@ private:
   float pageFaultRate_;
   Int64 prevPageFault_;
   Int64 prevTime_;
+  Int64 currTime_;
+  Int64 logTime_;
   Int64 memTotal_;
-
+  Int64 memActive_;
+  Int64 memInactive_;
   // Written by monitor thread, and read by main thread.
   Int64 memFree_;   //pages that are free in kb.
   float entryCount_;
@@ -120,7 +123,6 @@ private:
   static ULng32 threadId_;
   FILE* fd_meminfo_;
   FILE* fd_vmstat_;
-  FILE* fd_logfile_;
 };
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sql/executor/ExStats.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExStats.cpp b/core/sql/executor/ExStats.cpp
index 86232ca..02ba58a 100644
--- a/core/sql/executor/ExStats.cpp
+++ b/core/sql/executor/ExStats.cpp
@@ -9799,7 +9799,8 @@ Lng32 ExStatsTcb::str_parse_stmt_name(char *string, Lng32 len, char
*nodeName,
       detailTemp = ptr;
     }
     else
-    if (strncasecmp(ptr, "TDBID_DETAIL", 12) == 0)
+    if ((strncasecmp(ptr, "TDBID_DETAIL", 12) == 0)
+        || (strncasecmp(ptr, "TCBID_DETAIL", 12) == 0))
     {
       ptr = str_tok(NULL, ',', &internal);
       tdbIdDetailTemp = ptr;
@@ -10451,6 +10452,7 @@ ExBMOStats::ExBMOStats(NAMemory *heap,
 {
   init(FALSE);
   spaceBufferSize_ = -1;
+  scratchIOSize_ = -1;
   if (tdb != NULL)
     scratchOverflowMode_ = ((ComTdb *)tdb)->getOverFlowMode();
   else

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sql/qmscommon/QRLogger.h
----------------------------------------------------------------------
diff --git a/core/sql/qmscommon/QRLogger.h b/core/sql/qmscommon/QRLogger.h
index f663849..609c9ac 100644
--- a/core/sql/qmscommon/QRLogger.h
+++ b/core/sql/qmscommon/QRLogger.h
@@ -58,6 +58,7 @@ extern std::string CAT_SQL_COMP_XML;
 extern std::string CAT_SQL_EXE;
 extern std::string CAT_SQL_COMP;
 extern std::string CAT_SQL_ESP;
+extern std::string CAT_SQL_SSCP;
 extern std::string CAT_SQL_PRIVMGR;
 
 // HDFS

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a4df3302/core/sql/regress/core/EXPECTEDRTS
----------------------------------------------------------------------
diff --git a/core/sql/regress/core/EXPECTEDRTS b/core/sql/regress/core/EXPECTEDRTS
index 04648fc..bff1d37 100755
--- a/core/sql/regress/core/EXPECTEDRTS
+++ b/core/sql/regress/core/EXPECTEDRTS
@@ -2180,7 +2180,7 @@ Reply Message Bytes      42,416
  ScrFileCnt    ScrIOSize          ScrIORead       ScrIOWritten           ScrIOTime      
 ScrIOMaxTime
     6       EX_HASH_GRBY               DISK         2       -1               2,638
                        0                  0                  0                 256      
            0
-    0                  0                  0                  0                   0      
            0
+    0                 -1                  0                  0                   0      
            0
 
 --- SQL operation complete.
 >>get statistics for QID MXID11000009156212358279905535000000000000206U3333300_305_S1
PROGRESS;
@@ -2241,7 +2241,7 @@ Reply Message Bytes      42,416
  ScrFileCnt    ScrIOSize          ScrIORead       ScrIOWritten           ScrIOTime      
 ScrIOMaxTime
     6       EX_HASH_GRBY               DISK         2       -1               2,638
                        0                  0                  0                 256      
            0
-    0                  0                  0                  0                   0      
            0
+    0                 -1                  0                  0                   0      
            0
 
 --- SQL operation complete.
 >>log;
@@ -2577,7 +2577,7 @@ Reply Message Bytes      42,416
  ScrFileCnt    ScrIOSize          ScrIORead       ScrIOWritten           ScrIOTime      
 ScrIOMaxTime
     6       EX_HASH_GRBY               DISK         2       -1               2,638
                        0                  0                  0                 256      
            0
-    0                  0                  0                  0                   0      
            0
+    0                 -1                  0                  0                   0      
            0
 
 --- SQL operation complete.
 >>get statistics for qid current progress, options 'sl' ;
@@ -2630,7 +2630,7 @@ Reply Message Bytes      42,416
         1         2                  0                100                  4            
     4            4            0              6,690              3,572 TRAFODION.SCH.TSTAT
 
    Id            TDBName               Mode       DOP     TopN             CPUTime      
      BMOHeapUsed   BMOHeapAllocated          BMOHeapWM       BMOSpaceBufSz      BMOSpaceBufCnt
 ScrFileCnt  ScrIOSize          ScrIORead       ScrIOWritten           ScrIOTime        ScrIOMaxTime
-    6       EX_HASH_GRBY               DISK         2       -1               2,638      
                4              1,024              7,687                 256              
    0    0                  0                  0                  0                   0  
                0
+    6       EX_HASH_GRBY               DISK         2       -1               2,638      
                4              1,024              7,687                 256              
    0    0                -1                  0                  0                   0   
               0
 
 --- SQL operation complete.
 >>get statistics for qid current default ;
@@ -2924,7 +2924,7 @@ Reply Message Bytes      42,416
  ScrFileCnt    ScrIOSize          ScrIORead       ScrIOWritten           ScrIOTime      
 ScrIOMaxTime
     6       EX_HASH_GRBY               DISK         2       -1               2,638
                        0                  0                  0                 256      
            0
-    0                  0                  0                  0                   0      
            0
+    0                 -1                  0                  0                   0      
            0
 
 --- SQL operation complete.
 >>set session default statistics_view_type 'pertable' ;
@@ -3063,7 +3063,7 @@ Reply Message Bytes      45,408
         1         2                  0                100                  4            
     4            4            0              5,679              3,559 TRAFODION.SCH.TSTAT
 
    Id            TDBName               Mode       DOP     TopN             CPUTime      
      BMOHeapUsed   BMOHeapAllocated          BMOHeapWM       BMOSpaceBufSz      BMOSpaceBufCnt
 ScrFileCnt  ScrIOSize          ScrIORead       ScrIOWritten           ScrIOTime        ScrIOMaxTime
-    6       EX_HASH_GRBY               DISK         2       -1               2,760      
                4              1,024              7,687                 256              
    2    0                  0                  0                  0                   0  
                0
+    6       EX_HASH_GRBY               DISK         2       -1               2,760      
                4              1,024              7,687                 256              
    2    0                -1                  0                  0                   0   
               0
 
 --- SQL operation complete.
 >>set statistics default ;
@@ -3187,7 +3187,7 @@ Reply Message Bytes      45,408
         1         2                  0                100                  4            
     4            4            0              3,457              1,846 TRAFODION.SCH.TSTAT
 
    Id            TDBName               Mode       DOP     TopN             CPUTime      
      BMOHeapUsed   BMOHeapAllocated          BMOHeapWM       BMOSpaceBufSz      BMOSpaceBufCnt
 ScrFileCnt  ScrIOSize          ScrIORead       ScrIOWritten           ScrIOTime        ScrIOMaxTime
-    6       EX_HASH_GRBY               DISK         2       -1               2,236      
                4              1,024              7,687                 256              
    2    0                  0                  0                  0                   0  
                0
+    6       EX_HASH_GRBY               DISK         2       -1               2,236      
                4              1,024              7,687                 256              
    2    0                -1                  0                  0                   0   
               0
 
 --- SQL operation complete.
 Qid                      MXID11000009156212358279905535000000000000206U3333300_305_S1


Mime
View raw message