From ae314e6d20ba0f4e77e00c4bf3542c39cb3bef46 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Wed, 23 Dec 2020 13:23:37 +0100 Subject: Use just content cluster name as route --- .../src/main/java/com/yahoo/vespaget/DocumentRetriever.java | 2 +- vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java | 2 +- .../src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java | 2 +- .../src/test/java/com/yahoo/vespavisit/VdsVisitTestCase.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'vespaclient-java/src') diff --git a/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java b/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java index db7b6901d7e..21424ac335c 100644 --- a/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java +++ b/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java @@ -116,7 +116,7 @@ public class DocumentRetriever { "The Vespa cluster contains the content clusters %s, not %s. Please select a valid vespa cluster.", names, clusterName)); } - return String.format("[Content:cluster=%s]", clusterDef.getName()); + return clusterDef.getName(); } private LoadType resolveLoadType(String loadTypeName) throws DocumentRetrieverException { diff --git a/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java b/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java index 1eee819a73c..386679abc94 100644 --- a/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java +++ b/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java @@ -600,7 +600,7 @@ public class VdsVisit { names + ". Please use the -c option to select one of them as a target for visiting."); } - return "[Content:cluster=" + found.getName() + "]"; + return found.getName(); } protected static void verbosePrintParameters(VdsVisitParameters vdsParams, PrintStream out) { diff --git a/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java b/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java index 8820658fa02..ea7781e657c 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java @@ -235,7 +235,7 @@ public class DocumentRetrieverTest { @Test public void testClusterLookup() throws DocumentRetrieverException { final String cluster = "storage", - expectedRoute = "[Content:cluster=storage]"; + expectedRoute = "storage"; ClientParameters params = createParameters() .setCluster(cluster) diff --git a/vespaclient-java/src/test/java/com/yahoo/vespavisit/VdsVisitTestCase.java b/vespaclient-java/src/test/java/com/yahoo/vespavisit/VdsVisitTestCase.java index f4d58a671f1..b7412fe9905 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespavisit/VdsVisitTestCase.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespavisit/VdsVisitTestCase.java @@ -232,7 +232,7 @@ public class VdsVisitTestCase { ClusterList clusterList = new ClusterList(clusterDefs); String route = VdsVisit.resolveClusterRoute(clusterList, null); - assertEquals("[Content:cluster=storage]", route); + assertEquals("storage", route); } @Test @@ -270,7 +270,7 @@ public class VdsVisitTestCase { ClusterList clusterList = new ClusterList(clusterDefs); String route = VdsVisit.resolveClusterRoute(clusterList, "storage2"); - assertEquals("[Content:cluster=storage2]", route); + assertEquals("storage2", route); } @Test -- cgit v1.2.3