Solr
  1. Solr
  2. SOLR-3151

Replace zookeeper.jsp with a servlet

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      The zookeeper info is currently generated with a jsp file – making it harder to maintain then it should be, and harder to include in other applications

      1. SOLR-3151-zookeeper-servlet.patch
        17 kB
        Ryan McKinley
      2. SOLR-3151-invalid-json-for-solrconfig.json
        62 kB
        Stefan Matheis (steffkes)

        Issue Links

          Activity

          Hide
          Ryan McKinley added a comment -

          This moves the .jsp to a servlet.

          Can someone with more zookeeper experience (and setup) make sure this is equivalent to what we currently have?

          Show
          Ryan McKinley added a comment - This moves the .jsp to a servlet. Can someone with more zookeeper experience (and setup) make sure this is equivalent to what we currently have?
          Hide
          Erik Hatcher added a comment -

          is this core-specific? I'm not familiar yet with the ZK stuff in Solr, but the servlet patch is core-specific. So that begs the question... why not make this a request handler instead of a servlet? A request handler has the benefit of allowing all usual Solr capabilities especially allowing flexible response writing (JSON, XML, Velocity, etc).

          Show
          Erik Hatcher added a comment - is this core-specific? I'm not familiar yet with the ZK stuff in Solr, but the servlet patch is core-specific. So that begs the question... why not make this a request handler instead of a servlet? A request handler has the benefit of allowing all usual Solr capabilities especially allowing flexible response writing (JSON, XML, Velocity, etc).
          Hide
          Ryan McKinley added a comment -

          The zookeeper stuff is not core-specific, it is at the top level just like CoreAdminHandler. I just copied the code from the jsp and have not really investigated – it only uses the core to get the ZkController: core.getCoreDescriptor().getCoreContainer().getZkController();

          I'm fine with it as a RequestHandler, but this would require more crazy logic in SolrDispatchFilter like we have with CoreAdminHandler.

          any thoughts? I don't use the ZK stuff (yet) so i don't have any opinion, but we need to fix some issues with this to get the new admin UI up-to-snuff

          Show
          Ryan McKinley added a comment - The zookeeper stuff is not core-specific, it is at the top level just like CoreAdminHandler. I just copied the code from the jsp and have not really investigated – it only uses the core to get the ZkController: core.getCoreDescriptor().getCoreContainer().getZkController(); I'm fine with it as a RequestHandler, but this would require more crazy logic in SolrDispatchFilter like we have with CoreAdminHandler. any thoughts? I don't use the ZK stuff (yet) so i don't have any opinion, but we need to fix some issues with this to get the new admin UI up-to-snuff
          Hide
          Stefan Matheis (steffkes) added a comment -

          Just a quick note. Depending on which file you select, the current zookeeper.jsp renders invalid json. That will of course not work for the Javascript-Part, we can of course display a message in that case, but i guess it should be possible to ensure that we return valid json?

          Show
          Stefan Matheis (steffkes) added a comment - Just a quick note. Depending on which file you select, the current zookeeper.jsp renders invalid json. That will of course not work for the Javascript-Part, we can of course display a message in that case, but i guess it should be possible to ensure that we return valid json?
          Hide
          Stefan Matheis (steffkes) added a comment -

          Generated w/ SVN Revision 1245905, is not valid. I don't not all reasons why it's correct but one will be that it contains raw linebreaks, which doesn't fit the specs. more on http://jsonlint.com/

          Show
          Stefan Matheis (steffkes) added a comment - Generated w/ SVN Revision 1245905, is not valid. I don't not all reasons why it's correct but one will be that it contains raw linebreaks, which doesn't fit the specs. more on http://jsonlint.com/
          Hide
          Erik Hatcher added a comment -

          Ok, so definitely not appropriate for this to be a request handler. And yeah, that core admin is crazy stuff - wouldn't allow for a custom (or non-default, thus not Velocity) response writing. Carry on...

          Show
          Erik Hatcher added a comment - Ok, so definitely not appropriate for this to be a request handler. And yeah, that core admin is crazy stuff - wouldn't allow for a custom (or non-default, thus not Velocity) response writing. Carry on...
          Hide
          Ryan McKinley added a comment -

          This is now a servlet, and future improvements can be tracked in SOLR-3155

          Show
          Ryan McKinley added a comment - This is now a servlet, and future improvements can be tracked in SOLR-3155

            People

            • Assignee:
              Unassigned
              Reporter:
              Ryan McKinley
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development