trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sure...@apache.org
Subject [1/3] incubator-trafodion git commit: [TRAFODION-1918] Remove auto flush concept in Trafodion
Date Tue, 05 Apr 2016 21:46:23 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 9a7f871a7 -> 90b5c8f8e


[TRAFODION-1918] Remove auto flush concept in Trafodion

The auto flush is on by default in insertRows method. But insertRows was
incorrectly called with the wrong parameter. In fixing this issue, it was
observed that auto flush is deprecated in HBase 1.x. It is also incorrect
to disable auto flush in Trafodion. Hence removed the code related to
auto flush, flush table and flush all tables in Trafodion.

All these are dormant code in Trafodion.

Also disabled executor/TEST106 for now because it seems to cause a hang
at the time of drop table.


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

Branch: refs/heads/master
Commit: 8fb334ac59f49e23259956b28db932e909bad59d
Parents: a9eae1a
Author: selvaganesang <selva.govindarajan@esgyn.com>
Authored: Tue Apr 5 04:51:29 2016 +0000
Committer: selvaganesang <selva.govindarajan@esgyn.com>
Committed: Tue Apr 5 04:51:29 2016 +0000

----------------------------------------------------------------------
 core/sql/comexe/ComTdbHbaseAccess.h             | 12 +--
 core/sql/executor/ExHbaseAccess.h               |  2 -
 core/sql/executor/ExHbaseIUD.cpp                | 27 +------
 core/sql/executor/HBaseClient_JNI.cpp           | 85 +-------------------
 core/sql/executor/HBaseClient_JNI.h             | 10 +--
 core/sql/executor/ex_control.cpp                |  6 --
 core/sql/exp/ExpHbaseInterface.cpp              | 25 +-----
 core/sql/exp/ExpHbaseInterface.h                | 10 +--
 core/sql/generator/GenRelUpdate.cpp             |  4 -
 core/sql/regress/tools/runregr_executor.ksh     |  2 +-
 core/sql/sqlcomp/DefaultConstants.h             |  1 -
 core/sql/sqlcomp/nadefaults.cpp                 |  1 -
 .../java/org/trafodion/sql/HBaseClient.java     | 15 +---
 .../java/org/trafodion/sql/HTableClient.java    | 15 +---
 14 files changed, 17 insertions(+), 198 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/comexe/ComTdbHbaseAccess.h
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbHbaseAccess.h b/core/sql/comexe/ComTdbHbaseAccess.h
index 51bc7ca..c38f2f4 100644
--- a/core/sql/comexe/ComTdbHbaseAccess.h
+++ b/core/sql/comexe/ComTdbHbaseAccess.h
@@ -748,13 +748,9 @@ public:
     {wbSize_ = v; };
     UInt32 getWBSize() { return wbSize_; };
 
-    void setIsTrafAutoFlush(NABoolean v)
-     {(v ? flags2_ |= TRAF_UPSERT_AUTO_FLUSH : flags2_ &= ~TRAF_UPSERT_AUTO_FLUSH); };
-     NABoolean getIsTrafLoadAutoFlush() { return (flags2_ & TRAF_UPSERT_AUTO_FLUSH) !=
0; };
-
-     void setTrafWriteToWAL(NABoolean v)
-      {(v ? flags2_ |= TRAF_UPSERT_WRITE_TO_WAL : flags2_ &= ~TRAF_UPSERT_WRITE_TO_WAL);
};
-      NABoolean getTrafWriteToWAL() { return (flags2_ & TRAF_UPSERT_WRITE_TO_WAL) !=
0; };
+   void setTrafWriteToWAL(NABoolean v)
+     {(v ? flags2_ |= TRAF_UPSERT_WRITE_TO_WAL : flags2_ &= ~TRAF_UPSERT_WRITE_TO_WAL);
};
+   NABoolean getTrafWriteToWAL() { return (flags2_ & TRAF_UPSERT_WRITE_TO_WAL) != 0;
};
 
   const char * getLoadPrepLocation() const { return LoadPrepLocation_; }
   void setLoadPrepLocation(char * loadPrepLocation) { LoadPrepLocation_ = loadPrepLocation;
 }
