You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2012/09/22 15:12:10 UTC

[jira] [Created] (SOLR-3867) admin gui cloud views broken

Yonik Seeley created SOLR-3867:
----------------------------------

             Summary: admin gui cloud views broken
                 Key: SOLR-3867
                 URL: https://issues.apache.org/jira/browse/SOLR-3867
             Project: Solr
          Issue Type: Bug
          Components: SolrCloud
            Reporter: Yonik Seeley
            Priority: Critical
             Fix For: 4.0


The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3867) admin gui cloud views broken

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461158#comment-13461158 ] 

Yonik Seeley commented on SOLR-3867:
------------------------------------

Or maybe it should be easy for someone familiar with js/ajax - but my attempt has failed so far.

{code}
Index: solr/webapp/web/js/scripts/cloud.js
===================================================================
--- solr/webapp/web/js/scripts/cloud.js	(revision 1388800)
+++ solr/webapp/web/js/scripts/cloud.js	(working copy)
@@ -1,4 +1,4 @@
-/*
+tate[c]*
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
@@ -372,11 +372,12 @@
                 for( var s in state[c] )
                 {
                   var nodes = [];
-                  for( var n in state[c][s] )
+                  for( var n in state[c][s].replicas )
                   {
                     leaf_count++;
+                    var replica = state[c][s].replicas[n]
 
-                    var uri = state[c][s][n].base_url;
+                    var uri = replica.base_url;
                     var parts = uri.match( /^(\w+:)\/\/(([\w\d\.-]+)(:(\d+))?)(.+)$/ );
                     var uri_parts = {
                       protocol: parts[1],
@@ -392,9 +393,9 @@
                     helper_data.port.push( uri_parts.port );
                     helper_data.pathname.push( uri_parts.pathname );
 
-                    var status = state[c][s][n].state;
+                    var status = replica.state;
 
-                    if( !live_nodes[state[c][s][n].node_name] )
+                    if( !live_nodes[replica.node_name] )
                     {
                       status = 'gone';
                     }
@@ -404,7 +405,7 @@
                       data: {
                         type : 'node',
                         state : status,
-                        leader : 'true' === state[c][s][n].leader,
+                        leader : 'true' === replica.leader,
                         uri : uri_parts
                       }
                     };
@@ -715,4 +716,4 @@
       }
     );
   }
-);
\ No newline at end of file
+);
{code}

I just get a blank view though, so not sure how one goes about debugging these things...
                
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3867) admin gui cloud views broken

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-3867:
------------------------------

         Priority: Blocker  (was: Critical)
    Fix Version/s: 5.0
    
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3867) admin gui cloud views broken

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461161#comment-13461161 ] 

Mark Miller commented on SOLR-3867:
-----------------------------------

I hate javascript, but I'll take a look today.
                
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (SOLR-3867) admin gui cloud views broken

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-3867.
--------------------------------

    Resolution: Fixed

Committed trunk, 4x, 40x:
http://svn.apache.org/viewvc?rev=1388833&view=rev
                
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Comment Edited] (SOLR-3867) admin gui cloud views broken

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461158#comment-13461158 ] 

Yonik Seeley edited comment on SOLR-3867 at 9/23/12 12:59 AM:
--------------------------------------------------------------

Or maybe it should be easy for someone familiar with js/ajax - but my attempt has failed so far.

{code}
Index: solr/webapp/web/js/scripts/cloud.js
===================================================================
--- solr/webapp/web/js/scripts/cloud.js	(revision 1388800)
+++ solr/webapp/web/js/scripts/cloud.js	(working copy)
@@ -1,4 +1,4 @@
-/*
+tate[c]*
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
@@ -372,11 +372,12 @@
                 for( var s in state[c] )
                 {
                   var nodes = [];
-                  for( var n in state[c][s] )
+                  for( var n in state[c][s].replicas )
                   {
                     leaf_count++;
+                    var replica = state[c][s].replicas[n]
 
-                    var uri = state[c][s][n].base_url;
+                    var uri = replica.base_url;
                     var parts = uri.match( /^(\w+:)\/\/(([\w\d\.-]+)(:(\d+))?)(.+)$/ );
                     var uri_parts = {
                       protocol: parts[1],
@@ -392,9 +393,9 @@
                     helper_data.port.push( uri_parts.port );
                     helper_data.pathname.push( uri_parts.pathname );
 
-                    var status = state[c][s][n].state;
+                    var status = replica.state;
 
-                    if( !live_nodes[state[c][s][n].node_name] )
+                    if( !live_nodes[replica.node_name] )
                     {
                       status = 'gone';
                     }
@@ -404,7 +405,7 @@
                       data: {
                         type : 'node',
                         state : status,
-                        leader : 'true' === state[c][s][n].leader,
+                        leader : 'true' === replica.leader,
                         uri : uri_parts
                       }
                     };
@@ -715,4 +716,4 @@
       }
     );
   }
-);
\ No newline at end of file
+);
{code}

I just get a blank view though, so not sure how one goes about debugging these things...

edit: Heh - I saw the errant paste in the first line of the file after I pasted the diff in here.  Looks like this approach does work.
                
      was (Author: yseeley@gmail.com):
    Or maybe it should be easy for someone familiar with js/ajax - but my attempt has failed so far.

{code}
Index: solr/webapp/web/js/scripts/cloud.js
===================================================================
--- solr/webapp/web/js/scripts/cloud.js	(revision 1388800)
+++ solr/webapp/web/js/scripts/cloud.js	(working copy)
@@ -1,4 +1,4 @@
-/*
+tate[c]*
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
@@ -372,11 +372,12 @@
                 for( var s in state[c] )
                 {
                   var nodes = [];
-                  for( var n in state[c][s] )
+                  for( var n in state[c][s].replicas )
                   {
                     leaf_count++;
+                    var replica = state[c][s].replicas[n]
 
-                    var uri = state[c][s][n].base_url;
+                    var uri = replica.base_url;
                     var parts = uri.match( /^(\w+:)\/\/(([\w\d\.-]+)(:(\d+))?)(.+)$/ );
                     var uri_parts = {
                       protocol: parts[1],
@@ -392,9 +393,9 @@
                     helper_data.port.push( uri_parts.port );
                     helper_data.pathname.push( uri_parts.pathname );
 
-                    var status = state[c][s][n].state;
+                    var status = replica.state;
 
-                    if( !live_nodes[state[c][s][n].node_name] )
+                    if( !live_nodes[replica.node_name] )
                     {
                       status = 'gone';
                     }
@@ -404,7 +405,7 @@
                       data: {
                         type : 'node',
                         state : status,
-                        leader : 'true' === state[c][s][n].leader,
+                        leader : 'true' === replica.leader,
                         uri : uri_parts
                       }
                     };
@@ -715,4 +716,4 @@
       }
     );
   }
-);
\ No newline at end of file
+);
{code}

I just get a blank view though, so not sure how one goes about debugging these things...
                  
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3867) admin gui cloud views broken

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461154#comment-13461154 ] 

Yonik Seeley commented on SOLR-3867:
------------------------------------

I'm looking at it now... think the fix is easy.
                
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3867) admin gui cloud views broken

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461150#comment-13461150 ] 

Mark Miller commented on SOLR-3867:
-----------------------------------

I changed this to blocker - we can't release 4.0 with a broken SolrCloud UI :) 
                
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3867) admin gui cloud views broken

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461201#comment-13461201 ] 

Mark Miller commented on SOLR-3867:
-----------------------------------

bq. edit: Heh - I saw the errant paste in the first line of the file after I pasted the diff in here. Looks like this approach does work.

Didn't catch this edit - great. 

I'm going to try and do some thorough testing today and tomorrow.
                
> admin gui cloud views broken
> ----------------------------
>
>                 Key: SOLR-3867
>                 URL: https://issues.apache.org/jira/browse/SOLR-3867
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>
>
> The cloud tree view works (the one that shows the raw contents of ZK), but the other views (like graph) don't work.  This is probably due to the recent custerstate.json changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org