drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaltekruse <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-2818, DRILL-3496: Enhanced logging and a...
Date Tue, 21 Jul 2015 18:00:18 GMT
Github user jaltekruse commented on a diff in the pull request:

    --- Diff: common/src/main/java/org/apache/drill/common/config/DrillConfig.java ---
    @@ -44,31 +46,37 @@
     import com.google.common.collect.ImmutableList;
     import com.typesafe.config.Config;
     import com.typesafe.config.ConfigFactory;
    +import com.typesafe.config.ConfigRenderOptions;
     public final class DrillConfig extends NestedConfig{
    -//  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillConfig.class);
    +  private static final Logger logger = getLogger(DrillConfig.class);
       private final ObjectMapper mapper;
       private final ImmutableList<String> startupArguments;
       public static final boolean ON_OSX = System.getProperty("os.name").contains("OS X");
    -  @SuppressWarnings("restriction")  private static final long MAX_DIRECT_MEMORY = sun.misc.VM.maxDirectMemory();
    +  @SuppressWarnings("restriction")
    +  private static final long MAX_DIRECT_MEMORY = sun.misc.VM.maxDirectMemory();
       private volatile List<Queue<Object>> sinkQueues = new CopyOnWriteArrayList<Queue<Object>>(new
    -  public DrillConfig(Config config, boolean enableServer) {
    +  public DrillConfig(Config config, boolean enableServerConfigs) {
    -    logger.debug("Setting up config object.");
    +    logger.debug("Setting up DrillConfig object.");
    +    if (logger.isTraceEnabled()) {
    --- End diff --
    Again I'm not particularly opinionated on this one. If we are trying to establish best
practices, I would argue for leaving out the guard unless you are confident enough about the
need for it that you would put in a comment describing the overhead you are avoiding. Otherwise
we will have inconsistent patterns, and someone might find them and assume we always want
the guards.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message