You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/02/09 16:59:29 UTC

[10/21] impala git commit: IMPALA-6478: Remove garbage NativeAddPendingTopicItem log from catalog

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 <dt...@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/e608ac1b
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/e608ac1b
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/e608ac1b

Branch: refs/heads/2.x
Commit: e608ac1b8d4f576c704ad2b915c9312e7ae78cd0
Parents: d609fe1
Author: Tianyi Wang <tw...@cloudera.com>
Authored: Fri Feb 2 18:16:04 2018 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Thu Feb 8 07:01:53 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/e608ac1b/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'.