Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
squito committed Apr 23, 2015
1 parent f2e63ad commit 4c92af6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/apache/spark/status/api/EnumUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public static <E extends Enum<E>> E parseIgnoreCase(Class<E> clz, String str) {
return null;
}
for (E e : constants) {
if (e.name().equalsIgnoreCase(str))
if (e.name().equalsIgnoreCase(str)) {
return e;
}
}
throw new IllegalArgumentException(
String.format("Illegal type='%s'. Supported type values: %s",
str, Joiner.on(", ").join(
Arrays.asList(constants))));
str, Joiner.on(", ").join(constants)));
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.apache.spark.status.api.v1;/*
/*
* 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.
Expand All @@ -15,6 +15,8 @@
* limitations under the License.
*/

package org.apache.spark.status.api.v1;

import org.apache.spark.status.api.EnumUtil;

import java.util.HashSet;
Expand All @@ -25,17 +27,18 @@ public enum TaskSorting {
IncreasingRuntime("runtime"),
DecreasingRuntime("-runtime");

final Set<String> alternateNames;
TaskSorting(String... names) {
private final Set<String> alternateNames;
private TaskSorting(String... names) {
alternateNames = new HashSet<String>();
for (String n: names) {
alternateNames.add(n);
}
}

public static TaskSorting fromString(String str) {
String lower = str.toLowerCase();
for (TaskSorting t: values()) {
if (t.alternateNames.contains(str.toLowerCase())) {
if (t.alternateNames.contains(lower)) {
return t;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class HistoryServer(
def initialize() {
attachPage(new HistoryPage(this))


attachHandler(JsonRootResource.getJsonServlet(this))

attachHandler(createStaticHandler(SparkUI.STATIC_RESOURCE_DIR, "/static"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ private[spark] object AllRDDResource {
(blockId, status, blockLocations.get(blockId).getOrElse(Seq[String]("Unknown")))
}


val dataDistribution = if (includeDetails) {
Some(storageStatusList.map { status =>
new RDDDataDistribution(
Expand Down

0 comments on commit 4c92af6

Please sign in to comment.