accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [4/4] git commit: ACCUMULO-2477, ACCUMULO-2187 Fix introduced warnings/formatting
Date Tue, 18 Mar 2014 05:11:35 GMT
ACCUMULO-2477, ACCUMULO-2187 Fix introduced warnings/formatting


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/18fee706
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/18fee706
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/18fee706

Branch: refs/heads/master
Commit: 18fee706ba213b2cd6b0aaa587f5da1bfe5aa118
Parents: 053e83f
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Tue Mar 18 01:10:48 2014 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Tue Mar 18 01:10:48 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/core/data/KeyValue.java | 24 ++++++++++++--------
 .../accumulo/core/util/shell/ShellUtil.java     | 14 +++++++-----
 .../org/apache/accumulo/tserver/Tablet.java     | 20 +++++++++-------
 3 files changed, 35 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/18fee706/core/src/main/java/org/apache/accumulo/core/data/KeyValue.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/KeyValue.java b/core/src/main/java/org/apache/accumulo/core/data/KeyValue.java
index 9a0bdbd..afe4411 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/KeyValue.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/KeyValue.java
@@ -23,27 +23,33 @@ import java.util.AbstractMap.SimpleImmutableEntry;
  * A key/value pair. The key and value may not be set after construction.
  */
 public class KeyValue extends SimpleImmutableEntry<Key,Value> {
-  
+
+  private static final long serialVersionUID = 1L;
+
   /**
    * Creates a new key/value pair.
-   *
-   * @param key key
-   * @param value bytes of value
+   * 
+   * @param key
+   *          key
+   * @param value
+   *          bytes of value
    */
   public KeyValue(Key key, byte[] value) {
     super(key, new Value(value, false));
   }
-  
+
   /**
    * Creates a new key/value pair.
-   *
-   * @param key key
-   * @param value buffer containing bytes of value
+   * 
+   * @param key
+   *          key
+   * @param value
+   *          buffer containing bytes of value
    */
   public KeyValue(Key key, ByteBuffer value) {
     super(key, new Value(value));
   }
-  
+
   /**
    * Creates a new key/value pair.
    * 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18fee706/core/src/main/java/org/apache/accumulo/core/util/shell/ShellUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/ShellUtil.java b/core/src/main/java/org/apache/accumulo/core/util/shell/ShellUtil.java
index 30b7824..4f255eb 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/ShellUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/ShellUtil.java
@@ -30,14 +30,16 @@ import com.google.common.collect.Lists;
 public class ShellUtil {
 
   /**
-   * Scans the given file line-by-line (ignoring empty lines) and returns a list
-   * containing those lines. If decode is set to true, every line is decoded using
-   * {@link Base64.decodeBase64} before inserting in the list.
+   * Scans the given file line-by-line (ignoring empty lines) and returns a list containing
those lines. If decode is set to true, every line is decoded using
+   * {@link Base64#decodeBase64(byte[])} from the UTF-8 bytes of that line before inserting
in the list.
    * 
-   * @param filename Path to the file that needs to be scanned
-   * @param decode Whether to decode lines in the file
+   * @param filename
+   *          Path to the file that needs to be scanned
+   * @param decode
+   *          Whether to decode lines in the file
    * @return List of {@link Text} objects containing data in the given file
-   * @throws FileNotFoundException if the given file doesn't exist
+   * @throws FileNotFoundException
+   *           if the given file doesn't exist
    */
   public static List<Text> scanFile(String filename, boolean decode) throws FileNotFoundException
{
     String line;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18fee706/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
index 9ce24be..5a937bc 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
@@ -823,7 +823,7 @@ public class Tablet {
               log.warn("Target map file already exist " + newDatafile);
               fs.deleteRecursively(newDatafile.path());
             }
-            
+
             rename(fs, tmpDatafile.path(), newDatafile.path());
           }
           break;
@@ -956,7 +956,7 @@ public class Tablet {
         // rename before putting in metadata table, so files in metadata table should
         // always exist
         rename(fs, tmpDatafile.path(), newDatafile.path());
-        
+
         if (dfv.getNumEntries() == 0) {
           fs.deleteRecursively(newDatafile.path());
         }
@@ -1056,9 +1056,10 @@ public class Tablet {
     this(tabletServer, location, extent, trm, CachedConfiguration.getInstance(), tabletsKeyValues);
     splitCreationTime = 0;
   }
-  
+
   public Tablet(KeyExtent extent, TabletServer tabletServer, TabletResourceManager trm, SplitInfo
info) throws IOException {
-    this(tabletServer, new Text(info.dir), extent, trm, CachedConfiguration.getInstance(),
info.datafiles, info.time, info.initFlushID, info.initCompactID, info.lastLocation); 
+    this(tabletServer, new Text(info.dir), extent, trm, CachedConfiguration.getInstance(),
info.datafiles, info.time, info.initFlushID, info.initCompactID,
+        info.lastLocation);
     splitCreationTime = System.currentTimeMillis();
   }
 
@@ -1071,7 +1072,8 @@ public class Tablet {
 
   private Tablet(TabletServer tabletServer, Text location, KeyExtent extent, TabletResourceManager
trm, Configuration conf,
       SortedMap<FileRef,DataFileValue> datafiles, String time, long initFlushID, long
initCompactID, TServerInstance lastLocation) throws IOException {
-    this(tabletServer, location, extent, trm, conf, VolumeManagerImpl.get(), EMPTY, datafiles,
time, lastLocation, new HashSet<FileRef>(), initFlushID, initCompactID);
+    this(tabletServer, location, extent, trm, conf, VolumeManagerImpl.get(), EMPTY, datafiles,
time, lastLocation, new HashSet<FileRef>(), initFlushID,
+        initCompactID);
   }
 
   private static String lookupTime(AccumuloConfiguration conf, KeyExtent extent, SortedMap<Key,Value>
tabletsKeyValues) {
@@ -1334,9 +1336,9 @@ public class Tablet {
       }
 
     });
-    
+
     acuTableConf.getNamespaceConfiguration().addObserver(configObserver);
-    
+
     // Force a load of any per-table properties
     configObserver.propertiesChanged();
 
@@ -1451,6 +1453,8 @@ public class Tablet {
   }
 
   public static class KVEntry extends KeyValue {
+    private static final long serialVersionUID = 1L;
+
     public KVEntry(Key k, Value v) {
       super(new Key(k), Arrays.copyOf(v.get(), v.get().length));
     }
@@ -3268,7 +3272,7 @@ public class Tablet {
 
     return smallestFiles;
   }
-  
+
   static void rename(VolumeManager fs, Path src, Path dst) throws IOException {
     if (!fs.rename(src, dst)) {
       throw new IOException("Rename " + src + " to " + dst + " returned false ");


Mime
View raw message