impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharath Vissapragada (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4822: Implement dynamic log level changes
Date Tue, 28 Feb 2017 01:33:43 GMT
Bharath Vissapragada has posted comments on this change.

Change subject: IMPALA-4822: Implement dynamic log level changes
......................................................................


Patch Set 13:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5792/13/be/src/util/logging-support.cc
File be/src/util/logging-support.cc:

Line 40
> Does that mean that severities that get mapped to VLOG will always get prin
Yes, Interestingly that has always been the behavior (even without this patch because --v=1
is the default). We have the following mapping that we use to translate. I'm not totally sure
what the rationale is behind this mapping.

  private TLogLevel levelToSeverity(Level level) {
    Preconditions.checkState(!level.equals(Level.OFF));
    // TODO: Level does not work well in a HashMap or switch statement due to some
    // strangeness with equality testing.
    if (level.equals(Level.TRACE)) return TLogLevel.VLOG_3;
    if (level.equals(Level.ALL)) return TLogLevel.VLOG_3;
    if (level.equals(Level.DEBUG)) return TLogLevel.VLOG;
    if (level.equals(Level.ERROR)) return TLogLevel.ERROR;
    if (level.equals(Level.FATAL)) return TLogLevel.FATAL;
    if (level.equals(Level.INFO)) return TLogLevel.INFO;
    if (level.equals(Level.WARN)) return TLogLevel.WARN;
 throw new IllegalStateException("Unknown log level: " + level.toString());
  }


-- 
To view, visit http://gerrit.cloudera.org:8080/5792
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I588418e9bcb0b66d33138baf96207a5a35bfbd63
Gerrit-PatchSet: 13
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message