accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-3735 Fix the checkstyle/formatting and license header violations.
Date Wed, 26 Aug 2015 03:03:51 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master f7aee5630 -> 2522d6436


ACCUMULO-3735 Fix the checkstyle/formatting and license header violations.


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

Branch: refs/heads/master
Commit: 2522d643601b5bc32833fa72ed22374f1c39d239
Parents: f7aee56
Author: Josh Elser <elserj@apache.org>
Authored: Tue Aug 25 23:03:43 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Aug 25 23:03:43 2015 -0400

----------------------------------------------------------------------
 .../monitor/servlets/BulkImportServlet.java     | 36 ++++++++++----------
 .../util/celltypes/BulkImportStateType.java     | 20 +++++++++--
 .../accumulo/test/BulkImportMonitoringIT.java   | 23 +++++++++++--
 3 files changed, 56 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2522d643/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BulkImportServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BulkImportServlet.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BulkImportServlet.java
index 4be67c6..ad09abe 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BulkImportServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BulkImportServlet.java
@@ -40,26 +40,26 @@ public class BulkImportServlet extends BasicServlet {
   protected String getTitle(HttpServletRequest req) {
     return "Bulk Imports";
   }
-  
+
   static private long duration(long start) {
     return (System.currentTimeMillis() - start) / 1000L;
   }
 
   @Override
   protected void pageBody(HttpServletRequest req, HttpServletResponse response, StringBuilder
sb) throws IOException {
-	  Table table = new Table("masterBulkImportStatus", "Bulk&nbsp;Import&nbsp;Status");
+    Table table = new Table("masterBulkImportStatus", "Bulk&nbsp;Import&nbsp;Status");
     table.addSortableColumn("Directory");
-	  table.addSortableColumn("Age", new DurationType(0l, 5 * 60 * 1000l), "The age the import.");
-	  table.addSortableColumn("State", new BulkImportStateType(), "The current state of the
bulk import");
-	  for (BulkImportStatus bulk : Monitor.getMmi().bulkImports) {
-	    TableRow row = table.prepareRow();
-	    row.add(bulk.filename);
-	    row.add(duration(bulk.startTime));
-	    row.add(bulk.state);
-	    table.addRow(row);
-	  }
-	  table.generate(req, sb);
-	      
+    table.addSortableColumn("Age", new DurationType(0l, 5 * 60 * 1000l), "The age the import.");
+    table.addSortableColumn("State", new BulkImportStateType(), "The current state of the
bulk import");
+    for (BulkImportStatus bulk : Monitor.getMmi().bulkImports) {
+      TableRow row = table.prepareRow();
+      row.add(bulk.filename);
+      row.add(duration(bulk.startTime));
+      row.add(bulk.state);
+      table.addRow(row);
+    }
+    table.generate(req, sb);
+
     table = new Table("bulkImportStatus", "TabletServer&nbsp;Bulk&nbsp;Import&nbsp;Status");
     table.addSortableColumn("Server", new TServerLinkType(), null);
     table.addSortableColumn("#", new PreciseNumberType(0, 20, 0, 100), "Number of imports
presently running");
@@ -72,16 +72,16 @@ public class BulkImportServlet extends BasicServlet {
         row.add(stats.size());
         long oldest = Long.MAX_VALUE;
         for (BulkImportStatus bulk : stats) {
-        	oldest = Math.min(oldest, bulk.startTime);
+          oldest = Math.min(oldest, bulk.startTime);
         }
         if (oldest != Long.MAX_VALUE) {
-        	row.add(duration(oldest));
+          row.add(duration(oldest));
         } else {
-        	row.add(0L);
+          row.add(0L);
         }
       } else {
-    	row.add(0);
-    	row.add(0L);
+        row.add(0);
+        row.add(0L);
       }
       table.addRow(row);
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2522d643/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/BulkImportStateType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/BulkImportStateType.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/BulkImportStateType.java
index 6b4ec52..194278e 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/BulkImportStateType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/BulkImportStateType.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.accumulo.monitor.util.celltypes;
 
 import org.apache.accumulo.core.master.thrift.BulkImportState;
@@ -13,7 +29,7 @@ public class BulkImportStateType extends CellType<BulkImportState>
{
 
   @Override
   public String format(Object obj) {
-    BulkImportState state = (BulkImportState)obj;
+    BulkImportState state = (BulkImportState) obj;
     return state.name();
   }
 
@@ -26,4 +42,4 @@ public class BulkImportStateType extends CellType<BulkImportState>
{
     return o1.compareTo(o2);
   }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2522d643/test/src/main/java/org/apache/accumulo/test/BulkImportMonitoringIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/BulkImportMonitoringIT.java b/test/src/main/java/org/apache/accumulo/test/BulkImportMonitoringIT.java
index 76e2903..7ba253f 100644
--- a/test/src/main/java/org/apache/accumulo/test/BulkImportMonitoringIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/BulkImportMonitoringIT.java
@@ -1,6 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.accumulo.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -43,7 +60,7 @@ public class BulkImportMonitoringIT extends ConfigurableMacBase {
 
   @Test
   public void test() throws Exception {
-	getCluster().getClusterControl().start(ServerType.MONITOR);
+    getCluster().getClusterControl().start(ServerType.MONITOR);
     final Connector c = getConnector();
     final String tableName = getUniqueNames(1)[0];
     c.tableOperations().create(tableName);
@@ -120,7 +137,7 @@ public class BulkImportMonitoringIT extends ConfigurableMacBase {
     assertTrue(stats.bulkImports.size() > 0);
     // look for exception
     for (Future<Object> err : errs) {
-        err.get();
+      err.get();
     }
     es.awaitTermination(2, TimeUnit.MINUTES);
     assertTrue(es.isTerminated());


Mime
View raw message