ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: ignite-843 Start sql test drive before agent start.
Date Thu, 08 Oct 2015 03:49:39 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 4b054fa8b -> 7693eed05


ignite-843 Start sql test drive before agent start.


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

Branch: refs/heads/ignite-843
Commit: 7693eed051ef5d2b0fa9e24280abfdf151682e3c
Parents: 4b054fa
Author: Andrey <anovikov@gridgain.com>
Authored: Thu Oct 8 10:49:32 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Oct 8 10:49:32 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/agent/AgentLauncher.java    |  8 ++++++++
 .../java/org/apache/ignite/agent/AgentSocket.java |  6 ------
 .../ignite/agent/testdrive/AgentSqlTestDrive.java | 18 +++++++++---------
 3 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7693eed0/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
index 32f45e9..a698b19 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
@@ -24,6 +24,8 @@ import java.net.URI;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.apache.ignite.agent.handlers.RestExecutor;
+import org.apache.ignite.agent.testdrive.AgentMetadataTestDrive;
+import org.apache.ignite.agent.testdrive.AgentSqlTestDrive;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.eclipse.jetty.websocket.client.WebSocketClient;
 
@@ -91,6 +93,12 @@ public class AgentLauncher {
             cfg.token(new String(System.console().readPassword()));
         }
 
+        if (cfg.testDriveMetadata())
+            AgentMetadataTestDrive.testDrive();
+
+        if (cfg.testDriveSql())
+            AgentSqlTestDrive.testDrive(cfg);
+
         RestExecutor restExecutor = new RestExecutor(cfg);
 
         restExecutor.start();

http://git-wip-us.apache.org/repos/asf/ignite/blob/7693eed0/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
index 6576dbf..7ab6b06 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
@@ -174,12 +174,6 @@ public class AgentSocket implements WebSocketSender {
         }
 
         log.info("Authentication success.");
-
-        if (cfg.testDriveMetadata())
-            AgentMetadataTestDrive.testDrive();
-
-        if (cfg.testDriveSql())
-            AgentSqlTestDrive.testDrive(cfg);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/7693eed0/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentSqlTestDrive.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentSqlTestDrive.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentSqlTestDrive.java
index 34dcc46..5e7c57c 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentSqlTestDrive.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentSqlTestDrive.java
@@ -276,7 +276,7 @@ public class AgentSqlTestDrive {
      * @param name Cache name.
      */
     private static void populateCacheEmployee(Ignite ignite, String name) {
-        log.log(Level.FINE, "TEST-DRIVE: Start population cache: '" + name + "' with data...");
+        log.log(Level.FINE, "TEST-DRIVE-SQL: Start population cache: '" + name + "' with
data...");
 
         IgniteCache<CountryKey, Country> cacheCountry = ignite.cache(name);
 
@@ -311,7 +311,7 @@ public class AgentSqlTestDrive {
                     round(r * 5000, 2) , mgrId, rnd.nextInt(DEP_CNT)));
         }
 
-        log.log(Level.FINE, "TEST-DRIVE: Finished population cache: '" + name + "' with data.");
+        log.log(Level.FINE, "TEST-DRIVE-SQL: Finished population cache: '" + name + "' with
data.");
     }
 
     /**
@@ -319,7 +319,7 @@ public class AgentSqlTestDrive {
      * @param name Cache name.
      */
     private static void populateCacheCar(Ignite ignite, String name) {
-        log.log(Level.FINE, "TEST-DRIVE: Start population cache: '" + name + "' with data...");
+        log.log(Level.FINE, "TEST-DRIVE-SQL: Start population cache: '" + name + "' with
data...");
 
         IgniteCache<ParkingKey, Parking> cacheParking = ignite.cache(name);
 
@@ -332,7 +332,7 @@ public class AgentSqlTestDrive {
             cacheDepartment.put(new CarKey(i), new Car(i, rnd.nextInt(PARK_CNT), "Car " +
(i + 1)));
 
 
-        log.log(Level.FINE, "TEST-DRIVE: Finished population cache: '" + name + "' with data.");
+        log.log(Level.FINE, "TEST-DRIVE-SQL: Finished population cache: '" + name + "' with
data.");
     }
 
     /**
@@ -340,7 +340,7 @@ public class AgentSqlTestDrive {
      */
     public static void testDrive(AgentConfiguration acfg) {
         if (initLatch.compareAndSet(false, true)) {
-            log.log(Level.FINE, "TEST-DRIVE: Prepare node configuration...");
+            log.log(Level.INFO, "TEST-DRIVE-SQL: Starting embedded node for sql test-drive...");
 
             try {
                 IgniteConfiguration cfg = new IgniteConfiguration();
@@ -364,7 +364,7 @@ public class AgentSqlTestDrive {
 
                 cfg.setCacheConfiguration(cacheEmployee(EMPLOYEE_CACHE_NAME), cacheCar(CAR_CACHE_NAME));
 
-                log.log(Level.FINE, "TEST-DRIVE: Start embedded node with indexed enabled
caches...");
+                log.log(Level.FINE, "TEST-DRIVE-SQL: Start embedded node with indexed enabled
caches...");
 
                 IgniteEx ignite = (IgniteEx)Ignition.start(cfg);
 
@@ -374,21 +374,21 @@ public class AgentSqlTestDrive {
                 Integer port = ignite.localNode().attribute(IgniteNodeAttributes.ATTR_REST_JETTY_PORT);
 
                 if (F.isEmpty(host) || port == null) {
-                    log.log(Level.SEVERE, "TEST-DRIVE: Failed to start embedded node with
rest!");
+                    log.log(Level.SEVERE, "TEST-DRIVE-SQL: Failed to start embedded node
with rest!");
 
                     return;
                 }
 
                 acfg.nodeUri(String.format("http://%s:%d", "0.0.0.0".equals(host) ? "127.0.0.1"
: host, port));
 
-                log.log(Level.INFO, "TEST-DRIVE: Embedded node started");
+                log.log(Level.INFO, "TEST-DRIVE-SQL: Embedded node for sql test-drive successfully
started");
 
                 populateCacheEmployee(ignite, EMPLOYEE_CACHE_NAME);
 
                 populateCacheCar(ignite, CAR_CACHE_NAME);
             }
             catch (Exception e) {
-                log.log(Level.SEVERE, "TEST-DRIVE: Failed to start test drive for sql!",
e);
+                log.log(Level.SEVERE, "TEST-DRIVE-SQL: Failed to start embedded node for
sql test-drive!", e);
             }
         }
     }


Mime
View raw message