accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject svn commit: r1483435 - in /accumulo/branches/1.5: core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java server/src/main/java/org/apache/accumulo/server/Accumulo.java
Date Thu, 16 May 2013 16:20:21 GMT
Author: ctubbsii
Date: Thu May 16 16:20:21 2013
New Revision: 1483435

URL: http://svn.apache.org/r1483435
Log:
ACCUMULO-1421 fix warnings introduced by previous commits

Modified:
    accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/Accumulo.java

Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java?rev=1483435&r1=1483434&r2=1483435&view=diff
==============================================================================
--- accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
(original)
+++ accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
Thu May 16 16:20:21 2013
@@ -785,7 +785,8 @@ public abstract class InputFormatBase<K,
         // its possible that the cache could contain complete, but old information about
a tables tablets... so clear it
         tl.invalidateCache();
         while (!tl.binRanges(ranges, binnedRanges,
-            new TCredentials(getPrincipal(context), getTokenClass(context), ByteBuffer.wrap(getToken(context)),
getInstance(context).getInstanceID())).isEmpty()) {
+            new TCredentials(getPrincipal(context), getTokenClass(context), ByteBuffer.wrap(getToken(context)),
getInstance(context).getInstanceID()))
+            .isEmpty()) {
           if (!(instance instanceof MockInstance)) {
             if (tableId == null)
               tableId = Tables.getTableId(instance, tableName);
@@ -1342,14 +1343,14 @@ public abstract class InputFormatBase<K,
     }
     
   }
-
+  
   // use reflection to pull the Configuration out of the JobContext for Hadoop 1 and Hadoop
2 compatibility
   public static Configuration getConfiguration(JobContext context) {
     try {
-      Class c = InputFormatBase.class.getClassLoader().loadClass("org.apache.hadoop.mapreduce.JobContext");
+      Class<?> c = InputFormatBase.class.getClassLoader().loadClass("org.apache.hadoop.mapreduce.JobContext");
       Method m = c.getMethod("getConfiguration");
       Object o = m.invoke(context, new Object[0]);
-      return (Configuration)o;
+      return (Configuration) o;
     } catch (Exception e) {
       throw new RuntimeException(e);
     }

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1483435&r1=1483434&r2=1483435&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/Accumulo.java (original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/Accumulo.java Thu
May 16 16:20:21 2013
@@ -40,7 +40,6 @@ import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
-import org.apache.hadoop.hdfs.protocol.FSConstants;
 import org.apache.log4j.Logger;
 import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.xml.DOMConfigurator;
@@ -212,12 +211,12 @@ public class Accumulo {
     }
     log.info("Connected to HDFS");
   }
-
+  
   private static boolean isInSafeMode(FileSystem fs) throws IOException {
     if (!(fs instanceof DistributedFileSystem))
       return false;
     DistributedFileSystem dfs = (DistributedFileSystem) FileSystem.get(CachedConfiguration.getInstance());
-    // So this:  if (!dfs.setSafeMode(SafeModeAction.SAFEMODE_GET))
+    // So this: if (!dfs.setSafeMode(SafeModeAction.SAFEMODE_GET))
     // Becomes this:
     Class<?> constantClass;
     try {
@@ -252,7 +251,7 @@ public class Accumulo {
     }
     try {
       Method setSafeMode = dfs.getClass().getMethod("setSafeMode", safeModeAction);
-      return (Boolean)setSafeMode.invoke(dfs, get);
+      return (Boolean) setSafeMode.invoke(dfs, get);
     } catch (Exception ex) {
       throw new RuntimeException("cannot find method setSafeMode");
     }



Mime
View raw message