From d9f867fbe52c1f363772d49f992b6293a13885cf Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Mon, 26 Aug 2019 08:05:50 +0200 Subject: Revert "Revert "Upgrade to zookeeper 3.4.14, take 3" MERGEOK" --- .../java/com/yahoo/vespa/serviceview/Cluster.java | 8 ++------ .../java/com/yahoo/vespa/serviceview/Service.java | 21 +++++++-------------- .../com/yahoo/vespa/serviceview/ServiceModel.java | 15 ++++++--------- 3 files changed, 15 insertions(+), 29 deletions(-) (limited to 'configserver') diff --git a/configserver/src/main/java/com/yahoo/vespa/serviceview/Cluster.java b/configserver/src/main/java/com/yahoo/vespa/serviceview/Cluster.java index 3b39a85c6b1..d7005de5b07 100644 --- a/configserver/src/main/java/com/yahoo/vespa/serviceview/Cluster.java +++ b/configserver/src/main/java/com/yahoo/vespa/serviceview/Cluster.java @@ -6,22 +6,18 @@ import java.util.List; import com.google.common.collect.ImmutableList; -import edu.umd.cs.findbugs.annotations.NonNull; - /** * Model a single cluster of services in the Vespa model. * - * @author Steinar Knutsen + * @author Steinar Knutsen */ public final class Cluster implements Comparable { - @NonNull + public final String name; - @NonNull public final String type; /** * An ordered list of the service instances in this cluster. */ - @NonNull public final ImmutableList services; public Cluster(String name, String type, List services) { diff --git a/configserver/src/main/java/com/yahoo/vespa/serviceview/Service.java b/configserver/src/main/java/com/yahoo/vespa/serviceview/Service.java index b5d18bdbb1f..f10e2afa046 100644 --- a/configserver/src/main/java/com/yahoo/vespa/serviceview/Service.java +++ b/configserver/src/main/java/com/yahoo/vespa/serviceview/Service.java @@ -1,37 +1,31 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.serviceview; +import com.google.common.collect.ImmutableList; +import com.yahoo.text.Utf8; + import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.List; -import com.google.common.collect.ImmutableList; -import com.yahoo.text.Utf8; - -import edu.umd.cs.findbugs.annotations.NonNull; - /** * Model a single service instance as a sortable object. * - * @author Steinar Knutsen + * @author Steinar Knutsen */ public final class Service implements Comparable { - @NonNull + public final String serviceType; - @NonNull public final String host; public final int statePort; - @NonNull public final String configId; - @NonNull public final List ports; - @NonNull public final String name; public Service(String serviceType, String host, int statePort, String clusterName, String clusterType, - String configId, List ports, String name) { + String configId, List ports, String name) { this.serviceType = serviceType; this.host = host.toLowerCase(); this.statePort = statePort; @@ -59,8 +53,7 @@ public final class Service implements Comparable { * Generate an identifier string for one of the ports of this service * suitable for using in an URL. * - * @param port - * port which this identifier pertains to + * @param port port which this identifier pertains to * @return an opaque identifier string for this service */ public String getIdentifier(int port) { diff --git a/configserver/src/main/java/com/yahoo/vespa/serviceview/ServiceModel.java b/configserver/src/main/java/com/yahoo/vespa/serviceview/ServiceModel.java index c9574ffaa7e..dc6fbb7ebd3 100644 --- a/configserver/src/main/java/com/yahoo/vespa/serviceview/ServiceModel.java +++ b/configserver/src/main/java/com/yahoo/vespa/serviceview/ServiceModel.java @@ -1,12 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.serviceview; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import com.google.common.collect.HashBasedTable; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -19,7 +13,11 @@ import com.yahoo.vespa.serviceview.bindings.ModelResponse; import com.yahoo.vespa.serviceview.bindings.ServicePort; import com.yahoo.vespa.serviceview.bindings.ServiceView; -import edu.umd.cs.findbugs.annotations.NonNull; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static com.yahoo.config.model.api.container.ContainerServiceType.CLUSTERCONTROLLER_CONTAINER; @@ -37,7 +35,6 @@ public final class ServiceModel { /** * An ordered list of the clusters in this config model. */ - @NonNull public final ImmutableList clusters; ServiceModel(ModelResponse modelConfig) { @@ -155,7 +152,7 @@ public final class ServiceModel { } } - private Service getFirstServiceInstanceByType(@NonNull String typeName) { + private Service getFirstServiceInstanceByType(String typeName) { for (Cluster c : clusters) { for (Service s : c.services) { if (typeName.equals(s.serviceType)) { -- cgit v1.2.3