You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Andrew Wong (Code Review)" <ge...@cloudera.org> on 2020/04/03 08:08:02 UTC

[kudu-CR] ranger: enable log4j2 logging to files

Hello Attila Bukor, Kudu Jenkins, Adar Dembo, Grant Henke, Hao Hao, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/15628

to look at the new patch set (#6).

Change subject: ranger: enable log4j2 logging to files
......................................................................

ranger: enable log4j2 logging to files

This patch enables Kudu to generate a log4j2 properties file and pass it
to the Ranger client. This file is created in a directory specified by
the new --ranger_logging_config_dir flag, which, by default, will direct
the properties file to --log_dir. If the file already exists, the
existing file is honored.

This properties file will direct logs to directory pointed to by
--log_dir, and will honor the existing --max_log_files and
--max_log_size flags.

I've found logging to stdout and log42j debug-level logging to be
useful, so this also adds --ranger_logtostdout and
--ranger_enable_debug_logging for these respectively. I opted not to
use the glog --minloglevel flag since they don't quite map to log4j2 log
levels (e.g. glog doesn't have debug-level logging).

I manually tested that an existing properties file that has been
modified will be honored. Here's what's in a Ranger-configured Kudu
master's log directory:
 kudu-master.INFO -> kudu-master.awong-MBP16-21621.local.awong.log.INFO.20200403-005921.5395
 kudu-master.awong-MBP16-21621.local.awong.diagnostics.20200403-005349.0.5236
 kudu-master.awong-MBP16-21621.local.awong.diagnostics.20200403-005609.0.5320
 kudu-master.awong-MBP16-21621.local.awong.diagnostics.20200403-005921.0.5395
 kudu-master.awong-MBP16-21621.local.awong.log.INFO.20200403-005349.5236
 kudu-master.awong-MBP16-21621.local.awong.log.INFO.20200403-005609.5320
 kudu-master.awong-MBP16-21621.local.awong.log.INFO.20200403-005921.5395
 kudu-ranger-client-log4j2.properties
 kudu-ranger-client.awong-MBP16-21621.local.20200403-005349.log.gz
 kudu-ranger-client.awong-MBP16-21621.local.log

Change-Id: I7efa631832c219fce214304538e6ab6442062752
---
M java/gradle/dependencies.gradle
M java/kudu-subprocess/build.gradle
M src/kudu/ranger/mini_ranger.cc
M src/kudu/ranger/mini_ranger.h
M src/kudu/ranger/ranger_client-test.cc
M src/kudu/ranger/ranger_client.cc
M src/kudu/subprocess/subprocess_proxy.h
M src/kudu/util/env.h
8 files changed, 293 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/28/15628/6
-- 
To view, visit http://gerrit.cloudera.org:8080/15628
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7efa631832c219fce214304538e6ab6442062752
Gerrit-Change-Number: 15628
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)