[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15670149#comment-15670149
 ] 

ASF GitHub Bot commented on IGNITE-3066:


Github user asfgit closed the pull request at:

https://github.com/apache/ignite/pull/1212


> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-15 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15669281#comment-15669281
 ] 

Roman Shtykh commented on IGNITE-3066:
--

1) One addition. I chose to call REST commands as I understood from the 
comments from Yakov (see IGNITE-2788) I have to do this way. I might 
misunderstood though. Do you think we should use cache API directly for all 
commands? If you have a better idea, please advise.
Anyway, it's a rather big refactoring that can be done as a next step.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-15 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15669270#comment-15669270
 ] 

Roman Shtykh commented on IGNITE-3066:
--

Andrey, I enforced operations on strings.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-15 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15666886#comment-15666886
 ] 

Roman Shtykh commented on IGNITE-3066:
--

3) Actually, this is needed for all STRING commands, but we have only a set of 
STRING commands supported, so probably we don't need non-string check for now. 
What do you think?

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-15 Thread Andrey Novikov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15666585#comment-15666585
 ] 

Andrey Novikov commented on IGNITE-3066:


1) This commands: "set, setrange, mget" internaly implemented by REST commands. 
I think it will be better to directly call Ignite Cache API? 
Also this will solve problem with ttl on set, return (nil) on mget (there a 
TODO in code).

2) You implement different handlers for each command. May be it is possible to 
combine these handlers in one like GridCacheCommandHandler, 
QueryCommandHandler, ... ?

3) STRLEN command http://redis.io/commands/strlen
By description: "An error is returned when key holds a non-string value", but 
in GridRedisStrlenCommandHandler we always return length. Is this correct?

4) If argument parsing failed we throw IgniteChecked Exception in handlers for 
examples: GridJettyRestHandler#longValue, GridTaskCommandHandler.java:211
May be same should be implemented in GridRedisSetCommandHandler.java:75, 
GridRedisSetRangeCommandHandler.java:72, GridRedisGetSetCommandHandler.java:65, 
...

5) Wrong message format: GridRedisMessage#toString. For message with one 
parameter need use following format: "some text: " + msgParts
For debug purpose toString should be implemented like 
S.toString(GridRedisMessage.class, this);

6) We don't use "!" in the end of error message (several places). Message with 
error should look: "Some error: " + errVal,
but not like: "Some error! " + errVal,

7) "public" modifier must be present in interface methods/fields:
org.apache.ignite.internal.processors.rest.handlers.redis.GridRedisCommandHandler

8) Comment is absent:
GridRedisMessage#append, GridRedisMessage#toString

9) Wrong TODO format 
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-TODOs
GridRedisSetCommandHandler.java:91

10) Not need brace for one-liner statement. 
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-BracesandIdentation
GridRedisIncrDecrCommandHandler.java:84, GridRedisProtocolParser.java:307

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-14 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15666219#comment-15666219
 ] 

Roman Shtykh commented on IGNITE-3066:
--

Alexey,

1. I added a logger to all commands, so {{NumberFormatException}} won't be lost 
now.
2. You are right, I don't even remember why I wrote so. Modified.


> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-14 Thread Alexey Kuznetsov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15665906#comment-15665906
 ] 

Alexey Kuznetsov commented on IGNITE-3066:
--

Roman,

Now code looks good for me, except following:

# I think it will be better to handle {{NumberFormatException}} in more 
informative way: print "bad value" in exception, or pass  
{{NumberFormatException}} as cause.
# {{GridRedisIncrDecrCommandHandler#makeResponse}} contains very tricky code:
{code}
return GridRedisProtocolParser.toInteger(new 
BigDecimal((Long)restRes.getResponse()).toString());
{code}
In order to convert to integer we use {{BigDecimal}} and cast to {{Long}} ???

I will ask Andrey Novikov and Valentine Kulichenko to take a look on you PR and 
after that this PR could be merged I think.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-14 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15665755#comment-15665755
 ] 

Roman Shtykh commented on IGNITE-3066:
--

Alexey, thank you.

