[ 
https://issues.apache.org/jira/browse/IGNITE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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)

Reply via email to