From 7a8db2fcffc69d8939fd8f1b1f41d8c23bd9b049 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Tue, 28 Feb 2012 22:25:29 +0000 Subject: [PATCH] use qt param git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1294862 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/solr/handler/admin/CoreAdminHandler.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java index b513efa8d13..55614352a35 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java @@ -777,8 +777,9 @@ public class CoreAdminHandler extends RequestHandlerBase { final ZkNodeProps node = shardEntry.getValue(); if (cloudState.liveNodesContain(node.get(ZkStateReader.NODE_NAME_PROP))) { newParams.set(CoreAdminParams.CORE, node.get(ZkStateReader.CORE_NAME_PROP)); - String replica = node.get(ZkStateReader.BASE_URL_PROP) + "/admin/cores"; + String replica = node.get(ZkStateReader.BASE_URL_PROP); ShardRequest sreq = new ShardRequest(); + newParams.set("qt", "/admin/cores"); sreq.purpose = 1; // TODO: this sucks if (replica.startsWith("http://")) @@ -795,9 +796,11 @@ public class CoreAdminHandler extends RequestHandlerBase { ShardResponse srsp; do { srsp = shardHandler.takeCompletedOrError(); - Throwable e = srsp.getException(); - if (e != null) { - log.error("Error talking to shard: " + srsp.getShard(), e); + if (srsp != null) { + Throwable e = srsp.getException(); + if (e != null) { + log.error("Error talking to shard: " + srsp.getShard(), e); + } } } while(srsp != null);