@@ -910,7 +906,7 @@ public:
   enum
   {
     TRAF_UPSERT_ADJUST_PARAMS        = 0x0001,
-    TRAF_UPSERT_AUTO_FLUSH           = 0x0002,
+    TRAF_UPSERT_UNUSED               = 0x0002,
     TRAF_UPSERT_WRITE_TO_WAL         = 0x0004,
     TRAF_LOAD_PREP                   = 0x0008,
     TRAF_LOAD_COMPLETION             = 0x0010,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/executor/ExHbaseAccess.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExHbaseAccess.h b/core/sql/executor/ExHbaseAccess.h
index ae32a1c..9b24125 100644
--- a/core/sql/executor/ExHbaseAccess.h
+++ b/core/sql/executor/ExHbaseAccess.h
@@ -840,10 +840,8 @@ public:
     , CHECK_AND_INSERT
     , PROCESS_INSERT
     , PROCESS_INSERT_AND_CLOSE
-    , PROCESS_INSERT_FLUSH_AND_CLOSE
     , RETURN_ROW
     , INSERT_CLOSE
-    , FLUSH_BUFFERS
     , HANDLE_EXCEPTION
     , HANDLE_ERROR
     , DONE

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/executor/ExHbaseIUD.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExHbaseIUD.cpp b/core/sql/executor/ExHbaseIUD.cpp
index 296f6c2..fb275de 100644
--- a/core/sql/executor/ExHbaseIUD.cpp
+++ b/core/sql/executor/ExHbaseIUD.cpp
@@ -762,7 +762,7 @@ ExWorkProcRetcode ExHbaseAccessUpsertVsbbSQTcb::work()
      else if (pentry_down->downState.request == ex_queue::GET_EOD)
           if (currRowNum_ > rowsInserted_)
 	{
-	  step_ = PROCESS_INSERT_FLUSH_AND_CLOSE;
+	  step_ = PROCESS_INSERT_AND_CLOSE;
 	}
         else
         {
@@ -918,7 +918,6 @@ ExWorkProcRetcode ExHbaseAccessUpsertVsbbSQTcb::work()
 	  break;
 
 	case PROCESS_INSERT_AND_CLOSE:
-	case PROCESS_INSERT_FLUSH_AND_CLOSE:
 	  {
             numRowsInVsbbBuffer_ = patchDirectRowBuffers();
 	    
@@ -928,7 +927,6 @@ ExWorkProcRetcode ExHbaseAccessUpsertVsbbSQTcb::work()
                                        rows_,
 				       hbaseAccessTdb().useHbaseXn(),
                                        insColTSval_,
-                                       hbaseAccessTdb().getIsTrafLoadAutoFlush(), 
 				       asyncOperation_);
 
 	    if (setupError(retcode, "ExpHbaseInterface::insertRows")) {
@@ -944,10 +942,7 @@ ExWorkProcRetcode ExHbaseAccessUpsertVsbbSQTcb::work()
 		lastHandledStep_ = step_;
                 step_ = COMPLETE_ASYNC_INSERT;
             }
-            else if (step_ == PROCESS_INSERT_FLUSH_AND_CLOSE)
-	      step_ = FLUSH_BUFFERS;
-	    else if (step_ == PROCESS_INSERT_AND_CLOSE)
-	      step_ = INSERT_CLOSE;
+	    step_ = INSERT_CLOSE;
 	  }
 	  break;
         case COMPLETE_ASYNC_INSERT:
@@ -983,9 +978,7 @@ ExWorkProcRetcode ExHbaseAccessUpsertVsbbSQTcb::work()
             }
             if (step_ == HANDLE_ERROR)
                break;
-            if (lastHandledStep_ == PROCESS_INSERT_FLUSH_AND_CLOSE)
-              step_ = FLUSH_BUFFERS;
-            else if (lastHandledStep_ == PROCESS_INSERT_AND_CLOSE)
+            if (lastHandledStep_ == PROCESS_INSERT_AND_CLOSE)
               step_ = INSERT_CLOSE;
             else
               step_ = ALL_DONE;
@@ -1012,20 +1005,6 @@ ExWorkProcRetcode ExHbaseAccessUpsertVsbbSQTcb::work()
 	  }
 	  break;
 
-	case FLUSH_BUFFERS:
-	  {
-	    // add call to flushBuffers for this table. TBD.
-	    retcode = ehi_->flushTable();
-	    if (setupError(retcode, "ExpHbaseInterface::flushTable"))
-	      {
-		step_ = HANDLE_ERROR;
-		break;
-	      }
-
-	    step_ = INSERT_CLOSE;
-	  }
-	  break;
-
 	case DONE:
         case CLOSE_AND_DONE:
 	case ALL_DONE:

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/executor/HBaseClient_JNI.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/HBaseClient_JNI.cpp b/core/sql/executor/HBaseClient_JNI.cpp
index 7f0fd22..f0d50ab 100644
--- a/core/sql/executor/HBaseClient_JNI.cpp
+++ b/core/sql/executor/HBaseClient_JNI.cpp
@@ -271,8 +271,6 @@ static const char* const hbcErrorEnumStr[] =
  ,"Java exception in drop()."
  ,"Preparing parameters for exists()."
  ,"Java exception in exists()."
