trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #929: [TRAFODION-2455] Add retry to row cou...
Date Thu, 26 Jan 2017 20:57:41 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/929#discussion_r98089783
  
    --- Diff: core/sql/executor/HBaseClient_JNI.cpp ---
    @@ -1303,12 +1304,26 @@ HBC_RetCode HBaseClient_JNI::grant(const Text& user, const
Text& tblName, const
     HBC_RetCode HBaseClient_JNI::estimateRowCount(const char* tblName,
                                                   Int32 partialRowSize,
                                                   Int32 numCols,
    -                                              Int64& rowCount)
    +                                              Int32 retryLimitMilliSeconds,
    +                                              Int64& rowCount,
    +                                              Int32& breadCrumb)
     {
    +  // Note: Please use HBC_ERROR_ROWCOUNT_EST_EXCEPTION only for
    +  // those error returns that call getExceptionDetails(). This
    +  // tells the caller that Java exception information is available.
    +
       QRLogger::log(CAT_SQL_HBASE, LL_DEBUG, "HBaseClient_JNI::estimateRowCount(%s) called.",
tblName);
    -  if (initJNIEnv() != JOI_OK)
    -     return HBC_ERROR_INIT_PARAM;
    +  breadCrumb = 1;
    +  if (jenv_ == NULL)
    +     if (initJVM() != JOI_OK)
    +         return HBC_ERROR_INIT_PARAM;
     
    +  breadCrumb = 2;
    +  if (jenv_->PushLocalFrame(jniHandleCapacity_) != 0) {
    +     getExceptionDetails();
    +     return HBC_ERROR_ROWCOUNT_EST_EXCEPTION;
    +  }
    +  breadCrumb = 3;
    --- End diff --
    
    My mistake... I seem to have accidentally resurrected some old code. Will fix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message