Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A139108C4 for ; Wed, 26 Aug 2015 03:03:52 +0000 (UTC) Received: (qmail 2566 invoked by uid 500); 26 Aug 2015 03:03:52 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 2532 invoked by uid 500); 26 Aug 2015 03:03:52 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 2523 invoked by uid 99); 26 Aug 2015 03:03:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2015 03:03:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B4AB7E03A8; Wed, 26 Aug 2015 03:03:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Message-Id: <3def171adf794b499cd18462bb737c8d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: accumulo git commit: ACCUMULO-3735 Fix the checkstyle/formatting and license header violations. Date: Wed, 26 Aug 2015 03:03:51 +0000 (UTC) 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 Authored: Tue Aug 25 23:03:43 2015 -0400 Committer: Josh Elser 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 Import Status"); + Table table = new Table("masterBulkImportStatus", "Bulk Import 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 Bulk Import 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 { @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 { 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 err : errs) { - err.get(); + err.get(); } es.awaitTermination(2, TimeUnit.MINUTES); assertTrue(es.isTerminated());