accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phrocker <...@git.apache.org>
Subject [GitHub] accumulo pull request #270: ACCUMULO-4657 Reduce excessive logging / logging...
Date Tue, 20 Jun 2017 19:24:34 GMT
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/270#discussion_r123071638
  
    --- Diff: server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
---
    @@ -894,12 +894,19 @@ public static void removeBulkLoadEntries(Connector conn, String
tableId, long ti
             BatchWriter bw = conn.createBatchWriter(MetadataTable.NAME, new BatchWriterConfig()))
{
           mscanner.setRange(new KeyExtent(tableId, null, null).toMetadataRange());
           mscanner.fetchColumnFamily(TabletsSection.BulkFileColumnFamily.NAME);
    +      boolean shouldTrace = log.isTraceEnabled();
    +      String tidString = Long.toString(tid);
           for (Entry<Key,Value> entry : mscanner) {
    -        log.debug("Looking at entry " + entry + " with tid " + tid);
    -        if (Long.parseLong(entry.getValue().toString()) == tid) {
    -          log.debug("deleting entry " + entry);
    -          Mutation m = new Mutation(entry.getKey().getRow());
    -          m.putDelete(entry.getKey().getColumnFamily(), entry.getKey().getColumnQualifier());
    +        if (shouldTrace) {
    +          log.trace("Looking at entry " + entry + " with tid " + tidString);
    --- End diff --
    
    That's a pretty common paradigm that's used in SLF4J. what do you mean by "Achieves the
same result?" It should achieve the same result. If it does not then there is an issue with
SLF4J, at which point I would agree with you. If it does achieve the same result and the conditional
is unnecessary, then why does it exist?


---
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.
---

Mime
View raw message