accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3652) Remove string concatenation in log statements where slf4j is used.
Date Fri, 17 Apr 2015 04:01:01 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499201#comment-14499201
] 

Josh Elser commented on ACCUMULO-3652:
--------------------------------------

Sorry you're having troubles with RB, Bob.

I'm still seeing a bunch of unrelated changes. Perhaps your IDE was a little aggressive in
applying formatting changes to the codebase? For example:

{code}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/DistributedCacheHelper.java
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/DistributedCacheHelper.java
index 4f45e1d..a5e603b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/DistributedCacheHelper.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/DistributedCacheHelper.java
@@ -21,7 +21,6 @@ import java.net.URI;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.mapreduce.filecache.DistributedCache;
 
 /**
  * @since 1.6.0
@@ -33,20 +32,20 @@ public class DistributedCacheHelper {
    * @since 1.6.0
    */
   public static void addCacheFile(URI uri, Configuration conf) {
-    DistributedCache.addCacheFile(uri, conf);
+    org.apache.hadoop.filecache.DistributedCache.addCacheFile(uri, conf);
   }
 
   /**
    * @since 1.6.0
    */
   public static URI[] getCacheFiles(Configuration conf) throws IOException {
-    return DistributedCache.getCacheFiles(conf);
+    return org.apache.hadoop.filecache.DistributedCache.getCacheFiles(conf);
   }
 
   /**
    * @since 1.6.0
    */
   public static Path[] getLocalCacheFiles(Configuration conf) throws IOException {
-    return DistributedCache.getLocalCacheFiles(conf);
+    return org.apache.hadoop.filecache.DistributedCache.getLocalCacheFiles(conf);
   }
 }
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java b/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java
index 0f12d12..c61f6a0 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java
@@ -57,8 +57,7 @@ public class ConfigSanityCheck {
       else if (prop.getType() == PropertyType.PREFIX) {
         log.error("{} incomplete property key ({})", PREFIX, key);
         throw new SanityCheckException(String.format("%s incomplete property key (%s)", PREFIX,
key));
-      }
-      else if (!prop.getType().isValidFormat(value)) {
+      } else if (!prop.getType().isValidFormat(value)) {
         log.error("{} improperly formatted value for key ({}, type={})", PREFIX, key, prop.getType());
         throw new SanityCheckException(String.format("%s improperly formatted value for key
(%s, type=%s)", PREFIX, key, prop.getType()));
       }
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
index 8858811..ddec163 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
@@ -67,7 +67,7 @@ import org.slf4j.LoggerFactory;
 public class LruBlockCache implements BlockCache, HeapSize {
 
   private static final Logger log = LoggerFactory.getLogger(LruBlockCache.class);
-  
+
   /** Default Configuration Parameters */
 
   /** Backing Concurrent Map Configuration */
@@ -393,7 +393,7 @@ public class LruBlockCache implements BlockCache, HeapSize {
       float singleMB = ((float) bucketSingle.totalSize()) / ((float) (1024 * 1024));
       float multiMB = ((float) bucketMulti.totalSize()) / ((float) (1024 * 1024));
       float memoryMB = ((float) bucketMemory.totalSize()) / ((float) (1024 * 1024));
-      
+
       log.debug("Block cache LRU eviction completed. Freed {} bytes.  Priority Sizes: Single={}MB
({}), Multi={}MB ({}), Memory={}MB ({})",
           bytesFreed, singleMB, bucketSingle.totalSize(), multiMB, bucketMulti.totalSize(),
memoryMB, bucketMemory.totalSize());
{code}

It's best to minimize your changeset as much as possible. That way we have very focused commits
changing specific things in the codebase.

> Remove string concatenation in log statements where slf4j is used.
> ------------------------------------------------------------------
>
>                 Key: ACCUMULO-3652
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3652
>             Project: Accumulo
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 1.7.0
>            Reporter: Ed Coleman
>            Assignee: Bob Thorman
>            Priority: Minor
>             Fix For: 1.7.0
>
>         Attachments: ACCUMULO-3652-3.patch
>
>
> As a separate task, continue with the conversion to remove log4j dependencies, modify
log statements where string concatenation is used and replace with {} parameter substitution.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message