Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C785C17B6B for ; Tue, 5 May 2015 12:17:00 +0000 (UTC) Received: (qmail 21182 invoked by uid 500); 5 May 2015 12:17:00 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 21111 invoked by uid 500); 5 May 2015 12:17:00 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 20959 invoked by uid 99); 5 May 2015 12:17:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 12:17:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [54.164.171.186] (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 12:16:52 +0000 Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 07ACB454AD for ; Tue, 5 May 2015 12:16:31 +0000 (UTC) Received: (qmail 19456 invoked by uid 99); 5 May 2015 12:16:31 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 12:16:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 899BBDFF6F; Tue, 5 May 2015 12:16:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 05 May 2015 12:17:15 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [46/50] incubator-ignite git commit: IGNITE-856 - gg.client -> ignite.client X-Virus-Checked: Checked by ClamAV on apache.org IGNITE-856 - gg.client -> ignite.client Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/54f94922 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/54f94922 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/54f94922 Branch: refs/heads/ignite-630 Commit: 54f949220433d45b543de83896ed3e357a68e04f Parents: c4bc929 Author: Ignite Teamcity Authored: Mon May 4 17:27:14 2015 -0700 Committer: Valentin Kulichenko Committed: Mon May 4 17:27:14 2015 -0700 ---------------------------------------------------------------------- .../config/grid-client-config.properties | 50 ++++++------ .../ClientPropertiesConfigurationSelfTest.java | 12 +-- .../org/apache/ignite/IgniteJdbcDriver.java | 81 ++++++++++---------- .../client/GridClientConfiguration.java | 2 +- 4 files changed, 71 insertions(+), 74 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54f94922/modules/clients/config/grid-client-config.properties ---------------------------------------------------------------------- diff --git a/modules/clients/config/grid-client-config.properties b/modules/clients/config/grid-client-config.properties index b6bce8d..d25352b 100644 --- a/modules/clients/config/grid-client-config.properties +++ b/modules/clients/config/grid-client-config.properties @@ -16,89 +16,89 @@ # # Required. Comma-separated list of servers to connect to in format "host:port". -gg.client.servers=localhost:11211 +ignite.client.servers=localhost:11211 # Optional. Default client load balancer. Default value is "". # Balancer may be "random", "roundrobin" or full class name for "your.balancer.ImplementationClass" -#gg.client.balancer= +#ignite.client.balancer= # Optional. Socket connect timeout (ms). Default value is "0". -#gg.client.connectTimeout=10000 +#ignite.client.connectTimeout=10000 # Optional. Credentials if grid requires authentication. Default value is "". -#gg.client.credentials= +#ignite.client.credentials= # Optional. Flag indicating whether topology cache is enabled. Default value is "false". -#gg.client.cacheTop=false +#ignite.client.cacheTop=false # Optional. Max time of connection idleness (ms). Default value is "30000". -#gg.client.idleTimeout=30000 +#ignite.client.idleTimeout=30000 # Optional. Client protocol, one of TCP or HTTP. Default value is "TCP". -#gg.client.protocol=TCP +#ignite.client.protocol=TCP # Optional. TCP_NODELAY communication flag. Default value is "true". -#gg.client.tcp.noDelay=true +#ignite.client.tcp.noDelay=true # Optional. Topology refresh frequency (ms). Default value is "2000". -#gg.client.topology.refresh=2000 +#ignite.client.topology.refresh=2000 # # Data configurations. # # Optional. List of comma-separated names of data configurations. Default value is "". -#gg.client.data.configurations=cfg1, cfg2 +#ignite.client.data.configurations=cfg1, cfg2 # Optional. Cache name (space) to work with (for configuration 'cfg1'). -#gg.client.data.cfg1.name= +#ignite.client.data.cfg1.name= # Optional. Specific load balancer for configuration 'cfg1'. Default value is "". # Balancer may be "random", "roundrobin" or full class name for "your.balancer.ImplementationClass" -#gg.client.data.cfg1.balancer=random +#ignite.client.data.cfg1.balancer=random # Optional. Specific affinity for configuration 'cfg1'. Default value is "". # Affinity may be "" (no affinity), "partitioned" or full class name for "your.affinity.ImplementationClass" -#gg.client.data.cfg1.affinity= +#ignite.client.data.cfg1.affinity= # Optional. Cache name (space) to work with (for configuration 'cfg2'). -#gg.client.data.cfg2.name=partitioned +#ignite.client.data.cfg2.name=partitioned # Optional. Specific load balancer for configuration 'cfg2'. Default value is "". # Balancer may be "random", "roundrobin" or full class name for "your.balancer.ImplementationClass" -#gg.client.data.cfg2.balancer=roundrobin +#ignite.client.data.cfg2.balancer=roundrobin # Optional. Specific affinity for configuration 'cfg2'. Default value is "". # Affinity may be "" (no affinity), "partitioned" or full class name for "your.affinity.ImplementationClass" -#gg.client.data.cfg2.affinity=partitioned +#ignite.client.data.cfg2.affinity=partitioned # # SSL configuration. # # Optional. SSL enabled. Default value is "false". -#gg.client.ssl.enabled=false +#ignite.client.ssl.enabled=false # Optional. SSL protocol. Default value is "TLS". -#gg.client.ssl.protocol=TLS +#ignite.client.ssl.protocol=TLS # Optional. Key manager algorithm. Default value is "SunX509". -#gg.client.ssl.key.algorithm=SunX509 +#ignite.client.ssl.key.algorithm=SunX509 # Optional. Keystore to be used by client to connect with Ignite topology over SSL. Default value is "". -#gg.client.ssl.keystore.location= +#ignite.client.ssl.keystore.location= # Optional. Default value is "". -#gg.client.ssl.keystore.password= +#ignite.client.ssl.keystore.password= # Optional. Default value is "jks". -#gg.client.ssl.keystore.type=jks +#ignite.client.ssl.keystore.type=jks # Optional. Truststore to be used by client to connect with Ignite topology over SSL. Default value is "". -#gg.client.ssl.truststore.location= +#ignite.client.ssl.truststore.location= # Optional. Default value is "". -#gg.client.ssl.truststore.password= +#ignite.client.ssl.truststore.password= # Optional. Default value is "jks". -#gg.client.ssl.truststore.type=jks +#ignite.client.ssl.truststore.type=jks http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54f94922/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java index 6e2a1eb..8e981d1 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java @@ -85,8 +85,8 @@ public class ClientPropertiesConfigurationSelfTest extends GridCommonAbstractTes for (Map.Entry e : props.entrySet()) props2.put("new." + e.getKey(), e.getValue()); - validateConfig(0, new GridClientConfiguration("new.gg.client", props2)); - validateConfig(0, new GridClientConfiguration("new.gg.client.", props2)); + validateConfig(0, new GridClientConfiguration("new.ignite.client", props2)); + validateConfig(0, new GridClientConfiguration("new.ignite.client.", props2)); // Validate loaded test configuration. File tmp = uncommentProperties(GRID_CLIENT_CONFIG); @@ -100,14 +100,14 @@ public class ClientPropertiesConfigurationSelfTest extends GridCommonAbstractTes for (Map.Entry e : props.entrySet()) props2.put("new." + e.getKey(), e.getValue()); - validateConfig(2, new GridClientConfiguration("new.gg.client", props2)); - validateConfig(2, new GridClientConfiguration("new.gg.client.", props2)); + validateConfig(2, new GridClientConfiguration("new.ignite.client", props2)); + validateConfig(2, new GridClientConfiguration("new.ignite.client.", props2)); // Validate loaded test configuration with empty key prefixes. props2 = new Properties(); for (Map.Entry e : props.entrySet()) - props2.put(e.getKey().toString().replace("gg.client.", ""), e.getValue()); + props2.put(e.getKey().toString().replace("ignite.client.", ""), e.getValue()); validateConfig(2, new GridClientConfiguration("", props2)); validateConfig(2, new GridClientConfiguration(".", props2)); @@ -156,7 +156,7 @@ public class ClientPropertiesConfigurationSelfTest extends GridCommonAbstractTes Collection lines = new ArrayList<>(); while (it.hasNext()) - lines.add(it.nextLine().replace("#gg.client.", "gg.client.")); + lines.add(it.nextLine().replace("#ignite.client.", "ignite.client.")); IgniteUtils.closeQuiet(in); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54f94922/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java b/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java index a7c2eae..17ec221 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java @@ -90,101 +90,101 @@ import java.util.logging.*; * Optional * * - * gg.client.protocol + * ignite.client.protocol * Communication protocol ({@code TCP} or {@code HTTP}). * {@code TCP} * Yes * * - * gg.client.connectTimeout + * ignite.client.connectTimeout * Socket connection timeout. * {@code 0} (infinite timeout) * Yes * * - * gg.client.tcp.noDelay + * ignite.client.tcp.noDelay * Flag indicating whether TCP_NODELAY flag should be enabled for outgoing connections. * {@code true} * Yes * * - * gg.client.ssl.enabled + * ignite.client.ssl.enabled * Flag indicating that {@code SSL} is needed for connection. * {@code false} * Yes * * - * gg.client.ssl.protocol + * ignite.client.ssl.protocol * SSL protocol ({@code SSL} or {@code TLS}). * {@code TLS} * Yes * * - * gg.client.ssl.key.algorithm + * ignite.client.ssl.key.algorithm * Key manager algorithm. * {@code SunX509} * Yes * * - * gg.client.ssl.keystore.location + * ignite.client.ssl.keystore.location * Key store to be used by client to connect with Ignite topology. *   * No (if {@code SSL} is enabled) * * - * gg.client.ssl.keystore.password + * ignite.client.ssl.keystore.password * Key store password. *   * Yes * * - * gg.client.ssl.keystore.type + * ignite.client.ssl.keystore.type * Key store type. * {@code jks} * Yes * * - * gg.client.ssl.truststore.location + * ignite.client.ssl.truststore.location * Trust store to be used by client to connect with Ignite topology. *   * No (if {@code SSL} is enabled) * * - * gg.client.ssl.truststore.password + * ignite.client.ssl.truststore.password * Trust store password. *   * Yes * * - * gg.client.ssl.truststore.type + * ignite.client.ssl.truststore.type * Trust store type. * {@code jks} * Yes * * - * gg.client.credentials + * ignite.client.credentials * Client credentials used in authentication process. *   * Yes * * - * gg.client.cache.top + * ignite.client.cache.top * * Flag indicating that topology is cached internally. Cache will be refreshed in - * the background with interval defined by {@code gg.client.topology.refresh} + * the background with interval defined by {@code ignite.client.topology.refresh} * property (see below). * * {@code false} * Yes * * - * gg.client.topology.refresh + * ignite.client.topology.refresh * Topology cache refresh frequency (ms). * {@code 2000} * Yes * * - * gg.client.idleTimeout + * ignite.client.idleTimeout * Maximum amount of time that connection can be idle before it is closed (ms). * {@code 30000} * Yes @@ -225,7 +225,7 @@ import java.util.logging.*; @SuppressWarnings("JavadocReference") public class IgniteJdbcDriver implements Driver { /** Prefix for property names. */ - private static final String PROP_PREFIX = "gg.jdbc."; + private static final String PROP_PREFIX = "ignite.jdbc."; /** Hostname property name. */ public static final String PROP_HOST = PROP_PREFIX + "host"; @@ -236,11 +236,8 @@ public class IgniteJdbcDriver implements Driver { /** Cache name property name. */ public static final String PROP_CACHE = PROP_PREFIX + "cache"; - /** Node ID URL parameter name. */ - public static final String PARAM_NODE_ID = "nodeId"; - /** Node ID property name. */ - public static final String PROP_NODE_ID = PROP_PREFIX + PARAM_NODE_ID; + public static final String PROP_NODE_ID = PROP_PREFIX + "nodeId"; /** URL prefix. */ public static final String URL_PREFIX = "jdbc:ignite://"; @@ -290,40 +287,40 @@ public class IgniteJdbcDriver implements Driver { props[1] = new PropertyInfo("Port number", info.getProperty(PROP_PORT), ""); props[2] = new PropertyInfo("Cache name", info.getProperty(PROP_CACHE), ""); props[3] = new PropertyInfo("Node ID", info.getProperty(PROP_NODE_ID, "")); - props[4] = new PropertyInfo("gg.client.protocol", info.getProperty("gg.client.protocol", "TCP"), + props[4] = new PropertyInfo("ignite.client.protocol", info.getProperty("ignite.client.protocol", "TCP"), "Communication protocol (TCP or HTTP)."); - props[5] = new PropertyInfo("gg.client.connectTimeout", info.getProperty("gg.client.connectTimeout", "0"), + props[5] = new PropertyInfo("ignite.client.connectTimeout", info.getProperty("ignite.client.connectTimeout", "0"), "Socket connection timeout."); - props[6] = new PropertyInfo("gg.client.tcp.noDelay", info.getProperty("gg.client.tcp.noDelay", "true"), + props[6] = new PropertyInfo("ignite.client.tcp.noDelay", info.getProperty("ignite.client.tcp.noDelay", "true"), "Flag indicating whether TCP_NODELAY flag should be enabled for outgoing connections."); - props[7] = new PropertyInfo("gg.client.ssl.enabled", info.getProperty("gg.client.ssl.enabled", "false"), + props[7] = new PropertyInfo("ignite.client.ssl.enabled", info.getProperty("ignite.client.ssl.enabled", "false"), "Flag indicating that SSL is needed for connection."); - props[8] = new PropertyInfo("gg.client.ssl.protocol", info.getProperty("gg.client.ssl.protocol", "TLS"), + props[8] = new PropertyInfo("ignite.client.ssl.protocol", info.getProperty("ignite.client.ssl.protocol", "TLS"), "SSL protocol."); - props[9] = new PropertyInfo("gg.client.ssl.key.algorithm", info.getProperty("gg.client.ssl.key.algorithm", + props[9] = new PropertyInfo("ignite.client.ssl.key.algorithm", info.getProperty("ignite.client.ssl.key.algorithm", "SunX509"), "Key manager algorithm."); - props[10] = new PropertyInfo("gg.client.ssl.keystore.location", - info.getProperty("gg.client.ssl.keystore.location", ""), + props[10] = new PropertyInfo("ignite.client.ssl.keystore.location", + info.getProperty("ignite.client.ssl.keystore.location", ""), "Key store to be used by client to connect with Ignite topology."); - props[11] = new PropertyInfo("gg.client.ssl.keystore.password", - info.getProperty("gg.client.ssl.keystore.password", ""), "Key store password."); - props[12] = new PropertyInfo("gg.client.ssl.keystore.type", info.getProperty("gg.client.ssl.keystore.type", + props[11] = new PropertyInfo("ignite.client.ssl.keystore.password", + info.getProperty("ignite.client.ssl.keystore.password", ""), "Key store password."); + props[12] = new PropertyInfo("ignite.client.ssl.keystore.type", info.getProperty("ignite.client.ssl.keystore.type", "jks"), "Key store type."); - props[13] = new PropertyInfo("gg.client.ssl.truststore.location", - info.getProperty("gg.client.ssl.truststore.location", ""), + props[13] = new PropertyInfo("ignite.client.ssl.truststore.location", + info.getProperty("ignite.client.ssl.truststore.location", ""), "Trust store to be used by client to connect with Ignite topology."); - props[14] = new PropertyInfo("gg.client.ssl.keystore.password", - info.getProperty("gg.client.ssl.truststore.password", ""), "Trust store password."); - props[15] = new PropertyInfo("gg.client.ssl.truststore.type", info.getProperty("gg.client.ssl.truststore.type", + props[14] = new PropertyInfo("ignite.client.ssl.keystore.password", + info.getProperty("ignite.client.ssl.truststore.password", ""), "Trust store password."); + props[15] = new PropertyInfo("ignite.client.ssl.truststore.type", info.getProperty("ignite.client.ssl.truststore.type", "jks"), "Trust store type."); - props[16] = new PropertyInfo("gg.client.credentials", info.getProperty("gg.client.credentials", ""), + props[16] = new PropertyInfo("ignite.client.credentials", info.getProperty("ignite.client.credentials", ""), "Client credentials used in authentication process."); - props[17] = new PropertyInfo("gg.client.cache.top", info.getProperty("gg.client.cache.top", "false"), + props[17] = new PropertyInfo("ignite.client.cache.top", info.getProperty("ignite.client.cache.top", "false"), "Flag indicating that topology is cached internally. Cache will be refreshed in the background with " + "interval defined by topologyRefreshFrequency property (see below)."); - props[18] = new PropertyInfo("gg.client.topology.refresh", info.getProperty("gg.client.topology.refresh", + props[18] = new PropertyInfo("ignite.client.topology.refresh", info.getProperty("ignite.client.topology.refresh", "2000"), "Topology cache refresh frequency (ms)."); - props[19] = new PropertyInfo("gg.client.idleTimeout", info.getProperty("gg.client.idleTimeout", "30000"), + props[19] = new PropertyInfo("ignite.client.idleTimeout", info.getProperty("ignite.client.idleTimeout", "30000"), "Maximum amount of time that connection can be idle before it is closed (ms)."); return props; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54f94922/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientConfiguration.java index 3d01afa..ee16f94 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientConfiguration.java @@ -160,7 +160,7 @@ public class GridClientConfiguration { * @throws GridClientException If parsing configuration failed. */ public GridClientConfiguration(Properties in) throws GridClientException { - this("gg.client", in); + this("ignite.client", in); } /**