1) Done
2) Yes, we can remove {{else}}, however type error is related to {{if}} clause, 
so I would leave it as it is now.
3) It can be public or package-private only. Let's leave it public.
4) Done
5) Good idea. I will put a link to the Redis command reference. I think 
referring is better because it has a detailed description of commands, and the 
documentation there may improve with even more details.
6) Let's do it. Done.
7) {{GridTcpRestParser}} handles {{ByteBuffer}}. What are the concerns?
8) Thank you for pointing at it! I used it in the initial implementation before 
wrapping over REST. Removed.
9) Renamed.


> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-14 Thread Alexey Kuznetsov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15664153#comment-15664153
 ] 

Alexey Kuznetsov commented on IGNITE-3066:
--

Roman, take a look on following comments:

1) I think isNx() and isXX should be refactore like this:
{code}
private boolean isNx(List params) {
if (params.size() >= 3)
return "nx".equalsIgnoreCase(params.get(0)) || 
"nx".equalsIgnoreCase(params.get(2));

return "nx".equalsIgnoreCase(params.get(0));
}

private boolean isXx(List params) {
if (params.size() >= 3)
return "xx".equalsIgnoreCase(params.get(0)) || 
"xx".equalsIgnoreCase(params.get(2));

return "xx".equalsIgnoreCase(params.get(0));
}
{code}

2) GridRedisIncrDecrCommandHandler#makeResponse
  Remove not needed {{else}} before {{return}}

3) Public constructor of abstract class {{GridRedisThruRestCommandHandler}} 
would be better declared as protected.

4) In {{GridRedisDelCommandHandler#asRestRequest}} while-loop could be replaced 
with for-each:
{code}
  Iterator mgetIt = keys.iterator();
  while (mgetIt.hasNext())
  mget.put(mgetIt.next(), null);

  vs

  for (String key : keys)
 mget.put(key, null);
{code}
Same for {{GridRedisExistsCommandHandler}} and {{GridRedisMGetCommandHandler}}

5) How about to give more informative comments in  {{GridRedisCommand}} for 
commands?
For example I have no idea what is {{MGET}}?  Also it will be cool to give more 
comments for handlers.
for example {{GridRedisMGetCommandHandler}} Content could be taken from 
http://redis.io/commands/mget

6) May be rename {{GridRedisThruRestCommandHandler}} to 
{{GridRedisRestCommandHandler}} ?

7) {{GridRedisMessage}} is {{Serializable}}, but field {{private ByteBuffer 
response}} is not serializable?

8) Where {{IgniteNamedInstance#redisExecSvc}} is instantiated?

9) {{GridRedisProtocolParser#OkString}} is named not by Java method name 
convention (from upper case).

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-08 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15649961#comment-15649961
 ] 

Roman Shtykh commented on IGNITE-3066:
--

I implemented NX and XX options for SET command.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-08 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15647054#comment-15647054
 ] 

Roman Shtykh commented on IGNITE-3066:
--

Alexey, thank you!
1, 2 -- done
3. {{GridRedisProtocolParser}} does not know about {{GridRestResponse}} and 
does only some low level protocol stuff. Not sure we have to push the condition 
there.
4. You are right, fixed.
5, 6. done
7, 8. Refactored
9. It is one of the limitations I listed above. I realize that expiry on keys 
can be achieved with {{cache.withExpiryPolicy}}, but I couldn't find how to do 
it with the existing REST.
(NX and XX options are doable though, I will have a look)
Please have a look at two other limitations, you may have an idea how to remove 
them.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-08 Thread Alexey Kuznetsov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15646872#comment-15646872
 ] 

Alexey Kuznetsov commented on IGNITE-3066:
--

Roman,

OK about 6-8.
See my next comments:
# Missing {{@Override}} on {{RedisProtocolSelfTest.beforeTest()}}
# {{GridRedisSetRangeCommandHandler}} in method {{asRestRequest}}
 rename offset -> off
 {{if (val.length() == 0)}} -> {{if (val.isEmpty())}}
