# IGNITE-128: WIP.

Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f394d950
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f394d950
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f394d950

Branch: refs/heads/ignite-128
Commit: f394d950681b8554f389852fde09c844442a2a51
Parents: 3d89cfd
Author: vozerov-gridgain <voze...@gridgain.com>
Authored: Tue Feb 10 16:42:28 2015 +0300
Committer: vozerov-gridgain <voze...@gridgain.com>
Committed: Tue Feb 10 16:42:28 2015 +0300

----------------------------------------------------------------------
 .../MemcacheRestExampleNodeStartup.java         |   2 +-
 .../integration/ClientAbstractSelfTest.java     | 119 -------------------
 .../rest/TaskCommandHandlerSelfTest.java        |   2 -
 .../apache/ignite/internal/IgniteKernal.java    |   6 +-
 .../internal/client/GridClientCompute.java      |  57 ---------
 .../cache/GridCacheCommandHandlerSelfTest.java  |   2 +-
 6 files changed, 4 insertions(+), 184 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f394d950/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
----------------------------------------------------------------------
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
 
b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
index cf9aee2..96d4286 100644
--- 
a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
+++ 
b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
@@ -61,7 +61,7 @@ public class MemcacheRestExampleNodeStartup {
         cfg.setDeploymentMode(SHARED);
         cfg.setPeerClassLoadingEnabled(true);
 
-        cfg.setClientConnectionConfiguration(new 
ClientConnectionConfiguration());
+        cfg.setConnectorConfiguration(new ConnectorConfiguration());
 
         OptimizedMarshaller marsh = new OptimizedMarshaller();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f394d950/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
index 383f76a..bdd809a 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
@@ -195,10 +195,6 @@ public abstract class ClientAbstractSelfTest extends 
GridCommonAbstractTest {
 
         clientCfg.setPort(BINARY_PORT);
 
-        clientCfg.setRestAccessibleFolders(
-            U.getGridGainHome() + "/work/log",
-            
U.resolveGridGainPath("modules/core/src/test/resources/log").getAbsolutePath());
-
         if (useSsl()) {
             clientCfg.setSslEnabled(true);
 
@@ -1296,121 +1292,6 @@ public abstract class ClientAbstractSelfTest extends 
GridCommonAbstractTest {
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
-    public void testLog() throws Exception {
-        final GridClientCompute compute = client.compute();
-
-        /* Usually this log file is created by log4j, but some times it 
doesn't exists. */
-        new File(U.getGridGainHome(), "work/log/gridgain.log").createNewFile();
-
-        List<String> log = compute.log(6, 7);
-        assertNotNull(log);
-
-        log = compute.log(-7, -6);
-        assertNotNull(log);
-
-        log = compute.log(-6, -7);
-        assertNotNull(log);
-        assertTrue(log.isEmpty());
-
-        String path = "work/log/gridgain.log." + System.currentTimeMillis();
-
-        File file = new File(U.getGridGainHome(), path);
-
-        assert !file.exists();
-
-        FileWriter writer = new FileWriter(file);
-
-        String sep = System.getProperty("line.separator");
-
-        writer.write("Line 1" + sep);
-        writer.write(sep);
-        writer.write("Line 2" + sep);
-        writer.write("Line 3" + sep);
-
-        writer.flush();
-        writer.close();
-
-        log = compute.log(path, -1, -1);
-        assertNotNull(log);
-        assertEquals(1, log.size());
-        assertEquals("Line 3", log.get(0));
-
-        // Indexing from 0.
-        log = compute.log(path, 2, 3);
-        assertNotNull(log);
-        assertEquals(2, log.size());
-        assertEquals("Line 2", log.get(0));
-        assertEquals("Line 3", log.get(1));
-
-        // Backward reading.
-        log = compute.log(path, -3, -1);
-        assertNotNull(log);
-        assertEquals(3, log.size());
-        assertEquals("", log.get(0));
-        assertEquals("Line 2", log.get(1));
-        assertEquals("Line 3", log.get(2));
-
-        log = compute.log(path, -4, -3);
-        assertNotNull(log);
-        assertEquals(2, log.size());
-        assertEquals("Line 1", log.get(0));
-        assertEquals("", log.get(1));
-
-        log = compute.log(path, -5, -8);
-        assertNotNull(log);
-        assertEquals(0, log.size());
-
-        assert file.delete();
-
-        log = compute.log(TEST_LOG_PATH, -9, -5);
-        assertNotNull(log);
-        assertEquals(5, log.size());
-
-        log = compute.log(TEST_LOG_PATH, -1, -1);
-        assertNotNull(log);
-        assertEquals(1, log.size());
-        assertEquals("[14:23:34,336][INFO 
][main][GridTaskContinuousMapperSelfTest] >>> Stopping test: " +
-            "testContinuousMapperNegative in 2633 ms <<<",
-            log.get(0));
-
-        log = compute.log(TEST_LOG_PATH, -13641, -13640);
-        assertNotNull(log);
-        assertEquals(1, log.size());
-        assertEquals("[14:14:22,515][INFO ][main][GridListenActorSelfTest] ", 
log.get(0));
-
-        assertThrows(
-            log(),
-            new Callable<Object>() {
-                @Override public Object call() throws Exception {
-                    compute.log("wrong/path", -1, -1);
-
-                    return null;
-                }
-            },
-            GridClientException.class,
-            null
-        );
-
-        assertThrows(
-            log(),
-            new Callable<Object>() {
-                @Override public Object call() throws Exception {
-                    new File(U.getGridGainHome(), 
"work/security.log").createNewFile();
-
-                    compute.log("work/log/../security.log", -1, -1);
-
-                    return null;
-                }
-            },
-            GridClientException.class,
-            null
-        );
-    }
-
-    /**
      * Test if all user objects passed interception.
      *
      * @throws Exception If failed.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f394d950/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java
index 69c0a2a..fd0c2c5 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.internal.processors.rest;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.client.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f394d950/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index bd4efc4..0894f28 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -1488,10 +1488,8 @@ public class IgniteKernal extends ClusterGroupAdapter 
implements IgniteEx, Ignit
 
         ConnectorConfiguration clientCfg = cfg.getConnectorConfiguration();
 
-        if (clientCfg != null) {
-            restExecSvcMBean = clientCfg.getExecutorService() != null ?
-                registerExecutorMBean(clientCfg.getExecutorService(), 
"GridRestExecutor") : null;
-        }
+        if (clientCfg != null)
+            restExecSvcMBean = registerExecutorMBean(restExecSvc, 
"GridRestExecutor");
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f394d950/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
index e26c004..02cb428 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
@@ -413,63 +413,6 @@ public interface GridClientCompute {
     public GridClientFuture<List<GridClientNode>> refreshTopologyAsync(boolean 
includeAttrs, boolean includeMetrics);
 
     /**
-     * Gets contents of default log file ({@code 
IGNITE_HOME/work/log/gridgain.log}).
-     * Note that backward reading (with negative line indexes) supported for 
only 8-bit character encodings.
-     *
-     * @param lineFrom Index of line from which log is get, inclusive. 
Negative values mean line numbers
-     *      from the end of the file.
-     * @param lineTo Index of line to which log is get, inclusive. Negative 
values mean line numbers
-     *      from the end of the file.
-     * @return Log contents.
-     * @throws GridClientException In case of error.
-     * @throws GridServerUnreachableException If none of the servers can be 
reached.
-     * @throws GridClientClosedException If client was closed manually.
-     */
-    public List<String> log(int lineFrom, int lineTo) throws 
GridClientException;
-
-    /**
-     * Asynchronously gets contents of default log file
-     * ({@code IGNITE_HOME/work/log/gridgain.log}).
-     * Note that backward reading (with negative line indexes) supported for 
only 8-bit character encodings.
-     *
-     * @param lineFrom Index of line from which log is get, inclusive. 
Negative values mean line numbers
-     *      from the end of the file.
-     * @param lineTo Index of line to which log is get, inclusive. Negative 
values mean line numbers
-     *      from the end of the file.
-     * @return Future for this operation.
-     */
-    public GridClientFuture<List<String>> logAsync(int lineFrom, int lineTo);
-
-    /**
-     * Gets contents of custom log file, i.e. log file in a non-default 
location.
-     * Note that backward reading (with negative line indexes) supported for 
only 8-bit character encodings.
-     *
-     * @param path Log file path. Can be absolute or relative to IGNITE_HOME.
-     * @param lineFrom Index of line from which log is get, inclusive. 
Negative values mean line numbers
-     *      from the end of the file.
-     * @param lineTo Index of line to which log is get, inclusive. Negative 
values mean line numbers
-     *      from the end of the file.
-     * @return Log contents.
-     * @throws GridClientException In case of error.
-     * @throws GridServerUnreachableException If none of the servers can be 
reached.
-     * @throws GridClientClosedException If client was closed manually.
-     */
-    public List<String> log(String path, int lineFrom, int lineTo) throws 
GridClientException;
-
-    /**
-     * Asynchronously gets contents of custom log file.
-     * Note that backward reading (with negative line indexes) supported for 
only 8-bit character encodings.
-     *
-     * @param path Log file path. Can be absolute or relative to IGNITE_HOME.
-     * @param lineFrom Index of line from which log is get, inclusive. 
Negative values mean line numbers
-     *      from the end of the file.
-     * @param lineTo Index of line to which log is get, inclusive. Negative 
values mean line numbers
-     *      from the end of the file.
-     * @return Future.
-     */
-    public GridClientFuture<List<String>> logAsync(String path, int lineFrom, 
int lineTo);
-
-    /**
      * Sets keep portables flag for the next task execution in the current 
thread.
      */
     public GridClientCompute withKeepPortables();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f394d950/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
index cf6fdd1..bf28a59 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
@@ -64,7 +64,7 @@ public class GridCacheCommandHandlerSelfTest extends 
GridCommonAbstractTest {
         cfg.setLocalHost("localhost");
 
         ConnectorConfiguration clnCfg = new ConnectorConfiguration();
-        clnCfg.setRestTcpHost("localhost");
+        clnCfg.setHost("localhost");
 
         cfg.setConnectorConfiguration(clnCfg);
         cfg.setDiscoverySpi(disco);

Reply via email to