aboutsummaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2019-08-28 08:04:04 +0200
committerGitHub <noreply@github.com>2019-08-28 08:04:04 +0200
commitf123f4095ceb696159c4753c25488874b3cb8fe3 (patch)
tree5bef15c6ec83afc56828c160b4042f0a18cc05f4 /configserver
parentbd65431ca39696ec242d63e4d378bae1a333e0c9 (diff)
Revert "Revert " Upgrade to zookeeper 3.4.14, take 4""
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/serviceview/Cluster.java8
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/serviceview/Service.java21
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/serviceview/ServiceModel.java15
3 files changed, 15 insertions, 29 deletions
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 <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
+ * @author Steinar Knutsen
*/
public final class Cluster implements Comparable<Cluster> {
- @NonNull
+
public final String name;
- @NonNull
public final String type;
/**
* An ordered list of the service instances in this cluster.
*/
- @NonNull
public final ImmutableList<Service> services;
public Cluster(String name, String type, List<Service> 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 <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
+ * @author Steinar Knutsen
*/
public final class Service implements Comparable<Service> {
- @NonNull
+
public final String serviceType;
- @NonNull
public final String host;
public final int statePort;
- @NonNull
public final String configId;
- @NonNull
public final List<Integer> ports;
- @NonNull
public final String name;
public Service(String serviceType, String host, int statePort, String clusterName, String clusterType,
- String configId, List<Integer> ports, String name) {
+ String configId, List<Integer> ports, String name) {
this.serviceType = serviceType;
this.host = host.toLowerCase();
this.statePort = statePort;
@@ -59,8 +53,7 @@ public final class Service implements Comparable<Service> {
* 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<Cluster> 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)) {