Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Others] Add config for librdkafka debug #8783

Merged
merged 2 commits into from Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions be/src/common/config.h
Expand Up @@ -23,8 +23,7 @@

#include "configbase.h"

namespace starrocks {
namespace config {
namespace starrocks::config {
// The cluster id.
CONF_Int32(cluster_id, "-1");
// The port on which ImpalaInternalService is exported.
Expand Down Expand Up @@ -761,6 +760,13 @@ CONF_String(starlet_cache_dir, "");

CONF_Int64(lake_metadata_cache_limit, /*2GB=*/"2147483648");

} // namespace config
CONF_mBool(dependency_librdkafka_debug_enable, "false");

} // namespace starrocks
// A comma-separated list of debug contexts to enable.
// Producer debug context: broker, topic, msg
// Consumer debug context: consumer, cgrp, topic, fetch
// Other debug context: generic, metadata, feature, queue, protocol, security, interceptor, plugin
// admin, eos, mock, assigner, conf
CONF_String(dependency_librdkafka_debug, "all");

} // namespace starrocks::config
3 changes: 3 additions & 0 deletions be/src/runtime/routine_load/data_consumer.cpp
Expand Up @@ -89,6 +89,9 @@ Status KafkaDataConsumer::init(StreamLoadContext* ctx) {
RETURN_IF_ERROR(set_conf("auto.offset.reset", "error"));
RETURN_IF_ERROR(set_conf("api.version.request", "true"));
RETURN_IF_ERROR(set_conf("api.version.fallback.ms", "0"));
if (config::dependency_librdkafka_debug_enable) {
RETURN_IF_ERROR(set_conf("debug", config::dependency_librdkafka_debug));
}

for (auto& item : ctx->kafka_info->properties) {
if (boost::algorithm::starts_with(item.second, "FILE:")) {
Expand Down