Repository: incubator-ignite Updated Branches: refs/heads/ignite-843 ebe05e067 -> 2c7367d26
IGNITE-843 Minor changes. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2c7367d2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2c7367d2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2c7367d2 Branch: refs/heads/ignite-843 Commit: 2c7367d26693195a0ee953d9c25cfbc7f14517a1 Parents: ebe05e0 Author: AKuznetsov <akuznet...@gridgain.com> Authored: Wed Aug 5 08:51:31 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Wed Aug 5 08:51:31 2015 +0700 ---------------------------------------------------------------------- .../apache/ignite/agent/AgentConfiguration.java | 12 ++++---- .../org/apache/ignite/agent/AgentLauncher.java | 2 -- .../ignite/agent/remote/RemoteHandler.java | 7 +---- .../main/resources/default.config.properties | 29 -------------------- 4 files changed, 7 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c7367d2/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java index 769c53a..0c887f6 100644 --- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java +++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java @@ -37,19 +37,19 @@ public class AgentConfiguration { /** */ @Parameter(names = {"-s", "--serverUri"}, - description = "Link to web-control-center web-socket server, for example: wss://control-center.gridgain.com") - private String serverUri; + description = "Link to web-control-center web-socket server, for example: wss://localhost:3001 or wss://control-center.gridgain.com") + private String srvUri = "wss://localhost:3001"; /** */ @Parameter(names = {"-n", "--nodeUri"}, description = "ignite REST server, for example: http://localhost:8080") - private String nodeUri; + private String nodeUri = "http://localhost:8080"; /** */ @Parameter(names = {"-c", "--config"}, description = "Path to configuration file") private String cfgPath; /** */ - @Parameter(names = {"-drv", "--driver-folder"}, description = "Path to drivers folder") + @Parameter(names = {"-drv", "--driver-folder"}, description = "Path to folder with JDBC drivers, for example /home/user/drivers") private String driversFolder; /** @@ -84,14 +84,14 @@ public class AgentConfiguration { * @return Server URI. */ public String getServerUri() { - return serverUri; + return srvUri; } /** * @param srvUri URI. */ public void setServerUri(String srvUri) { - this.serverUri = srvUri; + this.srvUri = srvUri; } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c7367d2/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 3f04c80..aec7e92 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 @@ -48,8 +48,6 @@ public class AgentLauncher { protected static AgentConfiguration getConfiguration(String[] args) throws IOException { AgentConfiguration cfg = new AgentConfiguration(); - cfg.load(AgentLauncher.class.getResource("/default.config.properties")); - AgentConfiguration cmdCfg = new AgentConfiguration(); new JCommander(cmdCfg, args); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c7367d2/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java ---------------------------------------------------------------------- diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java index 6579578..8199ff5 100644 --- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java +++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java @@ -186,12 +186,7 @@ public class RemoteHandler implements AutoCloseable { resp.addProperty("reqId", reqId); - JsonElement resJson; - - if (type == void.class) - resJson = JsonNull.INSTANCE; - else - resJson = GSON.toJsonTree(res, type); + JsonElement resJson = type == void.class ? JsonNull.INSTANCE : GSON.toJsonTree(res, type); resp.add("res", resJson); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c7367d2/modules/control-center-agent/src/main/resources/default.config.properties ---------------------------------------------------------------------- diff --git a/modules/control-center-agent/src/main/resources/default.config.properties b/modules/control-center-agent/src/main/resources/default.config.properties deleted file mode 100644 index 0162a8c..0000000 --- a/modules/control-center-agent/src/main/resources/default.config.properties +++ /dev/null @@ -1,29 +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. - -# Ignite Control Center web-socket server URI. -serverURI=wss://localhost:3001 - -# Default Ignite node server URI. -nodeURI=http://localhost:8080 - -# Folder with available JDBC drivers -# driverFolder=/home/user/drivers - -# User's login (email) on Ignite Control Center -# login=ivan.iva...@gmail.com - -# User's password -# password=qwert \ No newline at end of file