You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/12/28 05:11:37 UTC

[2/2] ignite git commit: IGNITE-2276 Rename.

IGNITE-2276 Rename.


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

Branch: refs/heads/ignite-843-rc2
Commit: 260c18509e02667d9d1d140ca4d75bbda92b3301
Parents: d524224
Author: Andrey <an...@gridgain.com>
Authored: Mon Dec 28 10:48:17 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Dec 28 11:11:18 2015 +0700

----------------------------------------------------------------------
 modules/control-center-agent/README.txt         |  45 +-
 modules/control-center-agent/demo/README.txt    |   4 +
 modules/control-center-agent/demo/demo-db.sql   |  58 +++
 .../ignite/agent/demo/AgentMetadataDemo.java    |  88 ++++
 .../apache/ignite/agent/demo/AgentSqlDemo.java  | 495 +++++++++++++++++++
 .../org/apache/ignite/agent/demo/model/Car.java | 155 ++++++
 .../apache/ignite/agent/demo/model/CarKey.java  |  97 ++++
 .../apache/ignite/agent/demo/model/Country.java | 126 +++++
 .../ignite/agent/demo/model/CountryKey.java     |  97 ++++
 .../ignite/agent/demo/model/Department.java     | 184 +++++++
 .../ignite/agent/demo/model/DepartmentKey.java  |  97 ++++
 .../ignite/agent/demo/model/Employee.java       | 358 ++++++++++++++
 .../ignite/agent/demo/model/EmployeeKey.java    |  97 ++++
 .../apache/ignite/agent/demo/model/Parking.java | 126 +++++
 .../ignite/agent/demo/model/ParkingKey.java     |  97 ++++
 .../handlers/DatabaseMetadataExtractor.java     |   6 +-
 .../ignite/agent/handlers/RestExecutor.java     |   6 +-
 .../agent/testdrive/AgentMetadataTestDrive.java |  88 ----
 .../agent/testdrive/AgentSqlTestDrive.java      | 495 -------------------
 .../ignite/agent/testdrive/model/Car.java       | 155 ------
 .../ignite/agent/testdrive/model/CarKey.java    |  97 ----
 .../ignite/agent/testdrive/model/Country.java   | 126 -----
 .../agent/testdrive/model/CountryKey.java       |  97 ----
 .../agent/testdrive/model/Department.java       | 184 -------
 .../agent/testdrive/model/DepartmentKey.java    |  97 ----
 .../ignite/agent/testdrive/model/Employee.java  | 358 --------------
 .../agent/testdrive/model/EmployeeKey.java      |  97 ----
 .../ignite/agent/testdrive/model/Parking.java   | 126 -----
 .../agent/testdrive/model/ParkingKey.java       |  97 ----
 .../control-center-agent/test-drive/README.txt  |   4 -
 .../test-drive/test-drive.sql                   |  58 ---
 .../src/main/js/agents/agent-manager.js         |   4 +-
 .../src/main/js/controllers/common-module.js    |  16 +-
 .../main/js/controllers/metadata-controller.js  |  23 +-
 .../main/js/controllers/models/metadata.json    |   8 +-
 .../src/main/js/routes/agent.js                 |   4 +-
 .../main/js/views/templates/agent-download.jade |   4 +-
 37 files changed, 2139 insertions(+), 2135 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/README.txt
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/README.txt b/modules/control-center-agent/README.txt
index fcc5cef..def4d55 100644
--- a/modules/control-center-agent/README.txt
+++ b/modules/control-center-agent/README.txt
@@ -11,36 +11,36 @@ Two main functions of Ignite Web Agent:
     You may need to copy JDBC driver into "./jdbc-drivers" subfolder or specify path via "-d" option.
 
 Usage example:
-    ignite-web-agent.sh -t 1a2b3c4d5f -s wss://console.example.com
+    ignite-web-agent.sh
 
-Test drive of Ignite Web Agent:
-    In order to simplify evaluation two test drive modes were implemented:
+Demo of Ignite Web Agent:
+    In order to simplify evaluation two demo modes were implemented:
 
-    1) Get security token on Web Console "Profile" screen.
-
-    2) Demo for metadata load from database.
+    1) Demo for metadata load from database.
        In this mode an in-memory H2 database will started.
        How to evaluate:
-         2.1) Go to Ignite Web Console "Metadata" screen.
-         2.2) Select "Load from database".
-         2.3) Select H2 driver and enter JDBC URL: "jdbc:h2:mem:test-drive-db".
-         2.4) You should see list of available schemas and tables. Select some of them and click "Save".
+         1.1) Go to Ignite Web Console "Metadata" screen.
+         1.2) Select "Load from database".
+         1.3) Choose in Driver JAR combobox "Demo database for load metadata".
+         1.4) Click "Next" button. You should see list of available schemas.
+         1.5) Click "Next" button. You should see list of available tables.
+         1.6) Select some of them and click "Save".
 
-    3) Demo for SQL.
+    2) Demo for SQL.
        In this mode internal Ignite node will be started. Cache created and populated with data.
        How to evaluate:
-       3.1) Go to Ignite Web Console "SQL" menu and select "Create new notebook" menu item.
-       3.2) In notebook paragraph enter SQL queries for tables: "Country, Department, Employee" in "test-drive-employee" cache
-        and for tables: "Parking, Car" in "test-drive-car" cache.
+       2.1) Go to Ignite Web Console "SQL" menu and select "Create new notebook" menu item.
+       2.2) In notebook paragraph enter SQL queries for tables: "Country, Department, Employee" in "demo-employee" cache
+        and for tables: "Parking, Car" in "demo-car" cache.
 
        For example:
-        3.3) select "test-drive-car" cache,
-        3.4) enter SQL:
+        2.3) select "demo-car" cache,
+        2.4) Enter SQL statement:
                 select count(*) cnt, p.ParkingName from car c
                  inner join PARKING p on (p.PARKINGID=c.PARKINGID)
                 group by c.PARKINGID order by p.ParkingName
-        3.5) Click "Execute" button. You should get some data in table.
-        3.6) Click charts buttons to see auto generated charts.
+        2.5) Click "Execute" button. You should get some data in table.
+        2.6) Click charts buttons to see auto generated charts.
 
 Configuration file:
     Should be a file with simple line-oriented format as described here: http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load(java.io.Reader)
@@ -54,7 +54,14 @@ Configuration file:
     Example configuration file:
         token=1a2b3c4d5f
         serverURI=wss://console.example.com:3001
