lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Solovyev (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SOLR-7567) Replication handler to support restore via upload
Date Tue, 19 May 2015 16:20:00 GMT

    [ 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:19 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:
{code:java}
    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");
            }
        }
    }
{code}


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:
{code:java}
  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");
            }
        }
    }
{code}

> 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


Mime
View raw message