You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Jason Gerlowski <ge...@gmail.com> on 2017/10/29 19:49:26 UTC

SPLITSHARD and MIGRATE Collection API Response

Hey all,

I was testing some Collections APIs the other day, and noticed a
curious response format for the SPLITSHARD and MIGRATE commands.

Both have a large number of near-duplicate responseHeader sections
with different QTimes.  Is there a reason all these sections are being
returned back to the user?  Is there some meaning that I should be
able to parse out of these sections, but am overlooking?  Examples
below:

      $ curl -ilk -X GET
'http://localhost:8984/solr/admin/collections?action=MIGRATE&collection=techproducts_restore_collection&split.key=!&target.collection=techproducts_migration'
      HTTP/1.1 200 OK
      Content-Type: application/json;charset=utf-8
      Content-Length: 1318

      {
        "responseHeader":{
          "status":0,
          "QTime":9355},
        "success":{
          "127.0.1.1:8984_solr":{
            "responseHeader":{
              "status":0,
              "QTime":0},
            "core":"techproducts_migration_shard1_replica_n1",
            "status":"BUFFERING"},
          "127.0.1.1:8985_solr":{
            "responseHeader":{
              "status":0,
              "QTime":1766},
            "core":"split_shard1_temp_shard1_shard1_replica_n1"},
          "127.0.1.1:8985_solr":{
            "responseHeader":{
              "status":0,
              "QTime":1001}},
          "127.0.1.1:8985_solr":{
            "responseHeader":{
              "status":0,
              "QTime":78}},
          "127.0.1.1:8984_solr":{
            "responseHeader":{
              "status":0,
              "QTime":407},
            "core":"split_shard1_temp_shard1_shard1_replica_n3"},
          "127.0.1.1:8985_solr":{
            "responseHeader":{
              "status":0,
              "QTime":4014}},
          "127.0.1.1:8984_solr":{
            "responseHeader":{
              "status":0,
              "QTime":4}},
          "127.0.1.1:8984_solr":{
            "responseHeader":{
              "status":0,
              "QTime":0},
            "core":"techproducts_migration_shard1_replica_n1",
            "status":"EMPTY_BUFFER"},
          "127.0.1.1:8984_solr":{
            "responseHeader":{
              "status":0,
              "QTime":70}},
          "127.0.1.1:8985_solr":{
            "responseHeader":{
              "status":0,
              "QTime":82}}}}

SPLITSHARD has an almost identical output.  Thanks for any
clarification anyone can offer, just curious.

Best,

Jason

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


Re: SPLITSHARD and MIGRATE Collection API Response

Posted by Anshum Gupta <an...@apple.com>.
Hi Jason,

The history behind responses looking like this is that when collections APIs were added, the top level response to the request but nothing but a list of all the responses from the core level admin requests that were made internally in order to process the request. That is the reason why you see responses with multiple headers.

It certainly wasn’t an oversight and while I think we still should have the responses from internal calls (optionally) returned, it would be much better to clean up the responses to be something that are easy to read and understand.

-Anshum



> On Oct 29, 2017, at 12:49 PM, Jason Gerlowski <ge...@gmail.com> wrote:
> 
> Hey all,
> 
> I was testing some Collections APIs the other day, and noticed a
> curious response format for the SPLITSHARD and MIGRATE commands.
> 
> Both have a large number of near-duplicate responseHeader sections
> with different QTimes.  Is there a reason all these sections are being
> returned back to the user?  Is there some meaning that I should be
> able to parse out of these sections, but am overlooking?  Examples
> below:
> 
>      $ curl -ilk -X GET
> 'http://localhost:8984/solr/admin/collections?action=MIGRATE&collection=techproducts_restore_collection&split.key=!&target.collection=techproducts_migration'
>      HTTP/1.1 200 OK
>      Content-Type: application/json;charset=utf-8
>      Content-Length: 1318
> 
>      {
>        "responseHeader":{
>          "status":0,
>          "QTime":9355},
>        "success":{
>          "127.0.1.1:8984_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":0},
>            "core":"techproducts_migration_shard1_replica_n1",
>            "status":"BUFFERING"},
>          "127.0.1.1:8985_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":1766},
>            "core":"split_shard1_temp_shard1_shard1_replica_n1"},
>          "127.0.1.1:8985_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":1001}},
>          "127.0.1.1:8985_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":78}},
>          "127.0.1.1:8984_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":407},
>            "core":"split_shard1_temp_shard1_shard1_replica_n3"},
>          "127.0.1.1:8985_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":4014}},
>          "127.0.1.1:8984_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":4}},
>          "127.0.1.1:8984_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":0},
>            "core":"techproducts_migration_shard1_replica_n1",
>            "status":"EMPTY_BUFFER"},
>          "127.0.1.1:8984_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":70}},
>          "127.0.1.1:8985_solr":{
>            "responseHeader":{
>              "status":0,
>              "QTime":82}}}}
> 
> SPLITSHARD has an almost identical output.  Thanks for any
> clarification anyone can offer, just curious.
> 
> Best,
> 
> Jason
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>