# {{GridRedisDbSizeCommandHandler#makeResponse}} and 
{{GridRedisDelCommandHandler#makeResponse}} may be push condition inside 
GridRedisProtocolParser.toInteger()?
 {code}
 return (GridRedisProtocolParser.toInteger(restRes.getResponse() == null ? "0" 
: String.valueOf(restRes.getResponse(;
 {code}
# {{GridRedisIncrDecrCommandHandler#asRestRequest}}
 {{switch (msg.command())}} -> may be add default section with some assert ?
# {{GridRedisGetRangeCommandHandler#boundedStartOffset and boundedEndOffset}}
 How about to replace if with {{?:}} ?
# {{GridRedisAppendCommandHandler}}
 line 80 {{if ((boolean)hnd.handle(appendReq).getResponse() == false)}} looks 
not safe (if getResponse is not boolean? or null?)
 and "== false" could be replaced with "!".
# {{GridRedisThruRestCommandHandler#GridRedisThruRestCommandHandler}}
 {{ctx}} param is never used.
# Please check all {{NumberFormatException e}} if {{e}} does not used it should 
be named {{ignored}}.
 Or better to pass e as second parameter to exception that actually thrown.
# {{GridRedisSetCommandHandler#asRestRequest}}
{code}
  if (msg.messageSize() >= 4) {
  // TODO: handle options.
  }
{code}
TODO should be fixed I think.




> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-07 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15643449#comment-15643449
 ] 

Roman Shtykh commented on IGNITE-3066:
--

Alexey, thank you.
I have addressed 1-5 (I don't mind renaming RESP, REDIS will be more intuitive).
6. Well, Redis protocol has only 2-3 types of errors, and I don't feel a strong 
need for other types of exceptions.
As for 7, it is used in {{GridRedisThruRestCommandHandler}}, and such error 
handling is needed by RESP specifications, so we will probably use it even more 
in further implementations.
8. I think {{Del}} and {{Exists}} can be further generalized; not sure if it's 
worth though, since all the rest is pretty different. Other commands not that 
much -- they perform different operations in {{asRestRequest()}}.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-06 Thread Alexey Kuznetsov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15643364#comment-15643364
 ] 

Alexey Kuznetsov commented on IGNITE-3066:
--

Roman, see my first comments:

# In modules\clients\pom.xml new dependency "redis.clients.jedis" should be 
test.
# Please revert changes in javadocs in {{IgniteConfiguration}} & 
{{GridKernalContext}}, they are not related to this issue.
# {{GridRedisGenericException}} & {{GridRedisTypeException}} - ASF header 
missing.
# {{GridClientPacketType}} - may be it will be better to have {{REDIS}} instead 
of {{RESP}}?
# {{RedisProtocolSelfTest}} move {{private static final int GRID_CNT = 1}} 
constant to the class top. Also this constant is "1".
 What about multi nodes tests?
# {{GridRedisGenericException}} - how about to introduce several descendants? 
Like {{GridRedisIllegalArgumentException}}?
# {{GridRedisTypeException }}- declared, but I not found any {{throw new 
GridRedisTypeException}}
# There a lot of duplicated code in 
{{GridRedisXXXCommandHandler.asRestRequest()}} methods - could this be somehow 
generalized in parent class?
  For example: {{GridRedisDelCommandHandler}} and 
{{GridRedisExistsCommandHandler}}.

I will do one more review after

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15643076#comment-15643076
 ] 

ASF GitHub Bot commented on IGNITE-3066:


GitHub user shroman opened a pull request:

https://github.com/apache/ignite/pull/1212

IGNITE-3066: Set of Redis commands that can be easily implemented via 
existing REST commands



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/ignite ignite-2788

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/1212.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1212


commit 90fe51e356d8d7ac1fb9c11778e339a8cc41c400
Author: shtykh_roman 
Date:   2016-04-11T01:41:22Z

IGNITE-2788: Basic Redis protocol implementation.

commit 99115ee0f75debc7e7385265baf1689247cc0d39
Author: shtykh_roman 
Date:   2016-04-12T10:10:11Z

IGNITE-2788: Basic Redis protocol implementation. Reworked to run on REST 
server.

commit a450ae1872ce7cac9205a1614c74acc8edf04f5e
Author: shtykh_roman 
Date:   2016-04-13T09:43:30Z

IGNITE-2788: Basic Redis protocol implementation. GET command to see how 
cache commands work and more Redis return types.

commit 26d4c631a91bee233d054d0b322bbe6d3bdf698b
Author: shtykh_roman 
Date:   2016-04-14T09:42:44Z

IGNITE-2788: Basic Redis protocol implementation. Introduced a handler for 
string commands.

commit b3e7a2a5faf1799f304c18f85e934e0e85e55fbd
Author: shtykh_roman 
Date:   2016-04-15T11:39:07Z

IGNITE-2788: Basic Redis protocol implementation. Got rid of switch 
statements.

commit a3231a7d9338746ba2d25c8b6571b944a0f02556
Author: shtykh_roman 
Date:   2016-04-18T09:57:47Z

IGNITE-2788: Basic Redis protocol implementation. Introduced Redis protocol 
exceptions and added commands.

commit 998cf4da7ddbbb417d7f3fc6aa9b0c440e09d594
Author: shtykh_roman 
Date:   2016-04-19T03:59:38Z

IGNITE-2788: Basic Redis protocol implementation. Added STRLEN and GETSET 
commands.

commit 62d5cafed207c1a153f9e90fdaca801833e1999f
Author: shtykh_roman 
Date:   2016-04-27T08:09:14Z

IGNITE-2788: Basic Redis protocol implementation. Added SETRANGE and 
GETRANGE commands.

commit 127f459fae79f61fd0af81f7bd93a02b52f6c00b
Author: shtykh_roman 
Date:   2016-04-28T06:41:57Z

IGNITE-2788: Basic Redis protocol implementation. Added DEL, EXISTS and 
DBSIZE commands.

commit a8dae9d0090b53d9a409fb2985fe15ed76319a57
Author: shtykh_roman 
Date:   2016-11-01T03:07:18Z

IGNITE-2788: Moved handlers.

commit 0cd6723d2e413be61d31827a9f0444d4253a30ed
Author: shtykh_roman 
Date:   2016-11-07T04:28:04Z

Merge branch 'master' into ignite-2788




> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-11-01 Thread Denis Magda (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15626755#comment-15626755
 ] 

Denis Magda commented on IGNITE-3066:
-

Roman, I think it's ok to release the implementation in its current state and 
improve it later on by altering/adjusting REST protocol on Ignite side making 
it more sophisticated and flexible.

Would you be able to wrap up everything you did so far and release under Apache 
Ignite 1.8? If you have time for that please respond in the discussion below 
with your intentions
http://apache-ignite-developers.2346864.n4.nabble.com/Apache-Ignite-1-8-Release-td11811.html

and move this ticket to patch available state and after that ask the community 
for review. Also be sure to re-run the tests before doing this.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-10-31 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15624186#comment-15624186
 ] 

Roman Shtykh commented on IGNITE-3066:
--

Denis, the listed commands work, but with the above-mentioned limitations. The 
limitations are caused (as I see it) because we wrap REST, which has a poorer 
set of commands compared to Redis protocol.

Maybe it can be released as an experimental feature. What do you think?

It is in branch https://github.com/apache/ignite/tree/ignite-2788


> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-10-31 Thread Denis Magda (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15623789#comment-15623789
 ] 

Denis Magda commented on IGNITE-3066:
-

[~roman_s], please send a message to the dev list with a link to the 
pull-request asking for the review. I came across this ticket  by chance. In 
the middle of November we're planning to release Ignite 1.8 and it will be 
great to see your improvements there. 

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-04-28 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15261787#comment-15261787
 ] 

