Looking at this, when we use the ZkCpTool to upload content, I’m not sure it 
goes through the compression step?

Looks like eventually we get to SolrZkClient.setData() and I don’t see anything 
about compression..    Unlike the SolrZkClient.getData()…

Am I reading this right?   Shouldn’t setData mimic getData in handling 
compression?

Thanks for looking at this!



> On Feb 29, 2024, at 12:29 PM, Justin Sweeney <justin.sweene...@gmail.com> 
> wrote:
> 
> I actually think that use case should just work since the SolrZkClient can
> already handle compressed state.json, assuming you are just using the
> default ZLib implementation of compression. When getting data it looks like
> the ZkCpTool calls SolrZkClient.getData() which is able to check if the
> data is compressed.
> 
> On Thu, Feb 29, 2024 at 8:58 AM Eric Pugh <ep...@opensourceconnections.com 
> <mailto:ep...@opensourceconnections.com>>
> wrote:
> 
>> Hi all,
>> 
>> I am poking around ZkCLI.java, and noticed that the compression for a
>> “state.json” file logic is in this file.   I’m realizing that the existing
>> bin/solr zk cp command knows nothing about a “state.json” file being
>> compressed or not, and so if you do
>> 
>>        bin/solr zk cp my_local_state.json zk:/state.json -z localhost:9983
>> 
>> Then I think you don’t get the compression aspect kicking in.
>> 
>> I could copy that logic into the ZkCpTool.java, but wondering if there is
>> a better refactoring?   Could this logic live in either SolrZkClient.java
>> or ZkMaintenanceUtils.java ?
>> 
>> Thoughts?
>> 
>> Eric
>> _______________________
>> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 |
>> http://www.opensourceconnections.com <
>> http://www.opensourceconnections.com/> | My Free/Busy <
>> http://tinyurl.com/eric-cal>
>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <
>> https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
>> 
>> This e-mail and all contents, including attachments, is considered to be
>> Company Confidential unless explicitly stated otherwise, regardless of
>> whether attachments are marked as such.

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | 
http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | 
My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed 
<https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
    
This e-mail and all contents, including attachments, is considered to be 
Company Confidential unless explicitly stated otherwise, regardless of whether 
attachments are marked as such.

Reply via email to