-        test-drive-sql=true
+
+Security token:
+    1) By default token will be included into downloaded agent zip.
+    2) You can get/change token in your profile.
+
+Ignite Web agent requirements:
+    1) Ignite node should be started with REST server (move ignite-rest-http folder from lib/optional/ to lib/).
+    2) Pass Ignite node REST server URI to agent.
 
 Options:
     -h, --help

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/demo/README.txt
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/demo/README.txt b/modules/control-center-agent/demo/README.txt
new file mode 100644
index 0000000..17e5074
--- /dev/null
+++ b/modules/control-center-agent/demo/README.txt
@@ -0,0 +1,4 @@
+Ignite Web Agent
+======================================
+
+This is folder for demo files.

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/demo/demo-db.sql
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/demo/demo-db.sql b/modules/control-center-agent/demo/demo-db.sql
new file mode 100644
index 0000000..a7deafa
--- /dev/null
+++ b/modules/control-center-agent/demo/demo-db.sql
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+CREATE TABLE COUNTRY (
+    ID           INTEGER NOT NULL PRIMARY KEY,
+    COUNTRY_NAME VARCHAR(100)
+);
+
+CREATE TABLE DEPARTMENT (
+    DEPARTMENT_ID   INTEGER     NOT NULL PRIMARY KEY,
+    DEPARTMENT_NAME VARCHAR(50) NOT NULL,
+    COUNTRY_ID      INTEGER,
+    MANAGER_ID      INTEGER
+);
+
+CREATE TABLE EMPLOYEE (
+    EMPLOYEE_ID   INTEGER     NOT NULL PRIMARY KEY,
+    FIRST_NAME    VARCHAR(20) NOT NULL,
+    LAST_NAME     VARCHAR(30) NOT NULL,
+    EMAIL         VARCHAR(25) NOT NULL,
+    PHONE_NUMBER  VARCHAR(20),
+    HIRE_DATE     DATE        NOT NULL,
+    JOB           VARCHAR(50) NOT NULL,
+    SALARY        DOUBLE,
+    MANAGER_ID    INTEGER,
+    DEPARTMENT_ID INTEGER
+);
+
+CREATE INDEX EMP_SALARY_A ON EMPLOYEE (SALARY ASC);
+CREATE INDEX EMP_SALARY_B ON EMPLOYEE (SALARY DESC);
+CREATE INDEX EMP_NAMES ON EMPLOYEE (FIRST_NAME ASC, LAST_NAME ASC);
+
+CREATE SCHEMA CARS;
+
+CREATE TABLE CARS.PARKING (
+    PARKING_ID   INTEGER     NOT NULL PRIMARY KEY,
+    PARKING_NAME VARCHAR(50) NOT NULL
+);
+
+CREATE TABLE CARS.CAR (
+    CAR_ID     INTEGER     NOT NULL PRIMARY KEY,
+    PARKING_ID INTEGER     NOT NULL,
+    CAR_NAME   VARCHAR(50) NOT NULL
+);

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentMetadataDemo.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentMetadataDemo.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentMetadataDemo.java
new file mode 100644
index 0000000..30237cf
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentMetadataDemo.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo;
+
+import java.io.File;
+import java.io.FileReader;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.log4j.Logger;
+import org.h2.tools.RunScript;
+import org.h2.tools.Server;
+
+import static org.apache.ignite.agent.AgentUtils.resolvePath;
+
+/**
+ * Demo for metadata load from database.
+ *
+ * H2 database will be started and several tables will be created.
+ */
+public class AgentMetadataDemo {
+    /** */
+    private static final Logger log = Logger.getLogger(AgentMetadataDemo.class.getName());
+
+    /** */
+    private static final AtomicBoolean initLatch = new AtomicBoolean();
+
+    /**
+     * @param jdbcUrl Connection url.
+     * @return true if url is used for test-drive.
+     */
+    public static boolean isTestDriveUrl(String jdbcUrl) {
+        return "jdbc:h2:mem:demo-db".equals(jdbcUrl);
+    }
+
+    /**
+     * Start H2 database and populate it with several tables.
+     */
+    public static void testDrive() {
+        if (initLatch.compareAndSet(false, true)) {
+            log.info("DEMO: Prepare in-memory H2 database...");
+
+            try {
+                Connection conn = DriverManager.getConnection("jdbc:h2:mem:demo-db;DB_CLOSE_DELAY=-1", "sa", "");
+
+                File sqlScript = resolvePath("demo/demo-db.sql");
+
+                if (sqlScript == null) {
+                    log.error("DEMO: Failed to find demo database init script file: demo/demo-db.sql");
+                    log.error("DEMO: Failed to start demo for metadata");
+
+                    return;
+                }
+
+                RunScript.execute(conn, new FileReader(sqlScript));
+
+                log.info("DEMO: Sample tables created.");
+
+                conn.close();
+
+                Server.createTcpServer("-tcpDaemon").start();
+
+                log.info("DEMO: TcpServer stared.");
+
+                log.info("DEMO: JDBC URL for test drive metadata load: jdbc:h2:mem:demo-db");
+            }
+            catch (Exception e) {
+                log.error("DEMO: Failed to start test drive for metadata!", e);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentSqlDemo.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentSqlDemo.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentSqlDemo.java
new file mode 100644
index 0000000..06da854
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/AgentSqlDemo.java
@@ -0,0 +1,495 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Random;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.agent.AgentConfiguration;
+import org.apache.ignite.agent.demo.model.Car;
+import org.apache.ignite.agent.demo.model.CarKey;
+import org.apache.ignite.agent.demo.model.Country;
+import org.apache.ignite.agent.demo.model.CountryKey;
+import org.apache.ignite.agent.demo.model.Department;
+import org.apache.ignite.agent.demo.model.DepartmentKey;
+import org.apache.ignite.agent.demo.model.Employee;
+import org.apache.ignite.agent.demo.model.EmployeeKey;
+import org.apache.ignite.agent.demo.model.Parking;
+import org.apache.ignite.agent.demo.model.ParkingKey;
+import org.apache.ignite.cache.QueryEntity;
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.QueryIndexType;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteNodeAttributes;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.logger.NullLogger;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.log4j.Logger;
+
+/**
+ * Demo for SQL.
+ *
+ * Cache will be created and populated with data to query.
+ */
+public class AgentSqlDemo {
+    /** */
+    private static final Logger log = Logger.getLogger(AgentMetadataDemo.class.getName());
+
+    /** */
+    private static final AtomicBoolean initLatch = new AtomicBoolean();
+
+    /** */
+    private static final String EMPLOYEE_CACHE_NAME = "demo-employee";
+
+    /** */
+    private static final String CAR_CACHE_NAME = "demo-car";
+
+    /** */
+    private static final Random rnd = new Random();
+
+    /** Countries count. */
+    private static final int CNTR_CNT = 10;
+
+    /** Departments count */
+    private static final int DEP_CNT = 100;
+
+    /** Employees count. */
+    private static final int EMPL_CNT = 1000;
+
+    /** Countries count. */
+    private static final int CAR_CNT = 100;
+
+    /** Departments count */
+    private static final int PARK_CNT = 10;
+
+    /** Counter for threads in pool. */
+    private static final AtomicInteger THREAD_CNT = new AtomicInteger(0);
+
+    /**
+     * Configure cacheEmployee.
+     *
+     * @param name Cache name.
+     */
+    private static <K, V> CacheConfiguration<K, V> cacheEmployee(String name) {
+        CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(name);
+
+        // Configure cacheEmployee types.
+        Collection<QueryEntity> queryEntities = new ArrayList<>();
+
+        // COUNTRY.
+        QueryEntity type = new QueryEntity();
+
+        queryEntities.add(type);
+
+        type.setKeyType(CountryKey.class.getName());
+        type.setValueType(Country.class.getName());
+
+        // Query fields for COUNTRY.
+        LinkedHashMap<String, String> qryFlds = new LinkedHashMap<>();
+
+        qryFlds.put("id", "java.lang.Integer");
+        qryFlds.put("countryName", "java.lang.String");
+
+        type.setFields(qryFlds);
+
+        // Indexes for COUNTRY.
+        type.setIndexes(Collections.singletonList(new QueryIndex("id")));
+
+        ccfg.setQueryEntities(queryEntities);
+
+        // DEPARTMENT.
+        type = new QueryEntity();
+
+        queryEntities.add(type);
+
+        type.setKeyType(DepartmentKey.class.getName());
+        type.setValueType(Department.class.getName());
+
+        // Query fields for DEPARTMENT.
+        qryFlds = new LinkedHashMap<>();
+
+        qryFlds.put("departmentId", "java.lang.Integer");
+        qryFlds.put("departmentName", "java.lang.String");
+        qryFlds.put("countryId", "java.lang.Integer");
+        qryFlds.put("managerId", "java.lang.Integer");
+
+        type.setFields(qryFlds);
+
+        // Indexes for DEPARTMENT.
+        type.setIndexes(Collections.singletonList(new QueryIndex("departmentId")));
+
+        ccfg.setQueryEntities(queryEntities);
+
+        // EMPLOYEE.
+        type = new QueryEntity();
+
+        queryEntities.add(type);
+
+        type.setKeyType(EmployeeKey.class.getName());
+        type.setValueType(Employee.class.getName());
+
+        // Query fields for EMPLOYEE.
+        qryFlds = new LinkedHashMap<>();
+
+        qryFlds.put("employeeId", "java.lang.Integer");
+        qryFlds.put("firstName", "java.lang.String");
+        qryFlds.put("lastName", "java.lang.String");
+        qryFlds.put("email", "java.lang.String");
+        qryFlds.put("phoneNumber", "java.lang.String");
+        qryFlds.put("hireDate", "java.sql.Date");
+        qryFlds.put("job", "java.lang.String");
+        qryFlds.put("salary", "java.lang.Double");
+        qryFlds.put("managerId", "java.lang.Integer");
+        qryFlds.put("departmentId", "java.lang.Integer");
+
+        type.setFields(qryFlds);
+
+        // Indexes for EMPLOYEE.
+        Collection<QueryIndex> indexes = new ArrayList<>();
+
+        indexes.add(new QueryIndex("employeeId"));
+        indexes.add(new QueryIndex("salary", false));
+
+        // Group indexes for EMPLOYEE.
+        LinkedHashMap<String, Boolean> grpItems = new LinkedHashMap<>();
+
+        grpItems.put("firstName", Boolean.FALSE);
+        grpItems.put("lastName", Boolean.TRUE);
+
+        QueryIndex grpIdx = new QueryIndex(grpItems, QueryIndexType.SORTED);
+
+        grpIdx.setName("EMP_NAMES");
+
+        indexes.add(grpIdx);
+
+        type.setIndexes(indexes);
+
+        ccfg.setQueryEntities(queryEntities);
+
+        return ccfg;
+    }
+
+    /**
+     * Configure cacheEmployee.
+     *
+     * @param name Cache name.
+     */
+    private static <K, V> CacheConfiguration<K, V> cacheCar(String name) {
+        CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(name);
+
+        // Configure cacheEmployee types.
+        Collection<QueryEntity> queryEntities = new ArrayList<>();
+
+        // CAR.
+        QueryEntity type = new QueryEntity();
+
+        queryEntities.add(type);
+
+        type.setKeyType(CarKey.class.getName());
+        type.setValueType(Car.class.getName());
+
+        // Query fields for CAR.
+        LinkedHashMap<String, String> qryFlds = new LinkedHashMap<>();
+
+        qryFlds.put("carId", "java.lang.Integer");
+        qryFlds.put("parkingId", "java.lang.Integer");
+        qryFlds.put("carName", "java.lang.String");
+
+        type.setFields(qryFlds);
+
+        // Indexes for CAR.
+        type.setIndexes(Collections.singletonList(new QueryIndex("carId")));
+
+        ccfg.setQueryEntities(queryEntities);
+
+        // PARKING.
+        type = new QueryEntity();
+
+        queryEntities.add(type);
+
+        type.setKeyType(ParkingKey.class.getName());
+        type.setValueType(Parking.class.getName());
+
+        // Query fields for PARKING.
+        qryFlds = new LinkedHashMap<>();
+
+        qryFlds.put("parkingId", "java.lang.Integer");
+        qryFlds.put("parkingName", "java.lang.String");
+
+        type.setFields(qryFlds);
+
+        // Indexes for PARKING.
+        type.setIndexes(Collections.singletonList(new QueryIndex("parkingId")));
+
+        ccfg.setQueryEntities(queryEntities);
+
+        return ccfg;
+    }
+
+    /**
+     * @param val Value to round.
+     * @param places Numbers after point.
+     * @return Rounded value;
+     */
+    private static double round(double val, int places) {
+        if (places < 0)
+            throw new IllegalArgumentException();
+
+        long factor = (long) Math.pow(10, places);
+
+        val *= factor;
+
+        long tmp = Math.round(val);
+
+        return (double) tmp / factor;
+    }
+
+    /**
+     * @param ignite Ignite.
+     * @param name Cache name.
+     * @param range Time range in milliseconds.
+     */
+    private static void populateCacheEmployee(Ignite ignite, String name, long range) {
+        log.trace("DEMO: Start population cache: '" + name + "' with data...");
+
+        IgniteCache<CountryKey, Country> cacheCountry = ignite.cache(name);
+
+        for (int i = 0; i < CNTR_CNT; i++)
+            cacheCountry.put(new CountryKey(i), new Country(i, "State " + (i + 1)));
+
+        IgniteCache<DepartmentKey, Department> cacheDepartment = ignite.cache(name);
+
+        for (int i = 0; i < DEP_CNT; i++) {
+            Integer mgrId = (i == 0 || rnd.nextBoolean()) ? null : rnd.nextInt(i);
+
+            cacheDepartment.put(new DepartmentKey(i),
+                new Department(i, "Department " + (i + 1), rnd.nextInt(CNTR_CNT), mgrId));
+        }
+
+        IgniteCache<EmployeeKey, Employee> cacheEmployee = ignite.cache(name);
+
+        for (int i = 0; i < EMPL_CNT; i++) {
+            Integer mgrId = (i == 0 || rnd.nextBoolean()) ? null : rnd.nextInt(i);
+
+            double r = rnd.nextDouble();
+
+            cacheEmployee.put(new EmployeeKey(i),
+                new Employee(i, "first name " + (i + 1), "last name " + (i + 1), "email " + (i + 1),
+                    "phone number " + (i + 1), new java.sql.Date((long)(r * range)), "job " + (i + 1),
+                    round(r * 5000, 2) , mgrId, rnd.nextInt(DEP_CNT)));
+        }
+
+        log.trace("DEMO: Finished population cache: '" + name + "' with data.");
+    }
+
+    /**
+     * @param ignite Ignite.
+     * @param name Cache name.
+     */
+    private static void populateCacheCar(Ignite ignite, String name) {
+        log.trace("DEMO: Start population cache: '" + name + "' with data...");
+
+        IgniteCache<ParkingKey, Parking> cacheParking = ignite.cache(name);
+
+        for (int i = 0; i < PARK_CNT; i++)
+            cacheParking.put(new ParkingKey(i), new Parking(i, "Parking " + (i + 1)));
+
+        IgniteCache<CarKey, Car> cacheCar = ignite.cache(name);
+
+        for (int i = 0; i < CAR_CNT; i++)
+            cacheCar.put(new CarKey(i), new Car(i, rnd.nextInt(PARK_CNT), "Car " + (i + 1)));
+
+
+        log.trace("DEMO: Finished population cache: '" + name + "' with data.");
+    }
+
+    /**
+     * Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically.
+     *
+     * @param corePoolSize Number of threads to keep in the pool, even if they are idle.
+     * @param threadName Part of thread name that would be used by thread factory.
+     * @return Newly created scheduled thread pool.
+     */
+    private static ScheduledExecutorService newScheduledThreadPool(int corePoolSize, final String threadName) {
+        ScheduledExecutorService srvc = Executors.newScheduledThreadPool(corePoolSize, new ThreadFactory() {
+            @Override public Thread newThread(Runnable r) {
+                Thread thread = new Thread(r, String.format("%s-%d", threadName, THREAD_CNT.getAndIncrement()));
+
+                thread.setDaemon(true);
+
+                return thread;
+            }
+        });
+
+        ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) srvc;
+
+        // Setting up shutdown policy.
+        executor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
+        executor.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
+
+        return srvc;
+    }
+
+    /**
+     * Starts read and write from cache in background.
+     *
+     * @param ignite Ignite.
+     * @param n - maximum count read/write key
+     */
+    private static void startLoad(final Ignite ignite, final int n) {
+        final long diff = new java.util.Date().getTime();
+
+        populateCacheEmployee(ignite, EMPLOYEE_CACHE_NAME, diff);
+
+        populateCacheCar(ignite, CAR_CACHE_NAME);
+
+        ScheduledExecutorService cachePool = newScheduledThreadPool(2, "demo-sql-load-cache-tasks");
+
+        cachePool.scheduleWithFixedDelay(new Runnable() {
+            @Override public void run() {
+                try {
+                    IgniteCache<EmployeeKey, Employee> cache = ignite.cache(EMPLOYEE_CACHE_NAME);
+
+                    if (cache != null)
+                        for (int i = 0; i < n; i++) {
+                            Integer employeeId = rnd.nextInt(EMPL_CNT);
+
+                            Integer mgrId = (i == 0 || rnd.nextBoolean()) ? null : rnd.nextInt(employeeId);
+
+                            double r = rnd.nextDouble();
+
+                            cache.put(new EmployeeKey(employeeId),
+                                new Employee(employeeId, "first name " + (i + 1), "last name " + (i + 1),
+                                    "email " + (i + 1), "phone number " + (i + 1),
+                                    new java.sql.Date((long)(r * diff)), "job " + (i + 1),
+                                    round(r * 5000, 2), mgrId, rnd.nextInt(DEP_CNT)));
+
+                            if (rnd.nextBoolean())
+                                cache.remove(new EmployeeKey(rnd.nextInt(EMPL_CNT)));
+                        }
+                }
+                catch (IllegalStateException ignored) {
+                    // No-op.
+                }
+                catch (Throwable e) {
+                    if (!e.getMessage().contains("cache is stopped"))
+                        ignite.log().error("Cache write task execution error", e);
+                }
+            }
+        }, 10, 3, TimeUnit.SECONDS);
+
+        cachePool.scheduleWithFixedDelay(new Runnable() {
+            @Override public void run() {
+                try {
+                    IgniteCache<CarKey, Car> cache = ignite.cache(CAR_CACHE_NAME);
+
+                    if (cache != null)
+                        for (int i = 0; i < n; i++) {
+                            Integer carId = rnd.nextInt(CAR_CNT);
+
+                            cache.put(new CarKey(carId), new Car(carId, rnd.nextInt(PARK_CNT), "Car " + (i + 1)));
+
+                            if (rnd.nextBoolean())
+                                cache.remove(new CarKey(rnd.nextInt(CAR_CNT)));
+                        }
+                }
+                catch (IllegalStateException ignored) {
+                }
+                catch (Throwable e) {
+                    if (!e.getMessage().contains("cache is stopped"))
+                        ignite.log().error("Cache write task execution error", e);
+                }
+            }
+        }, 10, 3, TimeUnit.SECONDS);
+    }
+
+    /**
+     * Start ignite node with cacheEmployee and populate it with data.
+     */
+    public static boolean testDrive(AgentConfiguration acfg) {
+        if (initLatch.compareAndSet(false, true)) {
+            log.info("DEMO: Starting embedded node for sql test-drive...");
+
+            try {
+                IgniteConfiguration cfg = new IgniteConfiguration();
+
+                cfg.setLocalHost("127.0.0.1");
+
+                cfg.setMetricsLogFrequency(0);
+
+                cfg.setGridLogger(new NullLogger());
+
+                // Configure discovery SPI.
+                TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
+
+                TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
+
+                ipFinder.setAddresses(Collections.singleton("127.0.0.1:47500..47501"));
+
+                discoSpi.setIpFinder(ipFinder);
+
+                cfg.setDiscoverySpi(discoSpi);
+
+                cfg.setCacheConfiguration(cacheEmployee(EMPLOYEE_CACHE_NAME), cacheCar(CAR_CACHE_NAME));
+
+                log.trace("DEMO: Start embedded node with indexed enabled caches...");
+
+                IgniteEx ignite = (IgniteEx)Ignition.start(cfg);
+
+                String host = ((Collection<String>)
+                    ignite.localNode().attribute(IgniteNodeAttributes.ATTR_REST_JETTY_ADDRS)).iterator().next();
+
+                Integer port = ignite.localNode().attribute(IgniteNodeAttributes.ATTR_REST_JETTY_PORT);
+
+                if (F.isEmpty(host) || port == null) {
+                    log.error("DEMO: Failed to start embedded node with rest!");
+
+                    return false;
+                }
+
+                acfg.nodeUri(String.format("http://%s:%d", "0.0.0.0".equals(host) ? "127.0.0.1" : host, port));
+
+                log.info("DEMO: Embedded node for sql test-drive successfully started");
+
+                startLoad(ignite, 20);
+            }
+            catch (Exception e) {
+                log.error("DEMO: Failed to start embedded node for sql test-drive!", e);
+
+                return false;
+            }
+        }
+
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Car.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Car.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Car.java
new file mode 100644
index 0000000..c7f9dc5
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Car.java
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * Car definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class Car implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for carId. */
+    private int carId;
+
+    /** Value for parkingId. */
+    private int parkingId;
+
+    /** Value for carName. */
+    private String carName;
+
+    /**
+     * Empty constructor.
+     */
+    public Car() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public Car(
+        int carId,
+        int parkingId,
+        String carName
+    ) {
+        this.carId = carId;
+        this.parkingId = parkingId;
+        this.carName = carName;
+    }
+
+    /**
+     * Gets carId.
+     *
+     * @return Value for carId.
+     */
+    public int getCarId() {
+        return carId;
+    }
+
+    /**
+     * Sets carId.
+     *
+     * @param carId New value for carId.
+     */
+    public void setCarId(int carId) {
+        this.carId = carId;
+    }
+
+    /**
+     * Gets parkingId.
+     *
+     * @return Value for parkingId.
+     */
+    public int getParkingId() {
+        return parkingId;
+    }
+
+    /**
+     * Sets parkingId.
+     *
+     * @param parkingId New value for parkingId.
+     */
+    public void setParkingId(int parkingId) {
+        this.parkingId = parkingId;
+    }
+
+    /**
+     * Gets carName.
+     *
+     * @return Value for carName.
+     */
+    public String getCarName() {
+        return carName;
+    }
+
+    /**
+     * Sets carName.
+     *
+     * @param carName New value for carName.
+     */
+    public void setCarName(String carName) {
+        this.carName = carName;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof Car))
+            return false;
+
+        Car that = (Car)o;
+
+        if (carId != that.carId)
+            return false;
+
+        if (parkingId != that.parkingId)
+            return false;
+
+        if (carName != null ? !carName.equals(that.carName) : that.carName != null)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = carId;
+
+        res = 31 * res + parkingId;
+
+        res = 31 * res + (carName != null ? carName.hashCode() : 0);
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Car [carId=" + carId +
+            ", parkingId=" + parkingId +
+            ", carName=" + carName +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CarKey.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CarKey.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CarKey.java
new file mode 100644
index 0000000..70a7a8e
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CarKey.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * CarKey definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class CarKey implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for carId. */
+    private int carId;
+
+    /**
+     * Empty constructor.
+     */
+    public CarKey() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public CarKey(
+        int carId
+    ) {
+        this.carId = carId;
+    }
+
+    /**
+     * Gets carId.
+     *
+     * @return Value for carId.
+     */
+    public int getCarId() {
+        return carId;
+    }
+
+    /**
+     * Sets carId.
+     *
+     * @param carId New value for carId.
+     */
+    public void setCarId(int carId) {
+        this.carId = carId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof CarKey))
+            return false;
+
+        CarKey that = (CarKey)o;
+
+        if (carId != that.carId)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = carId;
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "CarKey [carId=" + carId +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Country.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Country.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Country.java
new file mode 100644
index 0000000..2dbb23b
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Country.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * Country definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class Country implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for id. */
+    private int id;
+
+    /** Value for countryName. */
+    private String countryName;
+
+    /**
+     * Empty constructor.
+     */
+    public Country() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public Country(
+        int id,
+        String countryName
+    ) {
+        this.id = id;
+        this.countryName = countryName;
+    }
+
+    /**
+     * Gets id.
+     *
+     * @return Value for id.
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id New value for id.
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets countryName.
+     *
+     * @return Value for countryName.
+     */
+    public String getCountryName() {
+        return countryName;
+    }
+
+    /**
+     * Sets countryName.
+     *
+     * @param countryName New value for countryName.
+     */
+    public void setCountryName(String countryName) {
+        this.countryName = countryName;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof Country))
+            return false;
+
+        Country that = (Country)o;
+
+        if (id != that.id)
+            return false;
+
+        if (countryName != null ? !countryName.equals(that.countryName) : that.countryName != null)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = id;
+
+        res = 31 * res + (countryName != null ? countryName.hashCode() : 0);
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Country [id=" + id +
+            ", countryName=" + countryName +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CountryKey.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CountryKey.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CountryKey.java
new file mode 100644
index 0000000..c8a998f
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/CountryKey.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * CountryKey definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class CountryKey implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for id. */
+    private int id;
+
+    /**
+     * Empty constructor.
+     */
+    public CountryKey() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public CountryKey(
+        int id
+    ) {
+        this.id = id;
+    }
+
+    /**
+     * Gets id.
+     *
+     * @return Value for id.
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id New value for id.
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof CountryKey))
+            return false;
+
+        CountryKey that = (CountryKey)o;
+
+        if (id != that.id)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = id;
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "CountryKey [id=" + id +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Department.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Department.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Department.java
new file mode 100644
index 0000000..5e48b42
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Department.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * Department definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class Department implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for departmentId. */
+    private int departmentId;
+
+    /** Value for departmentName. */
+    private String departmentName;
+
+    /** Value for countryId. */
+    private Integer countryId;
+
+    /** Value for managerId. */
+    private Integer managerId;
+
+    /**
+     * Empty constructor.
+     */
+    public Department() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public Department(
+        int departmentId,
+        String departmentName,
+        Integer countryId,
+        Integer managerId
+    ) {
+        this.departmentId = departmentId;
+        this.departmentName = departmentName;
+        this.countryId = countryId;
+        this.managerId = managerId;
+    }
+
+    /**
+     * Gets departmentId.
+     *
+     * @return Value for departmentId.
+     */
+    public int getDepartmentId() {
+        return departmentId;
+    }
+
+    /**
+     * Sets departmentId.
+     *
+     * @param departmentId New value for departmentId.
+     */
+    public void setDepartmentId(int departmentId) {
+        this.departmentId = departmentId;
+    }
+
+    /**
+     * Gets departmentName.
+     *
+     * @return Value for departmentName.
+     */
+    public String getDepartmentName() {
+        return departmentName;
+    }
+
+    /**
+     * Sets departmentName.
+     *
+     * @param departmentName New value for departmentName.
+     */
+    public void setDepartmentName(String departmentName) {
+        this.departmentName = departmentName;
+    }
+
+    /**
+     * Gets countryId.
+     *
+     * @return Value for countryId.
+     */
+    public Integer getCountryId() {
+        return countryId;
+    }
+
+    /**
+     * Sets countryId.
+     *
+     * @param countryId New value for countryId.
+     */
+    public void setCountryId(Integer countryId) {
+        this.countryId = countryId;
+    }
+
+    /**
+     * Gets managerId.
+     *
+     * @return Value for managerId.
+     */
+    public Integer getManagerId() {
+        return managerId;
+    }
+
+    /**
+     * Sets managerId.
+     *
+     * @param managerId New value for managerId.
+     */
+    public void setManagerId(Integer managerId) {
+        this.managerId = managerId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof Department))
+            return false;
+
+        Department that = (Department)o;
+
+        if (departmentId != that.departmentId)
+            return false;
+
+        if (departmentName != null ? !departmentName.equals(that.departmentName) : that.departmentName != null)
+            return false;
+
+        if (countryId != null ? !countryId.equals(that.countryId) : that.countryId != null)
+            return false;
+
+        if (managerId != null ? !managerId.equals(that.managerId) : that.managerId != null)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = departmentId;
+
+        res = 31 * res + (departmentName != null ? departmentName.hashCode() : 0);
+
+        res = 31 * res + (countryId != null ? countryId.hashCode() : 0);
+
+        res = 31 * res + (managerId != null ? managerId.hashCode() : 0);
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Department [departmentId=" + departmentId +
+            ", departmentName=" + departmentName +
+            ", countryId=" + countryId +
+            ", managerId=" + managerId +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/DepartmentKey.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/DepartmentKey.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/DepartmentKey.java
new file mode 100644
index 0000000..a8dc1b8
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/DepartmentKey.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * DepartmentKey definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class DepartmentKey implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for departmentId. */
+    private int departmentId;
+
+    /**
+     * Empty constructor.
+     */
+    public DepartmentKey() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public DepartmentKey(
+        int departmentId
+    ) {
+        this.departmentId = departmentId;
+    }
+
+    /**
+     * Gets departmentId.
+     *
+     * @return Value for departmentId.
+     */
+    public int getDepartmentId() {
+        return departmentId;
+    }
+
+    /**
+     * Sets departmentId.
+     *
+     * @param departmentId New value for departmentId.
+     */
+    public void setDepartmentId(int departmentId) {
+        this.departmentId = departmentId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof DepartmentKey))
+            return false;
+
+        DepartmentKey that = (DepartmentKey)o;
+
+        if (departmentId != that.departmentId)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = departmentId;
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "DepartmentKey [departmentId=" + departmentId +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Employee.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Employee.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Employee.java
new file mode 100644
index 0000000..9238845
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Employee.java
@@ -0,0 +1,358 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * Employee definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class Employee implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for employeeId. */
+    private int employeeId;
+
+    /** Value for firstName. */
+    private String firstName;
+
+    /** Value for lastName. */
+    private String lastName;
+
+    /** Value for email. */
+    private String email;
+
+    /** Value for phoneNumber. */
+    private String phoneNumber;
+
+    /** Value for hireDate. */
+    private java.sql.Date hireDate;
+
+    /** Value for job. */
+    private String job;
+
+    /** Value for salary. */
+    private Double salary;
+
+    /** Value for managerId. */
+    private Integer managerId;
+
+    /** Value for departmentId. */
+    private Integer departmentId;
+
+    /**
+     * Empty constructor.
+     */
+    public Employee() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public Employee(
+        int employeeId,
+        String firstName,
+        String lastName,
+        String email,
+        String phoneNumber,
+        java.sql.Date hireDate,
+        String job,
+        Double salary,
+        Integer managerId,
+        Integer departmentId
+    ) {
+        this.employeeId = employeeId;
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.email = email;
+        this.phoneNumber = phoneNumber;
+        this.hireDate = hireDate;
+        this.job = job;
+        this.salary = salary;
+        this.managerId = managerId;
+        this.departmentId = departmentId;
+    }
+
+    /**
+     * Gets employeeId.
+     *
+     * @return Value for employeeId.
+     */
+    public int getEmployeeId() {
+        return employeeId;
+    }
+
+    /**
+     * Sets employeeId.
+     *
+     * @param employeeId New value for employeeId.
+     */
+    public void setEmployeeId(int employeeId) {
+        this.employeeId = employeeId;
+    }
+
+    /**
+     * Gets firstName.
+     *
+     * @return Value for firstName.
+     */
+    public String getFirstName() {
+        return firstName;
+    }
+
+    /**
+     * Sets firstName.
+     *
+     * @param firstName New value for firstName.
+     */
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    /**
+     * Gets lastName.
+     *
+     * @return Value for lastName.
+     */
+    public String getLastName() {
+        return lastName;
+    }
+
+    /**
+     * Sets lastName.
+     *
+     * @param lastName New value for lastName.
+     */
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    /**
+     * Gets email.
+     *
+     * @return Value for email.
+     */
+    public String getEmail() {
+        return email;
+    }
+
+    /**
+     * Sets email.
+     *
+     * @param email New value for email.
+     */
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    /**
+     * Gets phoneNumber.
+     *
+     * @return Value for phoneNumber.
+     */
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+
+    /**
+     * Sets phoneNumber.
+     *
+     * @param phoneNumber New value for phoneNumber.
+     */
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+
+    /**
+     * Gets hireDate.
+     *
+     * @return Value for hireDate.
+     */
+    public java.sql.Date getHireDate() {
+        return hireDate;
+    }
+
+    /**
+     * Sets hireDate.
+     *
+     * @param hireDate New value for hireDate.
+     */
+    public void setHireDate(java.sql.Date hireDate) {
+        this.hireDate = hireDate;
+    }
+
+    /**
+     * Gets job.
+     *
+     * @return Value for job.
+     */
+    public String getJob() {
+        return job;
+    }
+
+    /**
+     * Sets job.
+     *
+     * @param job New value for job.
+     */
+    public void setJob(String job) {
+        this.job = job;
+    }
+
+    /**
+     * Gets salary.
+     *
+     * @return Value for salary.
+     */
+    public Double getSalary() {
+        return salary;
+    }
+
+    /**
+     * Sets salary.
+     *
+     * @param salary New value for salary.
+     */
+    public void setSalary(Double salary) {
+        this.salary = salary;
+    }
+
+    /**
+     * Gets managerId.
+     *
+     * @return Value for managerId.
+     */
+    public Integer getManagerId() {
+        return managerId;
+    }
+
+    /**
+     * Sets managerId.
+     *
+     * @param managerId New value for managerId.
+     */
+    public void setManagerId(Integer managerId) {
+        this.managerId = managerId;
+    }
+
+    /**
+     * Gets departmentId.
+     *
+     * @return Value for departmentId.
+     */
+    public Integer getDepartmentId() {
+        return departmentId;
+    }
+
+    /**
+     * Sets departmentId.
+     *
+     * @param departmentId New value for departmentId.
+     */
+    public void setDepartmentId(Integer departmentId) {
+        this.departmentId = departmentId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof Employee))
+            return false;
+
+        Employee that = (Employee)o;
+
+        if (employeeId != that.employeeId)
+            return false;
+
+        if (firstName != null ? !firstName.equals(that.firstName) : that.firstName != null)
+            return false;
+
+        if (lastName != null ? !lastName.equals(that.lastName) : that.lastName != null)
+            return false;
+
+        if (email != null ? !email.equals(that.email) : that.email != null)
+            return false;
+
+        if (phoneNumber != null ? !phoneNumber.equals(that.phoneNumber) : that.phoneNumber != null)
+            return false;
+
+        if (hireDate != null ? !hireDate.equals(that.hireDate) : that.hireDate != null)
+            return false;
+
+        if (job != null ? !job.equals(that.job) : that.job != null)
+            return false;
+
+        if (salary != null ? !salary.equals(that.salary) : that.salary != null)
+            return false;
+
+        if (managerId != null ? !managerId.equals(that.managerId) : that.managerId != null)
+            return false;
+
+        if (departmentId != null ? !departmentId.equals(that.departmentId) : that.departmentId != null)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = employeeId;
+
+        res = 31 * res + (firstName != null ? firstName.hashCode() : 0);
+
+        res = 31 * res + (lastName != null ? lastName.hashCode() : 0);
+
+        res = 31 * res + (email != null ? email.hashCode() : 0);
+
+        res = 31 * res + (phoneNumber != null ? phoneNumber.hashCode() : 0);
+
+        res = 31 * res + (hireDate != null ? hireDate.hashCode() : 0);
+
+        res = 31 * res + (job != null ? job.hashCode() : 0);
+
+        res = 31 * res + (salary != null ? salary.hashCode() : 0);
+
+        res = 31 * res + (managerId != null ? managerId.hashCode() : 0);
+
+        res = 31 * res + (departmentId != null ? departmentId.hashCode() : 0);
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Employee [employeeId=" + employeeId +
+            ", firstName=" + firstName +
+            ", lastName=" + lastName +
+            ", email=" + email +
+            ", phoneNumber=" + phoneNumber +
+            ", hireDate=" + hireDate +
+            ", job=" + job +
+            ", salary=" + salary +
+            ", managerId=" + managerId +
+            ", departmentId=" + departmentId +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/EmployeeKey.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/EmployeeKey.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/EmployeeKey.java
new file mode 100644
index 0000000..6a9f4c0
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/EmployeeKey.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * EmployeeKey definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class EmployeeKey implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for employeeId. */
+    private int employeeId;
+
+    /**
+     * Empty constructor.
+     */
+    public EmployeeKey() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public EmployeeKey(
+        int employeeId
+    ) {
+        this.employeeId = employeeId;
+    }
+
+    /**
+     * Gets employeeId.
+     *
+     * @return Value for employeeId.
+     */
+    public int getEmployeeId() {
+        return employeeId;
+    }
+
+    /**
+     * Sets employeeId.
+     *
+     * @param employeeId New value for employeeId.
+     */
+    public void setEmployeeId(int employeeId) {
+        this.employeeId = employeeId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof EmployeeKey))
+            return false;
+
+        EmployeeKey that = (EmployeeKey)o;
+
+        if (employeeId != that.employeeId)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = employeeId;
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "EmployeeKey [employeeId=" + employeeId +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Parking.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Parking.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Parking.java
new file mode 100644
index 0000000..7613760
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/Parking.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * Parking definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class Parking implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for parkingId. */
+    private int parkingId;
+
+    /** Value for parkingName. */
+    private String parkingName;
+
+    /**
+     * Empty constructor.
+     */
+    public Parking() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public Parking(
+        int parkingId,
+        String parkingName
+    ) {
+        this.parkingId = parkingId;
+        this.parkingName = parkingName;
+    }
+
+    /**
+     * Gets parkingId.
+     *
+     * @return Value for parkingId.
+     */
+    public int getParkingId() {
+        return parkingId;
+    }
+
+    /**
+     * Sets parkingId.
+     *
+     * @param parkingId New value for parkingId.
+     */
+    public void setParkingId(int parkingId) {
+        this.parkingId = parkingId;
+    }
+
+    /**
+     * Gets parkingName.
+     *
+     * @return Value for parkingName.
+     */
+    public String getParkingName() {
+        return parkingName;
+    }
+
+    /**
+     * Sets parkingName.
+     *
+     * @param parkingName New value for parkingName.
+     */
+    public void setParkingName(String parkingName) {
+        this.parkingName = parkingName;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof Parking))
+            return false;
+
+        Parking that = (Parking)o;
+
+        if (parkingId != that.parkingId)
+            return false;
+
+        if (parkingName != null ? !parkingName.equals(that.parkingName) : that.parkingName != null)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = parkingId;
+
+        res = 31 * res + (parkingName != null ? parkingName.hashCode() : 0);
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Parking [parkingId=" + parkingId +
+            ", parkingName=" + parkingName +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/ParkingKey.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/ParkingKey.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/ParkingKey.java
new file mode 100644
index 0000000..a68e8e5
--- /dev/null
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/demo/model/ParkingKey.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.agent.demo.model;
+
+import java.io.Serializable;
+
+/**
+ * ParkingKey definition.
+ *
+ * Code generated by Apache Ignite Schema Import utility: 08/24/2015.
+ */
+public class ParkingKey implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Value for parkingId. */
+    private int parkingId;
+
+    /**
+     * Empty constructor.
+     */
+    public ParkingKey() {
+        // No-op.
+    }
+
+    /**
+     * Full constructor.
+     */
+    public ParkingKey(
+        int parkingId
+    ) {
+        this.parkingId = parkingId;
+    }
+
+    /**
+     * Gets parkingId.
+     *
+     * @return Value for parkingId.
+     */
+    public int getParkingId() {
+        return parkingId;
+    }
+
+    /**
+     * Sets parkingId.
+     *
+     * @param parkingId New value for parkingId.
+     */
+    public void setParkingId(int parkingId) {
+        this.parkingId = parkingId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (!(o instanceof ParkingKey))
+            return false;
+
+        ParkingKey that = (ParkingKey)o;
+
+        if (parkingId != that.parkingId)
+            return false;
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = parkingId;
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "ParkingKey [parkingId=" + parkingId +
+            "]";
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
index 8860123..ba146e7 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
@@ -32,7 +32,7 @@ import java.util.List;
 import java.util.Properties;
 import org.apache.ignite.agent.AgentConfiguration;
 import org.apache.ignite.agent.remote.Remote;
-import org.apache.ignite.agent.testdrive.AgentMetadataTestDrive;
+import org.apache.ignite.agent.demo.AgentMetadataDemo;
 import org.apache.ignite.schema.parser.DbMetadataReader;
 import org.apache.ignite.schema.parser.DbTable;
 import org.apache.log4j.Logger;
@@ -68,8 +68,8 @@ public class DatabaseMetadataExtractor {
         if (!new File(jdbcDriverJarPath).isAbsolute() && driversFolder != null)
             jdbcDriverJarPath = new File(driversFolder, jdbcDriverJarPath).getPath();
 
-        if (AgentMetadataTestDrive.isTestDriveUrl(jdbcUrl))
-            AgentMetadataTestDrive.testDrive();
+        if (AgentMetadataDemo.isTestDriveUrl(jdbcUrl))
+            AgentMetadataDemo.testDrive();
 
         return DbMetadataReader.getInstance().connect(jdbcDriverJarPath, jdbcDriverCls, jdbcUrl, jdbcInfo);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/RestExecutor.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/RestExecutor.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/RestExecutor.java
index ccdeb9a..99b5626 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/RestExecutor.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/RestExecutor.java
@@ -38,7 +38,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.ignite.agent.AgentConfiguration;
 import org.apache.ignite.agent.remote.Remote;
-import org.apache.ignite.agent.testdrive.AgentSqlTestDrive;
+import org.apache.ignite.agent.demo.AgentSqlDemo;
 import org.apache.log4j.Logger;
 
 import static org.apache.ignite.agent.AgentConfiguration.DFLT_NODE_PORT;
@@ -169,8 +169,8 @@ public class RestExecutor {
      * Enable test-drive SQL.
      */
     @Remote
-    public boolean enableTestDriveSQL() {
-        return AgentSqlTestDrive.testDrive(cfg);
+    public boolean startDemoSQL() {
+        return AgentSqlDemo.testDrive(cfg);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/260c1850/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
deleted file mode 100644
index 872ec70..0000000
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.agent.testdrive;
-
-import java.io.File;
-import java.io.FileReader;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.log4j.Logger;
-import org.h2.tools.RunScript;
-import org.h2.tools.Server;
-
-import static org.apache.ignite.agent.AgentUtils.resolvePath;
-
-/**
- * Test drive for metadata load from database.
- *
- * H2 database will be started and several tables will be created.
- */
-public class AgentMetadataTestDrive {
-    /** */
-    private static final Logger log = Logger.getLogger(AgentMetadataTestDrive.class.getName());
-
-    /** */
-    private static final AtomicBoolean initLatch = new AtomicBoolean();
-
-    /**
-     * @param jdbcUrl Connection url.
-     * @return true if url is used for test-drive.
-     */
-    public static boolean isTestDriveUrl(String jdbcUrl) {
-        return "jdbc:h2:mem:test-drive-db".equals(jdbcUrl);
-    }
-
-    /**
-     * Start H2 database and populate it with several tables.
-     */
-    public static void testDrive() {
-        if (initLatch.compareAndSet(false, true)) {
-            log.info("TEST-DRIVE: Prepare in-memory H2 database...");
-
-            try {
-                Connection conn = DriverManager.getConnection("jdbc:h2:mem:test-drive-db;DB_CLOSE_DELAY=-1", "sa", "");
-
-                File sqlScript = resolvePath("test-drive/test-drive.sql");
-
-                if (sqlScript == null) {
-                    log.error("TEST-DRIVE: Failed to find test drive script file: test-drive/test-drive.sql");
-                    log.error("TEST-DRIVE: Test drive for metadata not started");
-
-                    return;
-                }
-
-                RunScript.execute(conn, new FileReader(sqlScript));
-
-                log.info("TEST-DRIVE: Sample tables created.");
-
-                conn.close();
-
-                Server.createTcpServer("-tcpDaemon").start();
-
-                log.info("TEST-DRIVE: TcpServer stared.");
-
-                log.info("TEST-DRIVE: JDBC URL for test drive metadata load: jdbc:h2:mem:test-drive-db");
-            }
-            catch (Exception e) {
-                log.error("TEST-DRIVE: Failed to start test drive for metadata!", e);
-            }
-        }
-    }
-}