You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Greg Solovyev (JIRA)" <ji...@apache.org> on 2015/05/19 18:18:01 UTC

[jira] [Comment Edited] (SOLR-7567) Replication handler to support restore via upload

    [ https://issues.apache.org/jira/browse/SOLR-7567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14550690#comment-14550690 ] 

Greg Solovyev edited comment on SOLR-7567 at 5/19/15 4:17 PM:
--------------------------------------------------------------

This patch adds restore via upload feature and a unit test. To use this feature in SolrJ use ContentStreamUpdateRequest and omit "name" and "location" parameters. Example of restoring via upload using SolrJ:

  ContentStreamUpdateRequest restoreReq = new ContentStreamUpdateRequest("/replication");
    restoreReq.setParam("command", ReplicationHandler.CMD_RESTORE);
    files = tmpBackupDir.listFiles();
    haveFiles = false;
    if (files != null) {
        for (File f : files) {
            if (f != null && f.getName() != null && f.exists()
                    && f.length() > 0) {
                haveFiles = true;
                restoreReq.addFile(f, "application/octet-stream");
            }
        }
    }


was (Author: grishick):
This patch adds restore via upload feature and a unit test. To use this feature in SolrJ use ContentStreamUpdateRequest and omit "name" and "location" parameters. Example of restoring via upload using SolrJ:

  ContentStreamUpdateRequest restoreReq = new ContentStreamUpdateRequest("/replication");
    restoreReq.setParam("command", ReplicationHandler.CMD_RESTORE);
    files = tmpBackupDir.listFiles();
    haveFiles = false;
    if (files != null) {
        for (File f : files) {
            if (f != null && f.getName() != null && f.exists()
                    && f.length() > 0) {
                haveFiles = true;
                restoreReq.addFile(f, "application/octet-stream");
            }
        }
    }

> Replication handler to support restore via upload
> -------------------------------------------------
>
>                 Key: SOLR-7567
>                 URL: https://issues.apache.org/jira/browse/SOLR-7567
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Greg Solovyev
>             Fix For: Trunk, 5.2
>
>         Attachments: SOLR-7567.patch
>
>
> Sometimes the snapshot is not available on a file system that can be accessed by Solr or SolrCloud. It would be useful to be able to send snapshot  files to Solr over HTTP.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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