impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ab...@apache.org
Subject impala git commit: IMPALA-6478: Remove garbage NativeAddPendingTopicItem log from catalog
Date Wed, 07 Feb 2018 22:07:01 GMT
Repository: impala
Updated Branches:
  refs/heads/master 136267e87 -> 36e301db4


IMPALA-6478: Remove garbage NativeAddPendingTopicItem log from catalog

After IMPALA-5990, catalog keeps printing "NativeAddPendingTopicItem
failed" into the log because of the wrongly implemented error handling.
This patch fixes this problem.

Change-Id: Ieb5847a698768c704346371288544a54055bdf1d
Reviewed-on: http://gerrit.cloudera.org:8080/9228
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/36e301db
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/36e301db
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/36e301db

Branch: refs/heads/master
Commit: 36e301db4ba0a00459d4ef573745943fc7f082fe
Parents: 136267e
Author: Tianyi Wang <twang@cloudera.com>
Authored: Fri Feb 2 18:16:04 2018 -0800
Committer: Impala Public Jenkins <impala-public-jenkins@gerrit.cloudera.org>
Committed: Wed Feb 7 21:59:44 2018 +0000

----------------------------------------------------------------------
 be/src/service/fe-support.cc | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/36e301db/be/src/service/fe-support.cc
----------------------------------------------------------------------
diff --git a/be/src/service/fe-support.cc b/be/src/service/fe-support.cc
index d1979e7..bc4afde 100644
--- a/be/src/service/fe-support.cc
+++ b/be/src/service/fe-support.cc
@@ -425,21 +425,26 @@ Java_org_apache_impala_service_FeSupport_NativeLookupSymbol(
 
 // Add a catalog update to pending_topic_updates_.
 extern "C"
-JNIEXPORT void JNICALL
+JNIEXPORT jboolean JNICALL
 Java_org_apache_impala_service_FeSupport_NativeAddPendingTopicItem(JNIEnv* env,
     jclass caller_class, jlong native_catalog_server_ptr, jstring key,
     jbyteArray serialized_object, jboolean deleted) {
   std::string key_string;
   {
     JniUtfCharGuard key_str;
-    if (!JniUtfCharGuard::create(env, key, &key_str).ok()) return;
+    if (!JniUtfCharGuard::create(env, key, &key_str).ok()) {
+      return static_cast<jboolean>(false);
+    }
     key_string.assign(key_str.get());
   }
   JniScopedArrayCritical obj_buf;
-  if (!JniScopedArrayCritical::Create(env, serialized_object, &obj_buf)) return;
+  if (!JniScopedArrayCritical::Create(env, serialized_object, &obj_buf)) {
+    return static_cast<jboolean>(false);
+  }
   reinterpret_cast<CatalogServer*>(native_catalog_server_ptr)->AddPendingTopicItem(
       std::move(key_string), obj_buf.get(), static_cast<uint32_t>(obj_buf.size()),
       deleted);
+  return static_cast<jboolean>(true);
 }
 
 // Get the next catalog update pointed by 'callback_ctx'.


Mime
View raw message