You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2019/12/25 15:27:49 UTC
[ignite] branch ignite-12458 updated: Rename in Java
This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch ignite-12458
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/ignite-12458 by this push:
new 6ea404a Rename in Java
6ea404a is described below
commit 6ea404a4e1ae4c0c982fb1b9297b598cddcb63b2
Author: Pavel <pt...@apache.org>
AuthorDate: Wed Dec 25 18:27:32 2019 +0300
Rename in Java
---
...JdbcThinDriverPartitionAwarenessTestSuite.java} | 16 +-
.../ignite/jdbc/thin/JdbcThinAbstractSelfTest.java | 4 +-
.../JdbcThinConnectionMultipleAddressesTest.java | 2 +-
.../jdbc/thin/JdbcThinConnectionSelfTest.java | 302 ++++++++++-----------
.../jdbc/thin/JdbcThinDataSourceSelfTest.java | 2 +-
...nAwarenessReconnectionAndFailoverSelfTest.java} | 2 +-
...ava => JdbcThinPartitionAwarenessSelfTest.java} | 16 +-
...hinPartitionAwarenessTransactionsSelfTest.java} | 2 +-
.../jdbc/thin/JdbcThinStatementSelfTest.java | 4 +-
.../internal/jdbc/thin/ConnectionProperties.java | 18 +-
.../jdbc/thin/ConnectionPropertiesImpl.java | 16 +-
.../internal/jdbc/thin/JdbcThinConnection.java | 10 +-
12 files changed, 197 insertions(+), 197 deletions(-)
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcThinDriverAffinityAwarenessTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcThinDriverPartitionAwarenessTestSuite.java
similarity index 75%
rename from modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcThinDriverAffinityAwarenessTestSuite.java
rename to modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcThinDriverPartitionAwarenessTestSuite.java
index 5a2255c..0574001 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcThinDriverAffinityAwarenessTestSuite.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcThinDriverPartitionAwarenessTestSuite.java
@@ -18,9 +18,9 @@
package org.apache.ignite.jdbc.suite;
import org.apache.ignite.jdbc.thin.JdbcThinAbstractSelfTest;
-import org.apache.ignite.jdbc.thin.JdbcThinAffinityAwarenessReconnectionAndFailoverSelfTest;
-import org.apache.ignite.jdbc.thin.JdbcThinAffinityAwarenessSelfTest;
-import org.apache.ignite.jdbc.thin.JdbcThinAffinityAwarenessTransactionsSelfTest;
+import org.apache.ignite.jdbc.thin.JdbcThinPartitionAwarenessReconnectionAndFailoverSelfTest;
+import org.apache.ignite.jdbc.thin.JdbcThinPartitionAwarenessSelfTest;
+import org.apache.ignite.jdbc.thin.JdbcThinPartitionAwarenessTransactionsSelfTest;
import org.apache.ignite.jdbc.thin.JdbcThinConnectionSelfTest;
import org.apache.ignite.jdbc.thin.JdbcThinStatementSelfTest;
import org.apache.ignite.jdbc.thin.JdbcThinTcpIoTest;
@@ -37,16 +37,16 @@ import org.junit.runners.Suite;
JdbcThinConnectionSelfTest.class,
JdbcThinTcpIoTest.class,
JdbcThinStatementSelfTest.class,
- JdbcThinAffinityAwarenessSelfTest.class,
- JdbcThinAffinityAwarenessTransactionsSelfTest.class,
- JdbcThinAffinityAwarenessReconnectionAndFailoverSelfTest.class,
+ JdbcThinPartitionAwarenessSelfTest.class,
+ JdbcThinPartitionAwarenessTransactionsSelfTest.class,
+ JdbcThinPartitionAwarenessReconnectionAndFailoverSelfTest.class,
})
-public class IgniteJdbcThinDriverAffinityAwarenessTestSuite {
+public class IgniteJdbcThinDriverPartitionAwarenessTestSuite {
/**
* Setup affinity awareness mode.
*/
@BeforeClass
- public static void setupAffinityAwareness() {
+ public static void setupPartitionAwareness() {
GridTestUtils.setFieldValue(JdbcThinAbstractSelfTest.class, "affinityAwareness", true);
}
}
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractSelfTest.java
index fe4b9dd..b3a4ef7 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractSelfTest.java
@@ -42,8 +42,8 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@SuppressWarnings("ThrowableNotThrown")
public class JdbcThinAbstractSelfTest extends GridCommonAbstractTest {
- /** Signals that tests should start in affinity awareness mode. */
- public static boolean affinityAwareness;
+ /** Signals that tests should start in partition awareness mode. */
+ public static boolean partitionAwareness;
/**
* @param r Runnable to check support.
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java
index 2019cc1..35ee81a 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java
@@ -537,7 +537,7 @@ public class JdbcThinConnectionMultipleAddressesTest extends JdbcThinAbstractSel
stopAllGrids();
else {
- if (affinityAwareness) {
+ if (partitionAwareness) {
for (int i = 0; i < NODES_CNT - 1; i++)
stopGrid(i);
}
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
index f29ccfa..57b0cd0 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
@@ -89,18 +89,18 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
private static final String LOCALHOST = "127.0.0.1";
/** URL. */
- private String url = affinityAwareness ?
+ private String url = partitionAwareness ?
"jdbc:ignite:thin://127.0.0.1:10800..10802" :
"jdbc:ignite:thin://127.0.0.1";
/** URL with affinity awareness property. */
- private String urlWithAffinityAwarenessProp = url + "?affinityAwareness=" + affinityAwareness;
+ private String urlWithPartitionAwarenessProp = url + "?partitionAwareness=" + partitionAwareness;
/** URL with affinity awareness property and semicolon as delimiter. */
- private String urlWithAffinityAwarenessPropSemicolon = url + ";affinityAwareness=" + affinityAwareness;
+ private String urlWithPartitionAwarenessPropSemicolon = url + ";partitionAwareness=" + partitionAwareness;
/** Nodes count. */
- private int nodesCnt = affinityAwareness ? 4 : 2;
+ private int nodesCnt = partitionAwareness ? 4 : 2;
/** {@inheritDoc} */
@SuppressWarnings("deprecation")
@@ -175,13 +175,13 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
public void testSocketBuffers() throws Exception {
final int dfltDufSize = 64 * 1024;
- assertInvalid(urlWithAffinityAwarenessProp + "&socketSendBuffer=-1",
+ assertInvalid(urlWithPartitionAwarenessProp + "&socketSendBuffer=-1",
"Property cannot be lower than 0 [name=socketSendBuffer, value=-1]");
- assertInvalid(urlWithAffinityAwarenessProp + "&socketReceiveBuffer=-1",
+ assertInvalid(urlWithPartitionAwarenessProp + "&socketReceiveBuffer=-1",
"Property cannot be lower than 0 [name=socketReceiveBuffer, value=-1]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(dfltDufSize, io.connectionProperties().getSocketSendBuffer());
assertEquals(dfltDufSize, io.connectionProperties().getSocketReceiveBuffer());
@@ -189,21 +189,21 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
}
// Note that SO_* options are hints, so we check that value is equals to either what we set or to default.
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&socketSendBuffer=1024")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&socketSendBuffer=1024")) {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(1024, io.connectionProperties().getSocketSendBuffer());
assertEquals(dfltDufSize, io.connectionProperties().getSocketReceiveBuffer());
}
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&socketReceiveBuffer=1024")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&socketReceiveBuffer=1024")) {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(dfltDufSize, io.connectionProperties().getSocketSendBuffer());
assertEquals(1024, io.connectionProperties().getSocketReceiveBuffer());
}
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&" +
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&" +
"socketSendBuffer=1024&socketReceiveBuffer=2048")) {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(1024, io.connectionProperties().getSocketSendBuffer());
@@ -221,28 +221,28 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
public void testSocketBuffersSemicolon() throws Exception {
final int dfltDufSize = 64 * 1024;
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";socketSendBuffer=-1",
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";socketSendBuffer=-1",
"Property cannot be lower than 0 [name=socketSendBuffer, value=-1]");
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";socketReceiveBuffer=-1",
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";socketReceiveBuffer=-1",
"Property cannot be lower than 0 [name=socketReceiveBuffer, value=-1]");
// Note that SO_* options are hints, so we check that value is equals to either what we set or to default.
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";socketSendBuffer=1024")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";socketSendBuffer=1024")) {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(1024, io.connectionProperties().getSocketSendBuffer());
assertEquals(dfltDufSize, io.connectionProperties().getSocketReceiveBuffer());
}
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";socketReceiveBuffer=1024")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";socketReceiveBuffer=1024")) {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(dfltDufSize, io.connectionProperties().getSocketSendBuffer());
assertEquals(1024, io.connectionProperties().getSocketReceiveBuffer());
}
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";" +
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";" +
"socketSendBuffer=1024;socketReceiveBuffer=2048")) {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(1024, io.connectionProperties().getSocketSendBuffer());
@@ -258,21 +258,21 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testUpdateBatchSize() throws Exception {
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";updateBatchSize=-1",
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";updateBatchSize=-1",
"Property cannot be lower than 1 [name=updateBatchSize, value=-1]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon)) {
for (JdbcThinTcpIo io: ios(conn))
assertNull(io.connectionProperties().getUpdateBatchSize());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon
+ ";updateBatchSize=1024")) {
for (JdbcThinTcpIo io: ios(conn))
assertEquals(1024, (int)io.connectionProperties().getUpdateBatchSize());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp +
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp +
"&updateBatchSize=1024")) {
for (JdbcThinTcpIo io: ios(conn))
assertEquals(1024, (int)io.connectionProperties().getUpdateBatchSize());
@@ -285,19 +285,19 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
* @throws Exception If failed.
*/
@Test
- public void testAffinityAwarenessSqlCacheSizeProperty() throws Exception {
- assertInvalid(urlWithAffinityAwarenessProp + "&affinityAwarenessSQLCacheSize=0",
- "Property cannot be lower than 1 [name=affinityAwarenessSQLCacheSize, value=0]");
+ public void testPartitionAwarenessSqlCacheSizeProperty() throws Exception {
+ assertInvalid(urlWithPartitionAwarenessProp + "&partitionAwarenessSQLCacheSize=0",
+ "Property cannot be lower than 1 [name=partitionAwarenessSQLCacheSize, value=0]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
for (JdbcThinTcpIo io : ios(conn))
- assertEquals(1_000, io.connectionProperties().getAffinityAwarenessSqlCacheSize());
+ assertEquals(1_000, io.connectionProperties().getPartitionAwarenessSqlCacheSize());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp +
- "&affinityAwarenessSQLCacheSize=100")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp +
+ "&partitionAwarenessSQLCacheSize=100")) {
for (JdbcThinTcpIo io : ios(conn))
- assertEquals(100, io.connectionProperties().getAffinityAwarenessSqlCacheSize());
+ assertEquals(100, io.connectionProperties().getPartitionAwarenessSqlCacheSize());
}
}
@@ -307,19 +307,19 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
* @throws Exception If failed.
*/
@Test
- public void testAffinityAwarenessSqlCacheSizePropertySemicolon() throws Exception {
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";affinityAwarenessSQLCacheSize=0",
- "Property cannot be lower than 1 [name=affinityAwarenessSQLCacheSize, value=0]");
+ public void testPartitionAwarenessSqlCacheSizePropertySemicolon() throws Exception {
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";partitionAwarenessSQLCacheSize=0",
+ "Property cannot be lower than 1 [name=partitionAwarenessSQLCacheSize, value=0]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon)) {
for (JdbcThinTcpIo io : ios(conn))
- assertEquals(1_000, io.connectionProperties().getAffinityAwarenessSqlCacheSize());
+ assertEquals(1_000, io.connectionProperties().getPartitionAwarenessSqlCacheSize());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon +
- ";affinityAwarenessSQLCacheSize=100")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon +
+ ";partitionAwarenessSQLCacheSize=100")) {
for (JdbcThinTcpIo io : ios(conn))
- assertEquals(100, io.connectionProperties().getAffinityAwarenessSqlCacheSize());
+ assertEquals(100, io.connectionProperties().getPartitionAwarenessSqlCacheSize());
}
}
@@ -329,21 +329,21 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
* @throws Exception If failed.
*/
@Test
- public void testAffinityAwarenessPartitionDistributionsCacheSizeProperty() throws Exception {
- assertInvalid(urlWithAffinityAwarenessProp + "&affinityAwarenessPartitionDistributionsCacheSize=0",
- "Property cannot be lower than 1 [name=affinityAwarenessPartitionDistributionsCacheSize, value=0]");
+ public void testPartitionAwarenessPartitionDistributionsCacheSizeProperty() throws Exception {
+ assertInvalid(urlWithPartitionAwarenessProp + "&partitionAwarenessPartitionDistributionsCacheSize=0",
+ "Property cannot be lower than 1 [name=partitionAwarenessPartitionDistributionsCacheSize, value=0]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
for (JdbcThinTcpIo io : ios(conn)) {
assertEquals(1_000,
- io.connectionProperties().getAffinityAwarenessPartitionDistributionsCacheSize());
+ io.connectionProperties().getPartitionAwarenessPartitionDistributionsCacheSize());
}
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp +
- "&affinityAwarenessPartitionDistributionsCacheSize=100")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp +
+ "&partitionAwarenessPartitionDistributionsCacheSize=100")) {
for (JdbcThinTcpIo io : ios(conn))
- assertEquals(100, io.connectionProperties().getAffinityAwarenessPartitionDistributionsCacheSize());
+ assertEquals(100, io.connectionProperties().getPartitionAwarenessPartitionDistributionsCacheSize());
}
}
@@ -353,21 +353,21 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
* @throws Exception If failed.
*/
@Test
- public void testAffinityAwarenessPartitionDistributionsCacheSizePropertySemicolon() throws Exception {
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";affinityAwarenessPartitionDistributionsCacheSize=0",
- "Property cannot be lower than 1 [name=affinityAwarenessPartitionDistributionsCacheSize, value=0]");
+ public void testPartitionAwarenessPartitionDistributionsCacheSizePropertySemicolon() throws Exception {
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";partitionAwarenessPartitionDistributionsCacheSize=0",
+ "Property cannot be lower than 1 [name=partitionAwarenessPartitionDistributionsCacheSize, value=0]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon)) {
for (JdbcThinTcpIo io : ios(conn)) {
assertEquals(1_000,
- io.connectionProperties().getAffinityAwarenessPartitionDistributionsCacheSize());
+ io.connectionProperties().getPartitionAwarenessPartitionDistributionsCacheSize());
}
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon +
- ";affinityAwarenessPartitionDistributionsCacheSize=100")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon +
+ ";partitionAwarenessPartitionDistributionsCacheSize=100")) {
for (JdbcThinTcpIo io : ios(conn))
- assertEquals(100, io.connectionProperties().getAffinityAwarenessPartitionDistributionsCacheSize());
+ assertEquals(100, io.connectionProperties().getPartitionAwarenessPartitionDistributionsCacheSize());
}
}
@@ -378,45 +378,45 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testSqlHints() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assertHints(conn, false, false, false, false, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&distributedJoins=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&distributedJoins=true")) {
assertHints(conn, true, false, false, false, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&enforceJoinOrder=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&enforceJoinOrder=true")) {
assertHints(conn, false, true, false, false, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&collocated=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&collocated=true")) {
assertHints(conn, false, false, true, false, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&replicatedOnly=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&replicatedOnly=true")) {
assertHints(conn, false, false, false, true, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&lazy=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&lazy=true")) {
assertHints(conn, false, false, false, false, true,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&skipReducerOnUpdate=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&skipReducerOnUpdate=true")) {
assertHints(conn, false, false, false, false, false,
- true, affinityAwareness);
+ true, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&distributedJoins=true&" +
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&distributedJoins=true&" +
"enforceJoinOrder=true&collocated=true&replicatedOnly=true&lazy=true&skipReducerOnUpdate=true")) {
assertHints(conn, true, true, true, true, true,
- true, affinityAwareness);
+ true, partitionAwareness);
}
}
@@ -427,40 +427,40 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testSqlHintsSemicolon() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";distributedJoins=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";distributedJoins=true")) {
assertHints(conn, true, false, false, false, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";enforceJoinOrder=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";enforceJoinOrder=true")) {
assertHints(conn, false, true, false, false, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";collocated=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";collocated=true")) {
assertHints(conn, false, false, true, false, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";replicatedOnly=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";replicatedOnly=true")) {
assertHints(conn, false, false, false, true, false,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";lazy=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";lazy=true")) {
assertHints(conn, false, false, false, false, true,
- false, affinityAwareness);
+ false, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";skipReducerOnUpdate=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";skipReducerOnUpdate=true")) {
assertHints(conn, false, false, false, false, false,
- true, affinityAwareness);
+ true, partitionAwareness);
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";distributedJoins=true;" +
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";distributedJoins=true;" +
"enforceJoinOrder=true;collocated=true;replicatedOnly=true;lazy=true;skipReducerOnUpdate=true")) {
assertHints(conn, true, true, true, true, true,
- true, affinityAwareness);
+ true, partitionAwareness);
}
}
@@ -477,7 +477,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
* @throws Exception If failed.
*/
private void assertHints(Connection conn, boolean distributedJoins, boolean enforceJoinOrder, boolean collocated,
- boolean replicatedOnly, boolean lazy, boolean skipReducerOnUpdate, boolean affinityAwarenessEnabled)throws Exception {
+ boolean replicatedOnly, boolean lazy, boolean skipReducerOnUpdate, boolean partitionAwarenessEnabled)throws Exception {
for (JdbcThinTcpIo io: ios(conn)) {
assertEquals(distributedJoins, io.connectionProperties().isDistributedJoins());
assertEquals(enforceJoinOrder, io.connectionProperties().isEnforceJoinOrder());
@@ -485,7 +485,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
assertEquals(replicatedOnly, io.connectionProperties().isReplicatedOnly());
assertEquals(lazy, io.connectionProperties().isLazy());
assertEquals(skipReducerOnUpdate, io.connectionProperties().isSkipReducerOnUpdate());
- assertEquals(affinityAwarenessEnabled, io.connectionProperties().isAffinityAwareness());
+ assertEquals(partitionAwarenessEnabled, io.connectionProperties().isPartitionAwareness());
}
}
@@ -496,39 +496,39 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testTcpNoDelay() throws Exception {
- assertInvalid(urlWithAffinityAwarenessProp + "&tcpNoDelay=0",
+ assertInvalid(urlWithPartitionAwarenessProp + "&tcpNoDelay=0",
"Invalid property value. [name=tcpNoDelay, val=0, choices=[true, false]]");
- assertInvalid(urlWithAffinityAwarenessProp + "&tcpNoDelay=1",
+ assertInvalid(urlWithPartitionAwarenessProp + "&tcpNoDelay=1",
"Invalid property value. [name=tcpNoDelay, val=1, choices=[true, false]]");
- assertInvalid(urlWithAffinityAwarenessProp + "&tcpNoDelay=false1",
+ assertInvalid(urlWithPartitionAwarenessProp + "&tcpNoDelay=false1",
"Invalid property value. [name=tcpNoDelay, val=false1, choices=[true, false]]");
- assertInvalid(urlWithAffinityAwarenessProp + "&tcpNoDelay=true1",
+ assertInvalid(urlWithPartitionAwarenessProp + "&tcpNoDelay=true1",
"Invalid property value. [name=tcpNoDelay, val=true1, choices=[true, false]]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
for (JdbcThinTcpIo io: ios(conn))
assertTrue(io.connectionProperties().isTcpNoDelay());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&tcpNoDelay=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&tcpNoDelay=true")) {
for (JdbcThinTcpIo io: ios(conn))
assertTrue(io.connectionProperties().isTcpNoDelay());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&tcpNoDelay=True")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&tcpNoDelay=True")) {
for (JdbcThinTcpIo io: ios(conn))
assertTrue(io.connectionProperties().isTcpNoDelay());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&tcpNoDelay=false")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&tcpNoDelay=false")) {
for (JdbcThinTcpIo io: ios(conn))
assertFalse(io.connectionProperties().isTcpNoDelay());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp + "&tcpNoDelay=False")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp + "&tcpNoDelay=False")) {
for (JdbcThinTcpIo io: ios(conn))
assertFalse(io.connectionProperties().isTcpNoDelay());
}
@@ -541,34 +541,34 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testTcpNoDelaySemicolon() throws Exception {
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=0",
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=0",
"Invalid property value. [name=tcpNoDelay, val=0, choices=[true, false]]");
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=1",
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=1",
"Invalid property value. [name=tcpNoDelay, val=1, choices=[true, false]]");
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=false1",
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=false1",
"Invalid property value. [name=tcpNoDelay, val=false1, choices=[true, false]]");
- assertInvalid(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=true1",
+ assertInvalid(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=true1",
"Invalid property value. [name=tcpNoDelay, val=true1, choices=[true, false]]");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=true")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=true")) {
for (JdbcThinTcpIo io: ios(conn))
assertTrue(io.connectionProperties().isTcpNoDelay());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=True")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=True")) {
for (JdbcThinTcpIo io: ios(conn))
assertTrue(io.connectionProperties().isTcpNoDelay());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=false")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=false")) {
for (JdbcThinTcpIo io: ios(conn))
assertFalse(io.connectionProperties().isTcpNoDelay());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";tcpNoDelay=False")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";tcpNoDelay=False")) {
for (JdbcThinTcpIo io: ios(conn))
assertFalse(io.connectionProperties().isTcpNoDelay());
}
@@ -581,7 +581,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testAutoCloseServerCursorProperty() throws Exception {
- String url = urlWithAffinityAwarenessProp + "&autoCloseServerCursor";
+ String url = urlWithPartitionAwarenessProp + "&autoCloseServerCursor";
String err = "Invalid property value. [name=autoCloseServerCursor";
@@ -590,7 +590,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
assertInvalid(url + "=false1", err);
assertInvalid(url + "=true1", err);
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
for (JdbcThinTcpIo io: ios(conn))
assertFalse(io.connectionProperties().isAutoCloseServerCursor());
}
@@ -623,7 +623,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testAutoCloseServerCursorPropertySemicolon() throws Exception {
- String url = urlWithAffinityAwarenessPropSemicolon + ";autoCloseServerCursor";
+ String url = urlWithPartitionAwarenessPropSemicolon + ";autoCloseServerCursor";
String err = "Invalid property value. [name=autoCloseServerCursor";
@@ -683,15 +683,15 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testSchemaSemicolon() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";schema=public")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";schema=public")) {
assertEquals("Invalid schema", "PUBLIC", conn.getSchema());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";schema=\"" + DEFAULT_CACHE_NAME + '"')) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";schema=\"" + DEFAULT_CACHE_NAME + '"')) {
assertEquals("Invalid schema", DEFAULT_CACHE_NAME, conn.getSchema());
}
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessPropSemicolon + ";schema=_not_exist_schema_")) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessPropSemicolon + ";schema=_not_exist_schema_")) {
assertEquals("Invalid schema", "_NOT_EXIST_SCHEMA_", conn.getSchema());
}
}
@@ -706,7 +706,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
private static Collection<JdbcThinTcpIo> ios(Connection conn) throws Exception {
JdbcThinConnection conn0 = conn.unwrap(JdbcThinConnection.class);
- Collection<JdbcThinTcpIo> ios = affinityAwareness ? ((Map<UUID, JdbcThinTcpIo>)
+ Collection<JdbcThinTcpIo> ios = partitionAwareness ? ((Map<UUID, JdbcThinTcpIo>)
getFieldValue(conn0, JdbcThinConnection.class, "ios")).values() :
Collections.singleton(getFieldValue(conn0, JdbcThinConnection.class, "singleIo"));
@@ -740,7 +740,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
public void testClose() throws Exception {
final Connection conn;
- try (Connection conn0 = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn0 = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn = conn0;
assert conn != null;
@@ -765,7 +765,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateStatement() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
try (Statement stmt = conn.createStatement()) {
assertNotNull(stmt);
@@ -788,7 +788,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateStatement2() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
int [] rsTypes = new int[]
{TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE};
@@ -842,7 +842,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateStatement3() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
int [] rsTypes = new int[]
{TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE};
@@ -902,7 +902,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testPrepareStatement() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// null query text
assertThrows(log,
new Callable<Object>() {
@@ -936,7 +936,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testPrepareStatement3() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final String sqlText = "select * from test where param = ?";
int [] rsTypes = new int[]
@@ -997,7 +997,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testPrepareStatement4() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final String sqlText = "select * from test where param = ?";
int [] rsTypes = new int[]
@@ -1063,7 +1063,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testPrepareStatementAutoGeneratedKeysUnsupported() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final String sqlText = "insert into test (val) values (?)";
assertThrows(log,
@@ -1113,7 +1113,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testPrepareCallUnsupported() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final String sqlText = "exec test()";
assertThrows(log,
@@ -1154,7 +1154,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testNativeSql() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// null query text
assertThrows(log,
new Callable<Object>() {
@@ -1186,7 +1186,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetAutoCommit() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
boolean ac0 = conn.getAutoCommit();
conn.setAutoCommit(!ac0);
@@ -1211,7 +1211,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCommit() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Should not be called in auto-commit mode
assertThrows(log,
new Callable<Object>() {
@@ -1256,7 +1256,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testRollback() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Should not be called in auto-commit mode
assertThrows(log,
new Callable<Object>() {
@@ -1286,7 +1286,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testBeginFailsWhenMvccIsDisabled() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn.createStatement().execute("BEGIN");
fail("Exception is expected");
@@ -1301,7 +1301,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCommitIgnoredWhenMvccIsDisabled() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn.setAutoCommit(false);
conn.createStatement().execute("COMMIT");
@@ -1315,7 +1315,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testRollbackIgnoredWhenMvccIsDisabled() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn.setAutoCommit(false);
conn.createStatement().execute("ROLLBACK");
@@ -1330,7 +1330,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetMetaData() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
DatabaseMetaData meta = conn.getMetaData();
assertNotNull(meta);
@@ -1351,7 +1351,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetReadOnly() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn.close();
// Exception when called on closed connection
@@ -1375,7 +1375,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetCatalog() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assert !conn.getMetaData().supportsCatalogsInDataManipulation();
assertNull(conn.getCatalog());
@@ -1407,7 +1407,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetTransactionIsolation() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Invalid parameter value
assertThrows(log,
new Callable<Object>() {
@@ -1458,7 +1458,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testClearGetWarnings() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
SQLWarning warn = conn.getWarnings();
assertNull(warn);
@@ -1492,7 +1492,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetTypeMap() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -1548,7 +1548,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetHoldability() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// default value
assertEquals(conn.getMetaData().getResultSetHoldability(), conn.getHoldability());
@@ -1602,7 +1602,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testSetSavepoint() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assert !conn.getMetaData().supportsSavepoints();
// Disallowed in auto-commit mode
@@ -1633,7 +1633,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testSetSavepointName() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assert !conn.getMetaData().supportsSavepoints();
// Invalid arg
@@ -1679,7 +1679,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testRollbackSavePoint() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assert !conn.getMetaData().supportsSavepoints();
// Invalid arg
@@ -1725,7 +1725,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testReleaseSavepoint() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assert !conn.getMetaData().supportsSavepoints();
// Invalid arg
@@ -1764,7 +1764,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateClob() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Unsupported
assertThrows(log,
new Callable<Object>() {
@@ -1795,7 +1795,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateBlob() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Unsupported
assertThrows(log,
new Callable<Object>() {
@@ -1826,7 +1826,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateNClob() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Unsupported
assertThrows(log,
new Callable<Object>() {
@@ -1857,7 +1857,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateSQLXML() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Unsupported
assertThrows(log,
new Callable<Object>() {
@@ -1890,7 +1890,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
public void testGetSetClientInfoPair() throws Exception {
// fail("https://issues.apache.org/jira/browse/IGNITE-5425");
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final String name = "ApplicationName";
final String val = "SelfTest";
@@ -1924,7 +1924,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetClientInfoProperties() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final String name = "ApplicationName";
final String val = "SelfTest";
@@ -1963,7 +1963,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateArrayOf() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final String typeName = "varchar";
final String[] elements = new String[] {"apple", "pear"};
@@ -2004,7 +2004,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testCreateStruct() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// Invalid typename
assertThrows(log,
new Callable<Object>() {
@@ -2041,7 +2041,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetSchema() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
assertEquals("PUBLIC", conn.getSchema());
final String schema = "test";
@@ -2075,7 +2075,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testAbort() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
//Invalid executor
assertThrows(log,
new Callable<Object>() {
@@ -2102,7 +2102,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
*/
@Test
public void testGetSetNetworkTimeout() throws Exception {
- try (Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
// default
assertEquals(0, conn.getNetworkTimeout());
@@ -2150,7 +2150,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
public void testInvalidNestedTxMode() {
assertThrows(null, new Callable<Object>() {
@Override public Object call() throws Exception {
- DriverManager.getConnection(urlWithAffinityAwarenessProp + "&nestedTransactionsMode=invalid");
+ DriverManager.getConnection(urlWithPartitionAwarenessProp + "&nestedTransactionsMode=invalid");
return null;
}
@@ -2170,7 +2170,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
connProps.nestedTxMode("invalid");
- connProps.setAffinityAwareness(affinityAwareness);
+ connProps.setPartitionAwareness(partitionAwareness);
assertThrows(null, new Callable<Object>() {
@SuppressWarnings("ResultOfObjectAllocationIgnored")
@@ -2188,7 +2188,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
public void testSslClientAndPlainServer() {
Throwable e = assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
- DriverManager.getConnection(urlWithAffinityAwarenessProp + "&sslMode=require" +
+ DriverManager.getConnection(urlWithPartitionAwarenessProp + "&sslMode=require" +
"&sslClientCertificateKeyStoreUrl=" + CLI_KEY_STORE_PATH +
"&sslClientCertificateKeyStorePassword=123456" +
"&sslTrustCertificateKeyStoreUrl=" + SRV_KEY_STORE_PATH +
@@ -2196,9 +2196,9 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
return null;
}
- }, SQLException.class, affinityAwareness ? "Failed to connect to server" : "Failed to SSL connect to server");
+ }, SQLException.class, partitionAwareness ? "Failed to connect to server" : "Failed to SSL connect to server");
- if (affinityAwareness) {
+ if (partitionAwareness) {
for (Throwable t: e.getSuppressed()) {
assertEquals(SQLException.class, t.getClass());
assertTrue(t.getMessage().contains("Failed to SSL connect to server"));
@@ -2219,7 +2219,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest {
final AtomicInteger exCnt = new AtomicInteger(0);
- try (final Connection conn = DriverManager.getConnection(urlWithAffinityAwarenessProp)) {
+ try (final Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
final IgniteInternalFuture f = runMultiThreadedAsync(new Runnable() {
@Override public void run() {
try {
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java
index b2de045..51545e5 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java
@@ -283,7 +283,7 @@ public class JdbcThinDataSourceSelfTest extends JdbcThinAbstractSelfTest {
private static Collection<JdbcThinTcpIo> ios(Connection conn) throws Exception {
JdbcThinConnection conn0 = conn.unwrap(JdbcThinConnection.class);
- Collection<JdbcThinTcpIo> ios = affinityAwareness ? ((Map<UUID, JdbcThinTcpIo>)
+ Collection<JdbcThinTcpIo> ios = partitionAwareness ? ((Map<UUID, JdbcThinTcpIo>)
GridTestUtils.getFieldValue(conn0, JdbcThinConnection.class, "ios")).values() :
Collections.singleton(GridTestUtils.getFieldValue(conn0, JdbcThinConnection.class, "singleIo"));
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessReconnectionAndFailoverSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessReconnectionAndFailoverSelfTest.java
similarity index 99%
rename from modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessReconnectionAndFailoverSelfTest.java
rename to modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessReconnectionAndFailoverSelfTest.java
index 8eefa2e24..3c992cd 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessReconnectionAndFailoverSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessReconnectionAndFailoverSelfTest.java
@@ -54,7 +54,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
/**
* Jdbc thin affinity awareness reconnection and query failover test.
*/
-public class JdbcThinAffinityAwarenessReconnectionAndFailoverSelfTest extends JdbcThinAbstractSelfTest {
+public class JdbcThinPartitionAwarenessReconnectionAndFailoverSelfTest extends JdbcThinAbstractSelfTest {
/** Rows count. */
private static final int ROWS_COUNT = 100;
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessSelfTest.java
similarity index 97%
rename from modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessSelfTest.java
rename to modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessSelfTest.java
index 1383c5a..ac1e1ad 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessSelfTest.java
@@ -56,10 +56,10 @@ import org.junit.Test;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
/**
- * Jdbc thin affinity awareness test.
+ * Jdbc thin partition awareness test.
*/
@SuppressWarnings({"ThrowableNotThrown"})
-public class JdbcThinAffinityAwarenessSelfTest extends JdbcThinAbstractSelfTest {
+public class JdbcThinPartitionAwarenessSelfTest extends JdbcThinAbstractSelfTest {
/** URL. */
private static final String URL = "jdbc:ignite:thin://127.0.0.1:10800..10802?affinityAwareness=true";
@@ -411,7 +411,7 @@ public class JdbcThinAffinityAwarenessSelfTest extends JdbcThinAbstractSelfTest
* @throws Exception If failed.
*/
@Test
- public void testChangeTopologyDetectionWithinAffinityAwarenessUnrelatedQuery() throws Exception {
+ public void testChangeTopologyDetectionWithinPartitionAwarenessUnrelatedQuery() throws Exception {
final String sqlQry = "select * from Person where _key = 1";
ResultSet rs = stmt.executeQuery(sqlQry);
@@ -428,12 +428,12 @@ public class JdbcThinAffinityAwarenessSelfTest extends JdbcThinAbstractSelfTest
}
/**
- * Check that client side affinity awareness optimizations are skipped if affinityAwareness is switched off.
+ * Check that client side partition awareness optimizations are skipped if affinityAwareness is switched off.
*
* @throws Exception If failed.
*/
@Test
- public void testAffinityAwarenessIsSkippedIfItIsSwitchedOff() throws Exception {
+ public void testPartitionAwarenessIsSkippedIfItIsSwitchedOff() throws Exception {
try (Connection conn = DriverManager.getConnection(
"jdbc:ignite:thin://127.0.0.1:10800..10802?affinityAwareness=false");
Statement stmt = conn.createStatement()) {
@@ -453,12 +453,12 @@ public class JdbcThinAffinityAwarenessSelfTest extends JdbcThinAbstractSelfTest
}
/**
- * Check that client side affinity awareness optimizations are skipped by default.
+ * Check that client side partition awareness optimizations are skipped by default.
*
* @throws Exception If failed.
*/
@Test
- public void testAffinityAwarenessIsSkippedByDefault() throws Exception {
+ public void testPartitionAwarenessIsSkippedByDefault() throws Exception {
try (Connection conn = DriverManager.getConnection(
"jdbc:ignite:thin://127.0.0.1:10800..10802");
Statement stmt = conn.createStatement()) {
@@ -562,7 +562,7 @@ public class JdbcThinAffinityAwarenessSelfTest extends JdbcThinAbstractSelfTest
* @throws Exception If failed.
*/
@Test
- public void testAffinityAwarenessLimitedCacheSize() throws Exception {
+ public void testPartitionAwarenessLimitedCacheSize() throws Exception {
try (Connection conn = DriverManager.getConnection(
"jdbc:ignite:thin://127.0.0.1:10800..10802?affinityAwareness=true" +
"&affinityAwarenessSQLCacheSize=1&affinityAwarenessPartitionDistributionsCacheSize=1");
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessTransactionsSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessTransactionsSelfTest.java
similarity index 99%
rename from modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessTransactionsSelfTest.java
rename to modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessTransactionsSelfTest.java
index dae87ed..cf10bae 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAffinityAwarenessTransactionsSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPartitionAwarenessTransactionsSelfTest.java
@@ -39,7 +39,7 @@ import org.junit.Test;
/**
* Jdbc thin transactional affinity awareness test.
*/
-public class JdbcThinAffinityAwarenessTransactionsSelfTest extends JdbcThinAbstractSelfTest {
+public class JdbcThinPartitionAwarenessTransactionsSelfTest extends JdbcThinAbstractSelfTest {
/** */
private static final String URL = "jdbc:ignite:thin://127.0.0.1:10800..10802?affinityAwareness=true";
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java
index e4ed1e38..8a8e852 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementSelfTest.java
@@ -44,12 +44,12 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@SuppressWarnings({"ThrowableNotThrown"})
public class JdbcThinStatementSelfTest extends JdbcThinAbstractSelfTest {
/** URL. */
- private String url = affinityAwareness ?
+ private String url = partitionAwareness ?
"jdbc:ignite:thin://127.0.0.1:10800..10802?affinityAwareness=true" :
"jdbc:ignite:thin://127.0.0.1?affinityAwareness=false";
/** Nodes count. */
- private int nodesCnt = affinityAwareness ? 4 : 3;
+ private int nodesCnt = partitionAwareness ? 4 : 3;
/** SQL query. */
private static final String SQL = "select * from Person where age > 30";
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java
index f728d12..832e650 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java
@@ -410,13 +410,13 @@ public interface ConnectionProperties {
* @return {@code true} if jdbc thin affinity awareness is enabled for this connection,
* {@code false} if it's disabled.
*/
- public boolean isAffinityAwareness();
+ public boolean isPartitionAwareness();
/**
- * @param affinityAwareness {@code true} if jdbc thin affinity awareness is enabled
+ * @param partitionAwareness {@code true} if jdbc thin affinity awareness is enabled
* for this connection, if {@code false} then it's disabled.
*/
- public void setAffinityAwareness(boolean affinityAwareness);
+ public void setPartitionAwareness(boolean partitionAwareness);
/**
* Note: Batch size of 1 prevents deadlock on update where keys sequence are different in several concurrent updates.
@@ -436,7 +436,7 @@ public interface ConnectionProperties {
/**
* @return SQL cache size that is used within affinity awareness optimizations.
*/
- public int getAffinityAwarenessSqlCacheSize();
+ public int getPartitionAwarenessSqlCacheSize();
/**
* Sets SQL cache size that is used within affinity awareness optimizations.
@@ -444,21 +444,21 @@ public interface ConnectionProperties {
* @param affinityAwarenessSqlCacheSize SQL cache size.
* @throws SQLException On error.
*/
- public void setAffinityAwarenessSqlCacheSize(int affinityAwarenessSqlCacheSize) throws SQLException;
+ public void setPartitionAwarenessSqlCacheSize(int affinityAwarenessSqlCacheSize) throws SQLException;
/**
* @return Partition distributions cache size that is used within affinity awareness optimizations.
*/
- public int getAffinityAwarenessPartitionDistributionsCacheSize();
+ public int getPartitionAwarenessPartitionDistributionsCacheSize();
/**
* Sets partition distributions cache size that is used within affinity awareness optimizations.
*
- * @param affinityAwarenessPartDistributionsCacheSize Partition distributions cache size.
+ * @param partitionAwarenessPartDistributionsCacheSize Partition distributions cache size.
* @throws SQLException On error.
*/
- public void setAffinityAwarenessPartitionDistributionsCacheSize(
- int affinityAwarenessPartDistributionsCacheSize) throws SQLException;
+ public void setPartitionAwarenessPartitionDistributionsCacheSize(
+ int partitionAwarenessPartDistributionsCacheSize) throws SQLException;
/**
* Note: zero value means there is no limits.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java
index 30af93f..6c67416 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java
@@ -546,12 +546,12 @@ public class ConnectionPropertiesImpl implements ConnectionProperties, Serializa
}
/** {@inheritDoc} */
- @Override public boolean isAffinityAwareness() {
+ @Override public boolean isPartitionAwareness() {
return affinityAwareness.value();
}
/** {@inheritDoc} */
- @Override public void setAffinityAwareness(boolean affinityAwareness) {
+ @Override public void setPartitionAwareness(boolean affinityAwareness) {
this.affinityAwareness.setValue(affinityAwareness);
}
@@ -566,26 +566,26 @@ public class ConnectionPropertiesImpl implements ConnectionProperties, Serializa
}
/** {@inheritDoc} */
- @Override public int getAffinityAwarenessSqlCacheSize() {
+ @Override public int getPartitionAwarenessSqlCacheSize() {
return affinityAwarenessSQLCacheSize.value();
}
/** {@inheritDoc} */
- @Override public void setAffinityAwarenessSqlCacheSize(int affinityAwarenessSQLCacheSize)
+ @Override public void setPartitionAwarenessSqlCacheSize(int affinityAwarenessSQLCacheSize)
throws SQLException {
this.affinityAwarenessSQLCacheSize.setValue(affinityAwarenessSQLCacheSize);
}
/** {@inheritDoc} */
- @Override public int getAffinityAwarenessPartitionDistributionsCacheSize() {
+ @Override public int getPartitionAwarenessPartitionDistributionsCacheSize() {
return affinityAwarenessPartDistributionsCacheSize.value();
}
/** {@inheritDoc} */
- @Override public void setAffinityAwarenessPartitionDistributionsCacheSize(
- int affinityAwarenessPartDistributionsCacheSize) throws SQLException {
+ @Override public void setPartitionAwarenessPartitionDistributionsCacheSize(
+ int partitionAwarenessPartDistributionsCacheSize) throws SQLException {
this.affinityAwarenessPartDistributionsCacheSize.setValue(
- affinityAwarenessPartDistributionsCacheSize);
+ partitionAwarenessPartDistributionsCacheSize);
}
/** {@inheritDoc} */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
index 60fc1c4..7b24610 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
@@ -235,7 +235,7 @@ public class JdbcThinConnection implements Connection {
schema = JdbcUtils.normalizeSchema(connProps.getSchema());
- affinityAwareness = connProps.isAffinityAwareness();
+ affinityAwareness = connProps.isPartitionAwareness();
if (affinityAwareness) {
baseEndpointVer = connectInBestEffortAffinityMode(null);
@@ -1075,8 +1075,8 @@ public class JdbcThinConnection implements Connection {
if (affinityCache.version().compareTo(resAffinityVer) < 0) {
affinityCache = new AffinityCache(
resAffinityVer,
- connProps.getAffinityAwarenessPartitionDistributionsCacheSize(),
- connProps.getAffinityAwarenessSqlCacheSize());
+ connProps.getPartitionAwarenessPartitionDistributionsCacheSize(),
+ connProps.getPartitionAwarenessSqlCacheSize());
}
else if (affinityCache.version().compareTo(resAffinityVer) > 0) {
// Jdbc thin affinity cache is binded to the newer affinity topology version, so we should ignore retrieved
@@ -1733,8 +1733,8 @@ public class JdbcThinConnection implements Connection {
if (resAffVer != null && (affinityCache == null || affinityCache.version().compareTo(resAffVer) < 0)) {
affinityCache = new AffinityCache(
resAffVer,
- connProps.getAffinityAwarenessPartitionDistributionsCacheSize(),
- connProps.getAffinityAwarenessSqlCacheSize());
+ connProps.getPartitionAwarenessPartitionDistributionsCacheSize(),
+ connProps.getPartitionAwarenessSqlCacheSize());
}
// Partition result was requested.