Roman Shtykh commented on IGNITE-3066:
--

3. SET cannot set expiry on keys.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-04-28 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15261633#comment-15261633
 ] 

Roman Shtykh commented on IGNITE-3066:
--

Current limitations:
1. DEL should return the number of actually deleted entries, but REST will 
always return {true}, therefore in the current implementation the number of 
submitted keys is returned.
2. MGET has to contain null values for non-existing keys. Ignite does not 
return nulls.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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


[jira] [Commented] (IGNITE-3066) Set of Redis commands that can be easily implemented via existing REST commands

2016-04-28 Thread Roman Shtykh (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15261627#comment-15261627
 ] 

Roman Shtykh commented on IGNITE-3066:
--

In addition, PING, QUIT, ECHO are implemented.

> Set of Redis commands that can be easily implemented via existing REST 
> commands
> ---
>
> Key: IGNITE-3066
> URL: https://issues.apache.org/jira/browse/IGNITE-3066
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Roman Shtykh
>Assignee: Roman Shtykh
>
> As the 1st iteration of IGNITE-2788 the following commands can be implemented 
> via existing REST commands,
> GET
> MGET
> SET
> MSET
> INCR
> DECR
> INCRBY
> DECRBY
> APPEND
> STRLEN
> GETSET
> SETRANGE
> GETRANGE
> DEL
> EXISTS
> DBSIZE
> http://redis.io/commands



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