dsmiley commented on PR #5260:
URL: https://github.com/apache/solr/pull/5260#issuecomment-6471331906
I wish I had a chance to review. The title says "streaming zipDirectory"
but I don't see it. The following method replacement _actually_ streams the
zip (meaning, doesn't use an intermediate temp file). I will get this in at
some point in the future when I return to SolrBackend stuff:
```java
public void uploadConfigSet(Path configDir, String name) throws
SolrServerException, IOException {
new ConfigSetAdminRequest.Upload()
.setConfigSetName(name)
.setUploadContent(new RequestWriter.ContentWriter() {
@Override
public void write(OutputStream os) throws IOException {
// stream it directly out; no intermediate temp file :-)
Utils.zipDirectory(configDir, os);
}
@Override
public String getContentType() {
return "application/zip";
}
})
.process(adminClient);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]