- ,"Preparing parameters for flushAll()."
- ,"Java exception in flushAll()." 
  ,"Preparing parameters for grant()."
  ,"Java exception in grant()."
  ,"Preparing parameters for revoke()."
@@ -459,8 +457,6 @@ HBC_RetCode HBaseClient_JNI::init()
     JavaMethods_[JM_GRANT      ].jm_signature = "([B[B[Ljava/lang/Object;)Z";
     JavaMethods_[JM_REVOKE     ].jm_name      = "revoke";
     JavaMethods_[JM_REVOKE     ].jm_signature = "([B[B[Ljava/lang/Object;)Z";
-    JavaMethods_[JM_FLUSHALL   ].jm_name      = "flushAllTables";
-    JavaMethods_[JM_FLUSHALL   ].jm_signature = "()Z";
     JavaMethods_[JM_GET_HBLC   ].jm_name      = "getHBulkLoadClient";
     JavaMethods_[JM_GET_HBLC   ].jm_signature = "()Lorg/trafodion/sql/HBulkLoadClient;";
     JavaMethods_[JM_EST_RC     ].jm_name      = "estimateRowCount";
@@ -492,7 +488,7 @@ HBC_RetCode HBaseClient_JNI::init()
     JavaMethods_[JM_HBC_DIRECT_INSERT_ROW].jm_name      = "insertRow";
     JavaMethods_[JM_HBC_DIRECT_INSERT_ROW].jm_signature = "(JLjava/lang/String;ZJ[BLjava/lang/Object;JZZ)Z";
     JavaMethods_[JM_HBC_DIRECT_INSERT_ROWS].jm_name      = "insertRows";
-    JavaMethods_[JM_HBC_DIRECT_INSERT_ROWS].jm_signature = "(JLjava/lang/String;ZJSLjava/lang/Object;Ljava/lang/Object;JZZ)Z";
+    JavaMethods_[JM_HBC_DIRECT_INSERT_ROWS].jm_signature = "(JLjava/lang/String;ZJSLjava/lang/Object;Ljava/lang/Object;JZ)Z";
     JavaMethods_[JM_HBC_DIRECT_CHECKANDUPDATE_ROW].jm_name      = "checkAndUpdateRow";
     JavaMethods_[JM_HBC_DIRECT_CHECKANDUPDATE_ROW].jm_signature = "(JLjava/lang/String;ZJ[BLjava/lang/Object;[B[BJZ)Z";
     JavaMethods_[JM_HBC_DELETE_ROW ].jm_name      = "deleteRow";
@@ -1228,47 +1224,6 @@ HBC_RetCode HBaseClient_JNI::drop(const char* fileName, bool async,
long transID
 }
 
 //////////////////////////////////////////////////////////////////////////////
-// 
-//////////////////////////////////////////////////////////////////////////////
-HBC_RetCode HBaseClient_JNI::flushAllTablesStatic()
-{
-  return GetCliGlobals()->currContext()->getHBaseClient()->flushAllTables();
-}
-
-HBC_RetCode HBaseClient_JNI::flushAllTables()
-{
-  QRLogger::log(CAT_SQL_HBASE, LL_DEBUG, "HBaseClient_JNI::flushAllTablescalled.");
-  if (jenv_ == NULL)
-     if (initJVM() != JOI_OK)
-         return HBC_ERROR_INIT_PARAM;
-
-  if (jenv_->PushLocalFrame(jniHandleCapacity_) != 0) {
-     getExceptionDetails();
-     return HBC_ERROR_FLUSHALL_EXCEPTION;
-  }
-  tsRecentJMFromJNI = JavaMethods_[JM_FLUSHALL].jm_full_name;
-  jboolean jresult = jenv_->CallBooleanMethod(javaObj_, JavaMethods_[JM_FLUSHALL].methodID);
-
-  if (jenv_->ExceptionCheck())
-  {
-    getExceptionDetails();
-    logError(CAT_SQL_HBASE, __FILE__, __LINE__);
-    logError(CAT_SQL_HBASE, "HBaseClient_JNI::flushAllTables()", getLastError());
-    jenv_->PopLocalFrame(NULL);
-    return HBC_ERROR_FLUSHALL_EXCEPTION;
-  }
-
-  if (jresult == false) 
-  {
-    logError(CAT_SQL_HBASE, "HBaseClient_JNI::flushAllTables()", getLastError());
-    jenv_->PopLocalFrame(NULL);
-    return HBC_ERROR_FLUSHALL_EXCEPTION;
-  }
-  jenv_->PopLocalFrame(NULL);
-  return HBC_OK;
-}
-
-//////////////////////////////////////////////////////////////////////////////
 //
 //////////////////////////////////////////////////////////////////////////////
 HBC_RetCode HBaseClient_JNI::registerTruncateOnAbort(const char* fileName, Int64 transID)
