Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-961 2aa05e425 -> a191c8d29
Merge remote-tracking branch 'remotes/origin/ignite-961-master' into ignite-961
Conflicts:
modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestCommand.java
modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/79c1e24c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/79c1e24c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/79c1e24c
Branch: refs/heads/ignite-961
Commit: 79c1e24cdcadafd190caad14b7d8376ca408148a
Parents: 4699dd8
Author: ivasilinets <[email protected]>
Authored: Tue Jul 21 15:25:40 2015 +0300
Committer: ivasilinets <[email protected]>
Committed: Tue Jul 21 15:25:40 2015 +0300
----------------------------------------------------------------------
.../JettyRestProcessorAbstractSelfTest.java | 2 -
.../handlers/query/QueryCommandHandler.java | 2 +-
.../http/jetty/GridJettyRestHandler.java | 84 +++++---------------
3 files changed, 23 insertions(+), 65 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/79c1e24c/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git
a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index 4734ecc..f013efe 100644
---
a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -385,7 +385,6 @@ public abstract class JettyRestProcessorAbstractSelfTest
extends AbstractRestPro
assertNull(grid(0).cache("testCache"));
}
-
/**
* @throws Exception If failed.
*/
@@ -512,7 +511,6 @@ public abstract class JettyRestProcessorAbstractSelfTest
extends AbstractRestPro
jsonEquals(ret, errorPattern("Failed to find mandatory parameter in
request: val"));
}
-
/**
* @throws Exception If failed.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/79c1e24c/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
index 1f92bf3..defca37 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
@@ -178,7 +178,7 @@ public class QueryCommandHandler extends
GridRestCommandHandlerAdapter {
/** {@inheritDoc} */
@Override public GridRestResponse call() throws Exception {
- try {
+ try {
QueryCursor cur = qryCurs.get(req.queryId()).get1();
if (cur == null)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/79c1e24c/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
----------------------------------------------------------------------
diff --git
a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
index ebe2119..ac264c4 100644
---
a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
+++
b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
@@ -576,63 +576,6 @@ public class GridJettyRestHandler extends AbstractHandler {
break;
}
- case EXECUTE_SQL_QUERY:
- case EXECUTE_SQL_FIELDS_QUERY: {
- RestSqlQueryRequest restReq0 = new RestSqlQueryRequest();
-
- restReq0.sqlQuery((String) params.get("qry"));
-
- restReq0.arguments(values("arg", params).toArray());
-
- restReq0.typeName((String) params.get("type"));
-
- String psz = (String) params.get("psz");
-
- if (psz != null)
- restReq0.pageSize(Integer.parseInt(psz));
-
- restReq0.cacheName((String)params.get("cacheName"));
-
- restReq = restReq0;
-
- break;
- }
-
- case FETCH_SQL_QUERY: {
- RestSqlQueryRequest restReq0 = new RestSqlQueryRequest();
-
- String qryId = (String) params.get("qryId");
-
- if (qryId != null)
- restReq0.queryId(Long.parseLong(qryId));
-
- String psz = (String) params.get("psz");
-
- if (psz != null)
- restReq0.pageSize(Integer.parseInt(psz));
-
- restReq0.cacheName((String)params.get("cacheName"));
-
- restReq = restReq0;
-
- break;
- }
-
- case CLOSE_SQL_QUERY: {
- RestSqlQueryRequest restReq0 = new RestSqlQueryRequest();
-
- String qryId = (String) params.get("qryId");
-
- if (qryId != null)
- restReq0.queryId(Long.parseLong(qryId));
-
- restReq0.cacheName((String)params.get("cacheName"));
-
- restReq = restReq0;
-
- break;
- }
-
case RUN_SCRIPT: {
RestRunScriptRequest restReq0 = new RestRunScriptRequest();
@@ -707,8 +650,13 @@ public class GridJettyRestHandler extends AbstractHandler {
else
restReq0.arguments(values("arg", params).toArray());
- restReq0.typeName((String)params.get("type"));
- restReq0.pageSize(Integer.parseInt((String)
params.get("psz")));
+ restReq0.typeName((String) params.get("type"));
+
+ String psz = (String) params.get("psz");
+
+ if (psz != null)
+ restReq0.pageSize(Integer.parseInt(psz));
+
restReq0.cacheName((String)params.get("cacheName"));
restReq = restReq0;
@@ -719,8 +667,16 @@ public class GridJettyRestHandler extends AbstractHandler {
case FETCH_SQL_QUERY: {
RestSqlQueryRequest restReq0 = new RestSqlQueryRequest();
- restReq0.queryId(Long.parseLong((String)params.get("qryId")));
- restReq0.pageSize(Integer.parseInt((String)params.get("psz")));
+ String qryId = (String) params.get("qryId");
+
+ if (qryId != null)
+ restReq0.queryId(Long.parseLong(qryId));
+
+ String psz = (String) params.get("psz");
+
+ if (psz != null)
+ restReq0.pageSize(Integer.parseInt(psz));
+
restReq0.cacheName((String)params.get("cacheName"));
restReq = restReq0;
@@ -731,7 +687,11 @@ public class GridJettyRestHandler extends AbstractHandler {
case CLOSE_SQL_QUERY: {
RestSqlQueryRequest restReq0 = new RestSqlQueryRequest();
- restReq0.queryId(Long.parseLong((String)params.get("qryId")));
+ String qryId = (String) params.get("qryId");
+
+ if (qryId != null)
+ restReq0.queryId(Long.parseLong(qryId));
+
restReq0.cacheName((String)params.get("cacheName"));
restReq = restReq0;