[TRAFODION-2821] Trafodion core code base needs to be thread safe Fixes as per review comments and missed out changes in the commit 073cf68dd4d3
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/cc972543 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/cc972543 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/cc972543 Branch: refs/heads/master Commit: cc972543c49afbc22b4406543ca494c2ad36e0d4 Parents: 073cf68 Author: selvaganesang <[email protected]> Authored: Fri Mar 23 17:52:45 2018 +0000 Committer: selvaganesang <[email protected]> Committed: Fri Mar 23 17:52:45 2018 +0000 ---------------------------------------------------------------------- core/sql/executor/HBaseClient_JNI.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/cc972543/core/sql/executor/HBaseClient_JNI.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/HBaseClient_JNI.cpp b/core/sql/executor/HBaseClient_JNI.cpp index bf9bee1..88c3431 100644 --- a/core/sql/executor/HBaseClient_JNI.cpp +++ b/core/sql/executor/HBaseClient_JNI.cpp @@ -430,6 +430,7 @@ HBC_RetCode HBaseClient_JNI::releaseHTableClient(HTableClient_JNI* htc) jenv_->CallVoidMethod(javaObj_, JavaMethods_[JM_REL_HTC].methodID, j_htc); if (jenv_->ExceptionCheck()) { getExceptionDetails(__FILE__, __LINE__, "HBaseClient_JNI::releaseHTableClient()"); + jenv_->PopLocalFrame(NULL); return HBC_ERROR_REL_HTC_EXCEPTION; } } @@ -902,7 +903,6 @@ HBC_RetCode HBaseClient_JNI::registerTruncateOnAbort(const char* fileName, Int64 if (jenv_->ExceptionCheck()) { getExceptionDetails(__FILE__, __LINE__, "HBaseClient_JNI::drop()"); - logError(CAT_SQL_HBASE, "HBaseClient_JNI::drop()", getLastError()); jenv_->PopLocalFrame(NULL); return HBC_ERROR_DROP_EXCEPTION; } @@ -3318,7 +3318,7 @@ HTC_RetCode HTableClient_JNI::setWriteBufferSize(Int64 size) if (jenv_->ExceptionCheck()) { - logError(CAT_SQL_HBASE, "HTableClient_JNI::setWriteBufferSize()", getLastError()); + getExceptionDetails(__FILE__, __LINE__, "HTableClient_JNI::setWriteBufferSize()"); jenv_->PopLocalFrame(NULL); return HTC_ERROR_WRITEBUFFERSIZE_EXCEPTION; } @@ -3957,6 +3957,13 @@ HVC_RetCode HiveClient_JNI::getAllTables(const char* schName, return HVC_ERROR_GET_ALLTBL_EXCEPTION; } + if (j_tblNames == NULL) + { + GetCliGlobals()->setJniErrorStr(getErrorText(HVC_ERROR_EXISTS_EXCEPTION)); + jenv_->PopLocalFrame(NULL); + return HVC_ERROR_EXISTS_EXCEPTION; + } + int numTables = convertStringObjectArrayToList(heap_, j_tblNames, tblNames); if (numTables == 0) {
