SOLR-4507: The Cloud tab does not show up in the Admin UI if you set zkHost in solr.xml.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1450800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-02-27 15:15:03 +00:00
parent 8f5a7b1232
commit aeb50e2050
4 changed files with 11 additions and 2 deletions

View File

@ -183,6 +183,8 @@ Bug Fixes
* SOLR-4480: A trailing + or - caused the edismax parser to throw
an exception. (Fiona Tay, Jan Høydahl, yonik)
* SOLR-4507: The Cloud tab does not show up in the Admin UI if you
set zkHost in solr.xml. (Alfonso Presa, Mark Miller)
Optimizations
----------------------

View File

@ -22,7 +22,8 @@ cp -r -f example example4
cp -r -f example example5
cp -r -f example example6
java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd bootstrap -zkhost 127.0.0.1:9983 -solrhome example/solr -runzk 8983
unzip example/webapps/solr.war -d example/solr-webapp
java -classpath "example/solr-webapp/webapp/WEB-INF/lib/*" org.apache.solr.cloud.ZkCLI -cmd bootstrap -zkhost 127.0.0.1:9983 -solrhome example/solr -runzk 8983
cd example
java -DzkRun -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>example.log 2>&1 &

View File

@ -76,6 +76,8 @@ public class SystemInfoHandler extends RequestHandlerBase
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
{
rsp.add( "core", getCoreInfo( req.getCore() ) );
boolean solrCloudMode = req.getCore().getCoreDescriptor().getCoreContainer().isZooKeeperAware();
rsp.add( "mode", solrCloudMode ? "solrcloud" : "std");
rsp.add( "lucene", getLuceneInfo() );
rsp.add( "jvm", getJvmInfo() );
rsp.add( "system", getSystemInfo() );

View File

@ -408,7 +408,11 @@ var solr_admin = function( app_config )
var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );
environment_args = command_line_args.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
cloud_args = command_line_args.match( /-Dzk/i );
}
if( response.mode )
{
cloud_args = response.mode.match( /solrcloud/i );
}
// title