SOLR-10431: Fix precommit

This commit is contained in:
Cao Manh Dat 2017-05-11 09:28:53 +07:00
parent cc8b5bab0b
commit 5a25ef0e77
2 changed files with 1 additions and 3 deletions

View File

@ -1285,7 +1285,7 @@ public class CloudSolrClient extends SolrClient {
Set<String> liveNodes = stateProvider.liveNodes(); Set<String> liveNodes = stateProvider.liveNodes();
if (!liveNodes.isEmpty()) { if (!liveNodes.isEmpty()) {
List<String> liveNodesList = new ArrayList<>(liveNodes); List<String> liveNodesList = new ArrayList<>(liveNodes);
Collections.shuffle(liveNodesList); Collections.shuffle(liveNodesList, rand);
theUrlList.add(ZkStateReader.getBaseUrlForNodeName(liveNodesList.get(0), theUrlList.add(ZkStateReader.getBaseUrlForNodeName(liveNodesList.get(0),
(String) stateProvider.getClusterProperty(ZkStateReader.URL_SCHEME,"http"))); (String) stateProvider.getClusterProperty(ZkStateReader.URL_SCHEME,"http")));
} }

View File

@ -20,8 +20,6 @@ package org.apache.solr.client.solrj.request;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.Reader;
import java.io.StringReader;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;