|
34 | 34 | import com.linkedin.venice.controllerapi.ControllerClient; |
35 | 35 | import com.linkedin.venice.controllerapi.ControllerClientFactory; |
36 | 36 | import com.linkedin.venice.controllerapi.ControllerResponse; |
37 | | -import com.linkedin.venice.controllerapi.D2ControllerClient; |
38 | 37 | import com.linkedin.venice.controllerapi.D2ServiceDiscoveryResponse; |
39 | 38 | import com.linkedin.venice.controllerapi.JobStatusQueryResponse; |
40 | 39 | import com.linkedin.venice.controllerapi.MigrationPushStrategyResponse; |
|
72 | 71 | import com.linkedin.venice.controllerapi.VersionCreationResponse; |
73 | 72 | import com.linkedin.venice.controllerapi.VersionResponse; |
74 | 73 | import com.linkedin.venice.controllerapi.routes.AdminCommandExecutionResponse; |
75 | | -import com.linkedin.venice.d2.D2ClientFactory; |
76 | 74 | import com.linkedin.venice.datarecovery.DataRecoveryClient; |
77 | 75 | import com.linkedin.venice.datarecovery.EstimateDataRecoveryTimeCommand; |
78 | 76 | import com.linkedin.venice.datarecovery.MonitorCommand; |
@@ -2081,7 +2079,7 @@ public static void checkMigrationStatus( |
2081 | 2079 |
|
2082 | 2080 | ChildAwareResponse response = srcControllerClient.listChildControllers(srcClusterName); |
2083 | 2081 |
|
2084 | | - if (response.getChildDataCenterControllerUrlMap() == null && response.getChildDataCenterControllerD2Map() == null) { |
| 2082 | + if (response.getChildDataCenterControllerUrlMap() == null) { |
2085 | 2083 | // This is a controller in single datacenter setup |
2086 | 2084 | printMigrationStatus(srcControllerClient, storeName, printFunction); |
2087 | 2085 | printMigrationStatus(destControllerClient, storeName, printFunction); |
@@ -2127,7 +2125,7 @@ private static void completeMigration(CommandLine cmd) { |
2127 | 2125 | checkPreconditionForStoreMigration(srcControllerClient, destControllerClient); |
2128 | 2126 |
|
2129 | 2127 | ChildAwareResponse response = destControllerClient.listChildControllers(destClusterName); |
2130 | | - if (response.getChildDataCenterControllerUrlMap() == null && response.getChildDataCenterControllerD2Map() == null) { |
| 2128 | + if (response.getChildDataCenterControllerUrlMap() == null) { |
2131 | 2129 | // This is a controller in single datacenter setup |
2132 | 2130 | System.out.println("WARN: fabric option is ignored on child controller."); |
2133 | 2131 | if (isClonedStoreOnline(srcControllerClient, destControllerClient, storeName)) { |
@@ -2262,17 +2260,6 @@ private static Map<String, ControllerClient> getControllerClientMap(String clust |
2262 | 2260 | .forEach( |
2263 | 2261 | (key, value) -> controllerClientMap.put(key, new ControllerClient(clusterName, value, sslFactory))); |
2264 | 2262 | } |
2265 | | - if (response.getChildDataCenterControllerD2Map() != null) { |
2266 | | - // TODO: D2Client |
2267 | | - response.getChildDataCenterControllerD2Map() |
2268 | | - .forEach( |
2269 | | - (key, value) -> controllerClientMap.put( |
2270 | | - key, |
2271 | | - new D2ControllerClient( |
2272 | | - response.getD2ServiceName(), |
2273 | | - clusterName, |
2274 | | - D2ClientFactory.getD2Client(value, sslFactory)))); |
2275 | | - } |
2276 | 2263 | return controllerClientMap; |
2277 | 2264 | }); |
2278 | 2265 | } |
@@ -3306,8 +3293,7 @@ private static void endFabricBuildout(CommandLine cmd) { |
3306 | 3293 | String clusterName = getRequiredArgument(cmd, Arg.CLUSTER); |
3307 | 3294 | try { |
3308 | 3295 | ChildAwareResponse response = checkControllerResponse(controllerClient.listChildControllers(clusterName)); |
3309 | | - if (response.getChildDataCenterControllerUrlMap() == null |
3310 | | - && response.getChildDataCenterControllerD2Map() == null) { |
| 3296 | + if (response.getChildDataCenterControllerUrlMap() == null) { |
3311 | 3297 | throw new VeniceException("ERROR: Child controller could not run fabric buildout commands"); |
3312 | 3298 | } |
3313 | 3299 | System.out.println("Enabling store migration from/to cluster " + clusterName); |
@@ -3686,7 +3672,7 @@ private static Map<String, ControllerClient> getAndCheckChildControllerClientMap |
3686 | 3672 | String srcFabric, |
3687 | 3673 | String destFabric) { |
3688 | 3674 | ChildAwareResponse response = checkControllerResponse(controllerClient.listChildControllers(clusterName)); |
3689 | | - if (response.getChildDataCenterControllerUrlMap() == null && response.getChildDataCenterControllerD2Map() == null) { |
| 3675 | + if (response.getChildDataCenterControllerUrlMap() == null) { |
3690 | 3676 | throw new VeniceException("ERROR: Child controller could not run fabric buildout commands"); |
3691 | 3677 | } |
3692 | 3678 | Map<String, ControllerClient> childControllerClientMap = getControllerClientMap(clusterName, response); |
|
0 commit comments