@@ -3041,7 +2996,7 @@ HBC_RetCode HBaseClient_JNI::insertRow(NAHeap *heap, const char *tableName,
 //////////////////////////////////////////////////////////////////////////////
 HBC_RetCode HBaseClient_JNI::insertRows(NAHeap *heap, const char *tableName,
       ExHbaseAccessStats *hbs, bool useTRex, Int64 transID, short rowIDLen, HbaseStr rowIDs,
-      HbaseStr rows, Int64 timestamp, bool autoFlush, bool asyncOperation,
+      HbaseStr rows, Int64 timestamp, bool asyncOperation,
       HTableClient_JNI **outHtc)
 {
   
@@ -3092,14 +3047,13 @@ HBC_RetCode HBaseClient_JNI::insertRows(NAHeap *heap, const char *tableName,
   jlong j_ts = timestamp;
   jlong j_htc = (long)htc;
   jshort j_rowIDLen = rowIDLen;
-  jboolean j_af = autoFlush;
   jboolean j_asyncOperation = asyncOperation;
  
   if (hbs)
     hbs->getHbaseTimer().start();
   tsRecentJMFromJNI = JavaMethods_[JM_HBC_DIRECT_INSERT_ROWS].jm_full_name;
   jboolean jresult = jenv_->CallBooleanMethod(javaObj_, JavaMethods_[JM_HBC_DIRECT_INSERT_ROWS].methodID,

-               	j_htc, js_tblName, j_useTRex, j_tid, j_rowIDLen, jRowIDs, jRows, j_ts, j_af,
j_asyncOperation);
+               	j_htc, js_tblName, j_useTRex, j_tid, j_rowIDLen, jRowIDs, jRows, j_ts, j_asyncOperation);
   if (hbs) {
       hbs->incHbaseCalls();
       if (!asyncOperation)
@@ -3556,7 +3510,6 @@ static const char* const htcErrorEnumStr[] =
  ,"Java exception in revoke()."
  ,"Java exception in getendkeys()."
  ,"Java exception in getHTableName()."
- ,"Java exception in flush()."
  ,"Java exception in getColName()."
  ,"Java exception in getColValue()."
  ,"Java exception in getRowID()."
@@ -3643,8 +3596,6 @@ HTC_RetCode HTableClient_JNI::init()
     JavaMethods_[JM_GET_HTNAME ].jm_signature = "()Ljava/lang/String;";
     JavaMethods_[JM_GETENDKEYS ].jm_name      = "getEndKeys";
     JavaMethods_[JM_GETENDKEYS ].jm_signature = "()Lorg/trafodion/sql/ByteArrayList;";
-    JavaMethods_[JM_FLUSHT     ].jm_name      = "flush";
-    JavaMethods_[JM_FLUSHT     ].jm_signature = "()Z";
     JavaMethods_[JM_SET_WB_SIZE ].jm_name      = "setWriteBufferSize";
     JavaMethods_[JM_SET_WB_SIZE ].jm_signature = "(J)Z";
     JavaMethods_[JM_SET_WRITE_TO_WAL ].jm_name      = "setWriteToWAL";
@@ -4227,36 +4178,6 @@ ByteArrayList* HTableClient_JNI::getKeys(Int32 funcIndex)
 
 }
 
-HTC_RetCode HTableClient_JNI::flushTable()
-{
-  QRLogger::log(CAT_SQL_HBASE, LL_DEBUG, "HTableClient_JNI::flushTable() called.");
-
-  if (jenv_->PushLocalFrame(jniHandleCapacity_) != 0) {
-    getExceptionDetails();
-    return HTC_ERROR_FLUSHTABLE_EXCEPTION;
-  }
-  tsRecentJMFromJNI = JavaMethods_[JM_FLUSHT].jm_full_name;
-  jboolean jresult = jenv_->CallBooleanMethod(javaObj_, JavaMethods_[JM_FLUSHT].methodID);
-
-  if (jenv_->ExceptionCheck())
-  {
-    getExceptionDetails();
-    logError(CAT_SQL_HBASE, __FILE__, __LINE__);
-    logError(CAT_SQL_HBASE, "HTableClient_JNI::flushTable()", getLastError());
-    jenv_->PopLocalFrame(NULL);
-    return HTC_ERROR_FLUSHTABLE_EXCEPTION;
-  }
-
-  if (jresult == false) 
-  {
-    logError(CAT_SQL_HBASE, "HTableClient_JNI::flushTable()", getLastError());
-    jenv_->PopLocalFrame(NULL);
-    return HTC_ERROR_FLUSHTABLE_EXCEPTION;
-  }
-  jenv_->PopLocalFrame(NULL);
-  return HTC_OK;
-}
-
 // ===========================================================================
 // ===== Class HiveClient_JNI
 // ===========================================================================

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/executor/HBaseClient_JNI.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/HBaseClient_JNI.h b/core/sql/executor/HBaseClient_JNI.h
index 89217df..9315024 100644
--- a/core/sql/executor/HBaseClient_JNI.h
+++ b/core/sql/executor/HBaseClient_JNI.h
@@ -175,7 +175,6 @@ typedef enum {
  ,HTC_ERROR_REVOKE_EXCEPTION
  ,HTC_GETENDKEYS
  ,HTC_ERROR_GETHTABLENAME_EXCEPTION
- ,HTC_ERROR_FLUSHTABLE_EXCEPTION
  ,HTC_GET_COLNAME_EXCEPTION
  ,HTC_GET_COLVAL_EXCEPTION
  ,HTC_GET_ROWID_EXCEPTION
@@ -312,7 +311,6 @@ public:
   ByteArrayList* getBeginKeys();
   ByteArrayList* getEndKeys();
 
-  HTC_RetCode flushTable(); 
   void setTableName(const char *tableName)
   {
     Int32 len = strlen(tableName);
@@ -354,7 +352,6 @@ private:
    ,JM_GET_NAME
    ,JM_GET_HTNAME
    ,JM_GETENDKEYS
-   ,JM_FLUSHT
    ,JM_SET_WB_SIZE
    ,JM_SET_WRITE_TO_WAL
    ,JM_FETCH_ROWS
@@ -431,8 +428,6 @@ typedef enum {
  ,HBC_ERROR_LIST_EXCEPTION
  ,HBC_ERROR_EXISTS_PARAM
  ,HBC_ERROR_EXISTS_EXCEPTION
- ,HBC_ERROR_FLUSHALL_PARAM
- ,HBC_ERROR_FLUSHALL_EXCEPTION
  ,HBC_ERROR_GRANT_PARAM
  ,HBC_ERROR_GRANT_EXCEPTION
  ,HBC_ERROR_REVOKE_PARAM
@@ -515,8 +510,6 @@ public:
                    NABoolean force);
   ByteArrayList* listAll(const char* pattern);
   ByteArrayList* getRegionStats(const char* tblName);
-  static HBC_RetCode flushAllTablesStatic();
-  HBC_RetCode flushAllTables();
   HBC_RetCode exists(const char* fileName, Int64 transID);
   HBC_RetCode grant(const Text& user, const Text& tableName, const TextVec& actionCodes);

   HBC_RetCode revoke(const Text& user, const Text& tableName, const TextVec&
actionCodes);
@@ -559,7 +552,7 @@ public:
       HTableClient_JNI **outHtc);
   HBC_RetCode insertRows(NAHeap *heap, const char *tableName,
       ExHbaseAccessStats *hbs, bool useTRex, Int64 transID, short rowIDLen, HbaseStr rowIDs,
-      HbaseStr rows, Int64 timestamp, bool autoFlush, bool asyncOperation,
+      HbaseStr rows, Int64 timestamp,  bool asyncOperation,
       HTableClient_JNI **outHtc);
   HBC_RetCode checkAndUpdateRow(NAHeap *heap, const char *tableName,
       ExHbaseAccessStats *hbs, bool useTRex, Int64 transID, HbaseStr rowID,
@@ -602,7 +595,6 @@ private:
    ,JM_GET_REGION_STATS
    ,JM_COPY
    ,JM_EXISTS
-   ,JM_FLUSHALL
    ,JM_GRANT
    ,JM_REVOKE
    ,JM_GET_HBLC

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/executor/ex_control.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ex_control.cpp b/core/sql/executor/ex_control.cpp
index 8d99ea5..fc12254 100644
--- a/core/sql/executor/ex_control.cpp
+++ b/core/sql/executor/ex_control.cpp
@@ -856,12 +856,6 @@ short ExSetSessionDefaultTcb::work()
 	{
 	  currContext->dropSession();
 	} // DROP
-      else if (strcmp(defaultValue, "FLUSH_TABLES") == 0)
-	{
-	  // add call to flushAllTables to flush all tables populated in this session.
-	  ExpHbaseInterface::flushAllTables();
-	} // FLUSH_BUFFERS
-
     } // USER_SESSION
   else if (strcmp(defaultName, "SQL_USER") == 0)
     {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/exp/ExpHbaseInterface.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpHbaseInterface.cpp b/core/sql/exp/ExpHbaseInterface.cpp
index 6105a6e..c7914d0 100644
--- a/core/sql/exp/ExpHbaseInterface.cpp
+++ b/core/sql/exp/ExpHbaseInterface.cpp
@@ -269,28 +269,6 @@ Lng32 ExpHbaseInterface::coProcAggr(
   return -HBASE_OPEN_ERROR;
 }
 
-Lng32 ExpHbaseInterface_JNI::flushTable()
-{
-  HTC_RetCode retCode = HTC_OK;
-  if (htc_ != NULL)
-     retCode = htc_->flushTable();
-
-  if (retCode != HTC_OK)
-    return HBASE_ACCESS_ERROR;
-  
-  return HBASE_ACCESS_SUCCESS;
-}
-
-Lng32 ExpHbaseInterface::flushAllTables()
-{
-  HBC_RetCode retCode = HBaseClient_JNI::flushAllTablesStatic();
-
-  if (retCode != HBC_OK)
-    return HBASE_ACCESS_ERROR;
-  
-  return HBASE_ACCESS_SUCCESS;
-}
-
 char * getHbaseErrStr(Lng32 errEnum)
 {
   return (char*)hbaseErrorEnumStr[errEnum - (Lng32)HBASE_MIN_ERROR_NUM];
@@ -864,7 +842,6 @@ Lng32 ExpHbaseInterface_JNI::insertRows(
           HbaseStr rows,
 	  NABoolean noXn,
 	  const int64_t timestamp,
-	  NABoolean autoFlush,
           NABoolean asyncOperation)
 {
   HTableClient_JNI *htc;
@@ -875,7 +852,7 @@ Lng32 ExpHbaseInterface_JNI::insertRows(
   else
     transID = getTransactionIDFromContext();
   retCode_ = client_->insertRows((NAHeap *)heap_, tblName.val, hbs_,
-                      useTRex_, transID, rowIDLen, rowIDs, rows, timestamp, autoFlush, asyncOperation,
&htc);
+                      useTRex_, transID, rowIDLen, rowIDs, rows, timestamp, asyncOperation,
&htc);
   if (retCode_ != HBC_OK) {
     return -HBASE_ACCESS_ERROR;
   }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/exp/ExpHbaseInterface.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpHbaseInterface.h b/core/sql/exp/ExpHbaseInterface.h
index aeccee4..f711bcf 100644
--- a/core/sql/exp/ExpHbaseInterface.h
+++ b/core/sql/exp/ExpHbaseInterface.h
@@ -272,8 +272,7 @@ class ExpHbaseInterface : public NABasicObject
                   HbaseStr rows,
 		  NABoolean noXn,
 		  const int64_t timestamp,
-		  NABoolean autoFlush = TRUE,
-                  NABoolean asyncOperation = FALSE) = 0; // by default, flush rows after
put
+                  NABoolean asyncOperation) = 0; 
  
  virtual Lng32 setWriteBufferSize(
                  HbaseStr &tblName,
@@ -362,9 +361,6 @@ class ExpHbaseInterface : public NABasicObject
   virtual ByteArrayList* getRegionBeginKeys(const char*) = 0;
   virtual ByteArrayList* getRegionEndKeys(const char*) = 0;
 
-  virtual Lng32 flushTable() = 0;
-  static Lng32 flushAllTables();
-
   virtual Lng32 estimateRowCount(HbaseStr& tblName,
                                  Int32 partialRowSize,
                                  Int32 numCols,
@@ -576,8 +572,7 @@ class ExpHbaseInterface_JNI : public ExpHbaseInterface
                   HbaseStr rows,
 		  NABoolean noXn,
 		  const int64_t timestamp,
-		  NABoolean autoFlush = TRUE,
-                  NABoolean asyncOperation = FALSE); // by default, flush rows after put
+                  NABoolean asyncOperation); 
   
   virtual Lng32 setWriteBufferSize(
                   HbaseStr &tblName,
@@ -668,7 +663,6 @@ virtual Lng32 initHFileParams(HbaseStr &tblName,
   virtual ByteArrayList* getRegionBeginKeys(const char*);
   virtual ByteArrayList* getRegionEndKeys(const char*);
 
-  virtual Lng32 flushTable();
   virtual Lng32 estimateRowCount(HbaseStr& tblName,
                                  Int32 partialRowSize,
                                  Int32 numCols,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/generator/GenRelUpdate.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelUpdate.cpp b/core/sql/generator/GenRelUpdate.cpp
index 8b35d11..9b8f083 100644
--- a/core/sql/generator/GenRelUpdate.cpp
+++ b/core/sql/generator/GenRelUpdate.cpp
@@ -2986,8 +2986,6 @@ short HbaseInsert::codeGen(Generator *generator)
       if (traf_upsert_adjust_params)
       {
         ULng32 wbSize = getDefault(TRAF_UPSERT_WB_SIZE);
-        NABoolean traf_auto_flush =
-           (CmpCommon::getDefault(TRAF_UPSERT_AUTO_FLUSH) == DF_ON);
         NABoolean traf_write_toWAL =
                    (CmpCommon::getDefault(TRAF_UPSERT_WRITE_TO_WAL) == DF_ON);
 
@@ -2996,8 +2994,6 @@ short HbaseInsert::codeGen(Generator *generator)
         hbasescan_tdb->setCanAdjustTrafParams(true);
 
         hbasescan_tdb->setWBSize(wbSize);
-        hbasescan_tdb->setIsTrafAutoFlush(traf_auto_flush);
-
 
       }
       if (getTableDesc()->getNATable()->isEnabledForDDLQI())

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/regress/tools/runregr_executor.ksh
----------------------------------------------------------------------
diff --git a/core/sql/regress/tools/runregr_executor.ksh b/core/sql/regress/tools/runregr_executor.ksh
index 3411009..21215b3 100755
--- a/core/sql/regress/tools/runregr_executor.ksh
+++ b/core/sql/regress/tools/runregr_executor.ksh
@@ -237,7 +237,7 @@ skippedfiles=
 
 # sbtestfiles contains the list of tests to be run in seabase mode
 if [ "$seabase" -ne 0 ]; then
-  sbtestfiles="TEST001 TEST002 TEST012 TEST013 TEST014 TEST015 TEST016 TEST020 TEST022 TEST025
TEST050 TEST063 TEST088 TEST101 TEST106 TEST107 TEST122 TEST130 TEST131 TEST140"
+  sbtestfiles="TEST001 TEST002 TEST012 TEST013 TEST014 TEST015 TEST016 TEST020 TEST022 TEST025
TEST050 TEST063 TEST088 TEST101 TEST107 TEST122 TEST130 TEST131 TEST140"
   sbprettyfiles=
   for i in $prettyfiles; do
     for j in $sbtestfiles; do

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/DefaultConstants.h b/core/sql/sqlcomp/DefaultConstants.h
index 479c2a5..5c0d13b 100644
--- a/core/sql/sqlcomp/DefaultConstants.h
+++ b/core/sql/sqlcomp/DefaultConstants.h
@@ -3552,7 +3552,6 @@ enum DefaultConstants
   
   TRAF_UPSERT_ADJUST_PARAMS,
   TRAF_UPSERT_WB_SIZE,
-  TRAF_UPSERT_AUTO_FLUSH,
   TRAF_UPSERT_WRITE_TO_WAL,
   TRAF_LOAD_PREP_ADJUST_PART_FUNC,
   TRAF_LOAD_PREP_TMP_LOCATION,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index 42400e1..9d53aea 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -3406,7 +3406,6 @@ XDDkwd__(SUBQUERY_UNNESTING,			"ON"),
   DDint__(TRAF_UNLOAD_HDFS_COMPRESS,                   "0"),
   DDkwd__(TRAF_UNLOAD_SKIP_WRITING_TO_FILES,           "OFF"),
   DDkwd__(TRAF_UPSERT_ADJUST_PARAMS,                   "OFF"),
-  DDkwd__(TRAF_UPSERT_AUTO_FLUSH,                      "OFF"),
   DDkwd__(TRAF_UPSERT_MODE,                            "MERGE"),
   DDint__(TRAF_UPSERT_WB_SIZE,                         "2097152"),
   DDkwd__(TRAF_UPSERT_WRITE_TO_WAL,                    "OFF"),

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
index 74cbeed..f269f95 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HBaseClient.java
@@ -894,7 +894,6 @@ public class HBaseClient {
        } else {
             if (logger.isDebugEnabled()) logger.debug("  ==> Returning existing object,
removing from container.");
             hTableClientsInUse.put(htable.getTableName(), htable);
-            htable.resetAutoFlush();
            htable.setJniObject(jniObject);
             return htable;
        }
@@ -923,17 +922,6 @@ public class HBaseClient {
         }
     }
 
-    public boolean flushAllTables() throws IOException {
-        if (logger.isDebugEnabled()) logger.debug("HBaseClient.flushAllTables() called.");
-       if (hTableClientsInUse.isEmpty()) {
-          return true;
-        }
-        for (HTableClient htable : hTableClientsInUse.values()) {
-		  htable.flush();
-        }
-	return true; 
-    }
-
     public boolean grant(byte[] user, byte[] tblName,
                          Object[] actionCodes) throws IOException {
         if (logger.isDebugEnabled()) logger.debug("HBaseClient.grant(" + new String(user)
+ ", "
@@ -1679,10 +1667,9 @@ public class HBaseClient {
                          Object rowIDs,
                          Object rows,
                          long timestamp,
-                         boolean autoFlush,
                          boolean asyncOperation) throws IOException, InterruptedException,
ExecutionException {
       HTableClient htc = getHTableClient(jniObject, tblName, useTRex);
-      boolean ret = htc.putRows(transID, rowIDLen, rowIDs, rows, timestamp, autoFlush, asyncOperation);
+      boolean ret = htc.putRows(transID, rowIDLen, rowIDs, rows, timestamp, asyncOperation);
       if (asyncOperation == true)
          htc.setJavaObject(jniObject);
       else

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fb334ac/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
index 0b10b08..0760b90 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
@@ -361,10 +361,6 @@ public class HTableClient {
 			return new String(table.getTableName());
 	}
 
-	void resetAutoFlush() {
-		table.setAutoFlush(true, true);
-	}
-
     private enum Op {
         EQUAL, EQUAL_NULL, NOT_EQUAL, NOT_EQUAL_NULL, LESS, LESS_NULL, LESS_OR_EQUAL, LESS_OR_EQUAL_NULL,
GREATER, GREATER_NULL, 
         GREATER_OR_EQUAL, GREATER_OR_EQUAL_NULL, NO_OP, NO_OP_NULL,IS_NULL, IS_NULL_NULL,
IS_NOT_NULL, IS_NOT_NULL_NULL, AND, OR};
@@ -1568,7 +1564,7 @@ public class HTableClient {
 
 	public boolean putRows(final long transID, short rowIDLen, Object rowIDs, 
                        Object rows,
-                       long timestamp, boolean autoFlush, boolean asyncOperation)
+                       long timestamp, boolean asyncOperation)
 			throws IOException, InterruptedException, ExecutionException  {
 
 		if (logger.isTraceEnabled()) logger.trace("Enter putRows() " + tableName);
@@ -1611,8 +1607,6 @@ public class HTableClient {
 				put.setWriteToWAL(writeToWAL);
 			listOfPuts.add(put);
 		}
-		if (autoFlush == false)
-			table.setAutoFlush(false, true);
 		if (asyncOperation) {
 			future = executorService.submit(new Callable() {
 				public Object call() throws Exception {
@@ -1716,11 +1710,6 @@ public class HTableClient {
                     return rcBytes; 
 	}
 
-	public boolean flush() throws IOException {
-		if (table != null)
-			table.flushCommits();
-		return true;
-	}
 
 	public boolean release(boolean cleanJniObject) throws IOException {
 
@@ -1742,8 +1731,6 @@ public class HTableClient {
               }
               future = null;
           }
-	  if (table != null)
-	    table.flushCommits();
 	  if (scanner != null) {
 	    scanner.close();
 	    scanner = null;


Mime
View raw message