You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Prachi Garg <pg...@gridgain.com> on 2018/06/12 23:13:40 UTC

How to create a cache with 2 backups using REST

Hi Alexey,

I used the following command to create a cache with 2 backups -
http://localhost:8080/ignite?cmd=getorcreate&cacheName=myNewPartionedCache&backups=2

This is the response -
{“successStatus”:0,“error”:null,“response”:null,“sessionToken”:null}

Here, it does not give me much info in the response. Looking at the status,
which is 0, I can just assume that everything went ok.(I guess..)

Then I try to get the cache metadata, using this command -
http://localhost:8080/ignite?cmd=metadata&cacheName=myNewPartionedCache

I get this error - {“successStatus”:1,“error”:“Failed to handle request:
[req=CACHE_METADATA, err=Failed to request meta data. myNewPartionedCache
is not found]“,”response”:null,“sessionToken”:null}

What am I missing here?

-P

Re: How to create a cache with 2 backups using REST

Posted by Alexey Kuznetsov <ak...@apache.org>.
Prachi,

This is a bug in REST "metadata"command.

I created issue: REST: metadata command failed on cluster of size 1.
https://issues.apache.org/jira/browse/IGNITE-8777

If you start 2 nodes,  "metadata"command will be executed correctly.


On Wed, Jun 13, 2018 at 6:13 AM, Prachi Garg <pg...@gridgain.com> wrote:

> Hi Alexey,
>
> I used the following command to create a cache with 2 backups -
> http://localhost:8080/ignite?cmd=getorcreate&cacheName=
> myNewPartionedCache&backups=2
>
> This is the response - {“successStatus”:0,“error”:null,“response”:null,“
> sessionToken”:null}
>
> Here, it does not give me much info in the response. Looking at the
> status, which is 0, I can just assume that everything went ok.(I guess..)
>
> Then I try to get the cache metadata, using this command -
> http://localhost:8080/ignite?cmd=metadata&cacheName=myNewPartionedCache
>
> I get this error - {“successStatus”:1,“error”:“Failed to handle request:
> [req=CACHE_METADATA, err=Failed to request meta data. myNewPartionedCache
> is not found]“,”response”:null,“sessionToken”:null}
>
> What am I missing here?
>
> -P
>



-- 
Alexey Kuznetsov