Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gg-21342 #187

Open
wants to merge 154 commits into
base: ignite-2.5-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
b457b03
GG-14719 jackson dependency upgraded to 2.9.9
antkr Jun 3, 2019
53899a0
GG-14930 Upgraded Jetty dependency to 9.4.18
antkr Jun 3, 2019
422e6ce
GG-19121 commons-codec dependency upgraded to 1.12
antkr Jun 3, 2019
e33a69a
GG-20558 Recovery mode for page memory used only for binary restore
akalash Jul 2, 2019
859c409
GG-20536 Holding exception at the record reading until next call of i…
akalash Jul 2, 2019
c41982f
GG-14970 IdleVerify command should print end time of execution.
6uest Jun 14, 2019
7719fe9
GG-20761 [GG-20749] remove migration pendingTree compatibility test f…
dgovorukhin Jul 3, 2019
5a616de
GG-20420 NullPointerException If transaction failed and failure handl…
Jul 3, 2019
3b97ac7
GG-20193 fix IGNITE-9858 adapted into the branch
sergey-chugunov-1985 Jul 3, 2019
58510ca
GG-20702 Fix invalid partition clearing.
ascherbakoff Jul 3, 2019
1c9dbe2
GG-20464 backport to 8.5-master of GG-19518 IoStatisticsBasicIndexSel…
korlov42 Jul 3, 2019
b823cc6
GG-20798 Fix failing tests.
ascherbakoff Jul 3, 2019
44091fa
GG-19492 Add debug output for o.a.i.internal.processors.cache.persist…
6uest Jul 1, 2019
b01ce11
GG-18891 CommandHandlerParsingTest#testExperimentalCommandIsDisabled(…
Jul 4, 2019
20df5b0
Merge branch 'ignite-2.5-master' of https://github.com/gridgain/apach…
Jul 4, 2019
ad9070d
GG-20810 backport to 8.5-master of GG-20807 Fix failing IoStatisticsB…
korlov42 Jul 4, 2019
3616b6a
GG-19515: GG: destroying of the cache and re-creating with the same n…
ibelyakov Jul 5, 2019
b04ec7e
GG-20822: Compact log and drop log level down to info for cancelled q…
AMashenkov Jul 5, 2019
21de580
Revert "GG-19515: GG: destroying of the cache and re-creating with th…
ibelyakov Jul 7, 2019
b773b6c
GG-21061 [GG-21057] Fixed IgniteCacheReplicatedQuerySelfTest.testNode…
dgovorukhin Jul 8, 2019
d8a004f
GG-21074 [GG-21055] Fixed IgniteClusterActivateDeactivateTest.testDea…
dgovorukhin Jul 8, 2019
dfff292
GG-20185 control.sh validate_indexes SQL Index issue must contain inf…
Jul 8, 2019
e093eeb
GG-20917 [8.5-next]-[GG-20908] Set max possible maintenance version f…
Jul 8, 2019
0adf555
GG-20729 Add ability to set default parallelism of rebuild indexes in…
Jul 2, 2019
ca61a70
GG-20845 Added explicit indexes to WALRecord.RecordType.
ibessonov Jul 9, 2019
91c2faa
GG-19486 Fixed IgniteOutOfMemoryException when IgniteCache#clear() is…
sk0x50 Jul 9, 2019
f593ded
GG-20875 Fix assertion on counter reservation.
ascherbakoff Jul 10, 2019
4b3419f
GG-21105: [8.5-next]-[GG-21101] IgniteCacheClientReconnectTest.testCl…
gvvinblade Jul 10, 2019
7157097
GG-19609 [8.5-master]-[GG-19255] Inline index compatibility is broken…
Jul 11, 2019
784d1e0
GG-21186 Fixed IgniteDataStorageMetricsSelfTest
sk0x50 Jul 11, 2019
3b51081
GG-21295 [GG-21154] Invoke FailureProcessor if tree invariant is broken
dgovorukhin Jul 12, 2019
2923f19
GG-21291 [GG-19570] Add extended logging for node start
akalash Jul 12, 2019
c91304a
GG-21291 [GG-19570] Add extended logging for node start
akalash Jul 12, 2019
9b86f7b
GG-21283 Backported to 2.5-master of GG-18503 DR Sender/Receiver tab …
nva Jul 9, 2019
bfedcca
GG-17447: Replace TcpDiscoveryNode to nodeId in TcpDiscoveryMessages
Jun 11, 2019
ca1d8b7
GG-21123 Fix threads parking for indefinite time during throttling af…
antonovsergey93 Jul 15, 2019
9f580f0
GG-20761 [GG-20749] Delete PdsWithTtlCompatibilityTest.java
pavlukhin Jul 15, 2019
d49c448
GG-21302 [8.5-next]-[GG-21299] Add the WAL record type BTREE_META_PAG…
pavlukhin Jul 15, 2019
7e43d97
GG-19526 Optimize heap usage for TcpDiscoveryNodeAddedMessage stored …
Jul 15, 2019
2087ec3
GG-21314 Backport to 2.5-master of GG-21312 Fixed collecting rebalanc…
akuznetsov-os Jul 15, 2019
2676c12
GG-19412 Exclude test resource Wrapper.ser from license check
pavlukhin Jul 16, 2019
ebb2603
GG-20850: Fix @Ignore link.
gvvinblade Jul 16, 2019
2ca3f15
GG-19412 Fail Continuous Query registration and do not fail node if r…
pavlukhin Jul 16, 2019
f6576fc
GG-20567 Updated dependencies to fix possible vulnerabilities
Jul 17, 2019
4c22ea9
GG-20594 GG-20593 GG-20592 GG-19428 [IGNITE-9560] Security Engine fix…
ingvard Jul 17, 2019
b8a547f
GG-19117 GridCacheProcessor should add info about cache in exception …
Jul 17, 2019
60eda4f
GG-21225 control.sh validate_indexes SQL Index issue add information …
Jul 17, 2019
884f661
GG-21472 [GG-21254] Fixed *.testFailAfterStart failed on TC
dgovorukhin Jul 17, 2019
f196f2c
GG-21472 [GG-21254] Fixed *.testFailAfterStart failed on TC
dgovorukhin Jul 17, 2019
6674af2
GG-20905 Print warning if awaiting next wal segment it too long.
Jul 17, 2019
143257c
GG-21338 Fixed checkpointReadLock() may hang during node stop
ibessonov Jul 17, 2019
eab2af9
GG-17345 Reduce heap occupation by o.a.i.i.processors.cache.persisten…
Jun 13, 2019
347ae68
GG-17345 Checking file length in FilePageStore#exists()
Jul 16, 2019
3fe68c2
GG-21232 control.sh if experimental command disabled - don't show hel…
Jul 18, 2019
7bbf4d0
GG-20567 Removed outdated dependency from pom file
Jul 19, 2019
a5a2d85
GG-21630 [GG-20866] [IGNITE-11966] Fixed using AdaptiveLoadBalancingS…
ibessonov Jul 19, 2019
d62c77d
GG-21395 Fixed unguarded log.info() usages
agoncharuk Jul 19, 2019
9a3b007
GG-21696 [GG-21389] Flush records on cache stop
dgovorukhin Jul 22, 2019
c80bd73
GG-19383 Fixed PME hang on client node caused by optimistic transacti…
sk0x50 Jul 22, 2019
6669206
GG-18753 Dump checkpoint readLock holder threads.
zstan May 15, 2019
b4a3511
GG-21761 Fixed license headers
sk0x50 Jul 23, 2019
8725380
GG-21720 Fixed Web Console version.
akuznetsov-os Jul 24, 2019
1791833
GG-21639 Moved test with persistence to suite with persistence.
akuznetsov-os Jul 24, 2019
3832239
[8.5-next]-[GG-21575] Rebalancing of IgniteSet that contains user cla…
sk0x50 Jul 24, 2019
6864d2c
GG-20372 Removed "#" from "--cache help" output.
ibelyakov Jul 24, 2019
d18353e
failing test
Jul 24, 2019
b2c52be
GG-19730 [IGNITE-9562] Destroyed cache that resurrected on a old offl…
Jul 24, 2019
d02d102
GG-19730 Lost part
Jul 23, 2019
e9b5e77
[8.5-next]-[GG-21579] Backport of gg-21579 validation of setBaselineT…
sanpwc Jul 25, 2019
1b4fe3c
Fixing license.
Jul 25, 2019
21b2956
GG-21401 New stable failure of IgniteClusterActivateDeactivateTest.te…
Jul 25, 2019
0168e7a
GG-21792 [GG-21778] Fixed page replacement can reload invalid page du…
dgovorukhin Jul 25, 2019
1b7c001
GG-21461: Fix corrupt SQL index tree during upgrade.
ygerzhedovich Jul 25, 2019
45ee06b
Merge remote-tracking branch 'professional/ignite-2.5-master' into ig…
ygerzhedovich Jul 25, 2019
16aca68
GG-21855 Fixed TxOnCachesStopTest (disabled persistence for the defau…
sk0x50 Jul 26, 2019
857e2fb
GG-21442: Improve QueryEntity field conflict message. This closes #310.
AMashenkov Jul 24, 2019
dead5bf
GG-21333 Fix wrong assertion on owning clearing partition.
ascherbakoff Jul 29, 2019
6c5c3b0
IGNITE-9402 Throws exception if WALWriter failed during flush buffer.
akalash Jul 29, 2019
58047a0
GG-20639 control.sh shows passwords in the output
ibelyakov Jul 25, 2019
e5e8a0b
GG-21343 Fix RENTING->EVICTED partition state change prevention.
ascherbakoff Jul 30, 2019
3c2747d
GG-14344 Snapshot restore fails after COPY command
Jul 30, 2019
84df708
GG-21206 fix ringLatencyCheck loop (#266)
iakkuratov Jul 31, 2019
5cfc2d7
Merge remote-tracking branch 'apache-master/ignite-2.5-master' into i…
iakkuratov Jul 31, 2019
946d5af
GG-21946 Backport to ignite-2.5-master of GG-21931 Increased maximum …
vsisko Jul 31, 2019
64b567b
GG-21206 Fix compiler error
antonovsergey93 Jul 31, 2019
fe28ad5
GG-22188 Backport to ignite-2.5-master of GG-21710 Added processing o…
vsisko Jul 31, 2019
911603b
GG-17364 StackOverflowError in GridCacheMapEntry#checkOwnerChanged(),…
ingvard Jul 31, 2019
11f8006
GG-21864: Fix node crash if incorrect SQL query fails.
AMashenkov Jul 31, 2019
a80e189
GG-21682 Fix partition clearing.
ascherbakoff Aug 1, 2019
3e9088c
GG-22315 [GG-21678] Add page lock tracker and failure handler for all…
akalash Aug 2, 2019
43a317f
GG-22143 senderNodeId is absent in StatusCheckMessage
Jul 30, 2019
c4fd51b
GG-21356 Usability: control utility new printed argument format.
ingvard Aug 7, 2019
cc70a83
GG-22193 [8.5-next]-[GG-22140]-[IGNITE-7883] Cluster can have inconsi…
a-polyakov Aug 6, 2019
a6f714f
GG-22193 [8.5-next]-[GG-22140]-[IGNITE-7883] Cluster can have inconsi…
a-polyakov Aug 7, 2019
912a6ba
Revert "GG-22193 [8.5-next]-[GG-22140]-[IGNITE-7883] Cluster can have…
a-polyakov Aug 7, 2019
6b852ff
Revert "GG-22193 [8.5-next]-[GG-22140]-[IGNITE-7883] Cluster can have…
a-polyakov Aug 7, 2019
ed807cd
GG-22227 Invalid topology version, Added topVer in PartitionCountersN…
ingvard Aug 8, 2019
48912f4
GG-21221 Forbidden to resolve workDirectory as tmp dir
akalash Aug 8, 2019
0e3f89c
GG-22513 [GG-21485] [IGNITE-10522] Fix checkpoint tmp files doesn't n…
akalash Dec 7, 2018
e6accad
GG-22520 Backport to ignite-2.5-master of GG-20249 Extract message fr…
vsisko Jun 27, 2019
f87980c
GG-22550 [GG-20638] Added retries on peer class loading timeouts.
ibessonov Aug 8, 2019
0027cc4
GG-19275 [IGNITE-3653] P2P doesn't work for remote filter and filter …
dmekhanikov Jul 2, 2019
5f54159
GG-14979 Added printing lost partitions to idle_verify
akalash Aug 9, 2019
ace0e78
GG-14979 Added printing lost partitions to idle_verify
akalash Aug 9, 2019
72d6752
GG-22431 [8.5-next]-[GG-22451] H2 connection pool for lazy requests […
zstan Aug 7, 2019
1c357d7
GG-21379 Fixed assertion error in preparing state transaction.
antonovsergey93 Aug 12, 2019
afad48a
[8.5-next]-[GG-22258] Partition state validation warns are not printe…
ingvard Aug 12, 2019
49bed15
[8.5-next]-[GG-22258] Partition state validation warns are not printe…
ingvard Aug 12, 2019
3789b8e
GG-22571 Dump page data in case of AE in unlockPage in PageMemoryImpl.
antonovsergey93 Aug 12, 2019
67fecb0
GG-22579: GridGain Javadoc contains outdated copyright
avplatonov Aug 12, 2019
cce8c1e
GG-22700 Clear GridH2QueryContext on iterator close for local lazy qu…
Aug 13, 2019
250fe96
GG-22590 Fix assertion on owning clearing partition.
ascherbakoff Aug 13, 2019
8bcab1b
[8.5-next]-[GG-223477] Fix inline size change.
zstan Aug 13, 2019
a0a112e
Revert "[8.5-next]-[GG-223477] Fix inline size change."
zstan Aug 13, 2019
285ddae
[8.5-next]-[GG-22377] Fix inline size change.
zstan Aug 13, 2019
55d9df0
GG-22648: Fixed cost estimation for tree indexes.
rkondakov Aug 13, 2019
335b8fb
GG-21272 Add ability to track system/user time held in transaction
Aug 13, 2019
ae2ac2b
GG-21272 formatting
Aug 13, 2019
d1392ce
GG-21342
Aug 13, 2019
fbd0f6c
GG-21342 licence headers
Aug 13, 2019
7f51474
GG-22363 Bunch of testLocalTxPreloadingPessimistic tests became flaky…
Aug 13, 2019
896e2ba
GG-22656 Resovling work dir to current working dir by default
akalash Aug 14, 2019
86a80fb
fixes
Aug 14, 2019
fd47a89
Merge branch 'ignite-2.5-master' into gg-21342
Aug 14, 2019
17dd703
GG-21275 TxEntries can be concurrently changed while processing in ro…
zstan Jul 12, 2019
c25a19c
GG-19515: GG: destroying of the cache and re-creating with the same n…
AMashenkov Jun 27, 2019
ec57383
removed @Test annotations
Aug 14, 2019
20b78e2
IGNITE-9053 testReentrantLockConstantTopologyChangeNonFailoverSafe ca…
anton-vinogradov Aug 17, 2018
723de11
GG-13723 DR: Deprecate and ignore GridGainCacheConfiguration.drReceiv…
agoncharuk Aug 14, 2019
dc3c4d3
GG-20488 Check deployment from cache before to load it from local or …
vldpyatkov Aug 14, 2019
c5524a6
GG-22823 Fix override system property USE_POOL_FOR_LAZY
zstan Aug 14, 2019
407d9aa
failing test
Aug 15, 2019
b355e58
GG-22258 Partition state validation warns are not printed to log
ingvard Aug 15, 2019
0c150b1
GG-21151 Add extended logging for rebalance.
Aug 14, 2019
5d6cfe2
GG-21151 Add RebalanceStatisticsTest to suit.
Aug 15, 2019
2d69f2c
GG-21151 little test fix.
Aug 15, 2019
362cc96
GG-21151 fix licenses.
Aug 15, 2019
e26cf60
Revert "GG-21151 fix licenses."
antonovsergey93 Aug 15, 2019
e775b91
Revert "GG-21151 little test fix."
antonovsergey93 Aug 15, 2019
81903e8
Revert "GG-21151 Add RebalanceStatisticsTest to suit."
antonovsergey93 Aug 15, 2019
271b04d
Revert "GG-21151 Add extended logging for rebalance."
antonovsergey93 Aug 15, 2019
dd7f2f3
GG-21151 Add extended logging for rebalance.
Aug 14, 2019
f5d9bb0
GG-21151 Add RebalanceStatisticsTest to suit.
Aug 16, 2019
e3b48aa
GG-22912 Fix artifact of backport GG-17348 [IGNITE-10078] to ignite-2…
antonovsergey93 Aug 16, 2019
3a3b34e
GG-21404 GridCachePartitionedSetWithClientSelfTest.testMultithreaded …
ingvard Aug 19, 2019
00ce360
GG-22370 [8.5-next]-[GG-22360] Rebalance issue backported.
sanpwc Aug 19, 2019
10b7567
GG-22985 License header fixed within RebalanceAfterResettingLostParti…
sanpwc Aug 19, 2019
afe328c
GG-22931 [IGNITE-12073] Improve javadoc for the IGNITE_UPDATE_NOTIFIE…
agoncharuk Aug 16, 2019
9c1e2bc
GG-22420 Rollback transactions which are preparing on invalid primary.
ascherbakoff Aug 20, 2019
f132304
GG-23122 Clean system properties in RebalanceStatisticsTest.
antonovsergey93 Aug 21, 2019
2ff1373
Merge branch 'ignite-2.5-master' into gg-21342
Aug 21, 2019
146bd7c
removed HitRateMetric
Aug 21, 2019
4a7c123
review fixes
Aug 21, 2019
8f3b1ef
Added comments to tests.
Aug 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions bin/control.bat
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ if %ERRORLEVEL% equ 0 (
if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms256m -Xmx1g
)

::
:: Uncomment to enable experimental commands [--wal]
::
:: set JVM_OPTS=%JVM_OPTS% -DIGNITE_ENABLE_EXPERIMENTAL_COMMAND=true

::
:: Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
::
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.ignite.internal.benchmarks.jol;

import java.io.File;
import java.nio.ByteBuffer;
import java.nio.file.Path;
import java.util.LinkedList;
import java.util.List;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.internal.pagemem.PageMemory;
import org.apache.ignite.internal.pagemem.store.PageStore;
import org.apache.ignite.internal.processors.cache.persistence.file.AsyncFileIOFactory;
import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory;
import org.apache.ignite.internal.processors.cache.persistence.file.FileVersionCheckingFactory;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.openjdk.jol.info.GraphLayout;

import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.PART_FILE_TEMPLATE;

/**
*
*/
public class FileStoreHeapUtilizationJolBenchmark {
/** */
private void benchmark() throws IgniteCheckedException {
FilePageStoreFactory factory = new FileVersionCheckingFactory(
new AsyncFileIOFactory(),
new AsyncFileIOFactory(),
new DataStorageConfiguration()
.setPageSize(4096)
);

List<PageStore> stores = new LinkedList<>();

File workDir = U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", false);

for (int i = 0; i < 10000; i++) {
final int p = i;

PageStore ps = factory.createPageStore(
PageMemory.FLAG_DATA,
() -> getPartitionFilePath(workDir, p),
d -> { }
);

ps.ensure();

ps.write(0, ByteBuffer.allocate(256), 1, false);

stores.add(ps);
}

System.gc();

GraphLayout layout = GraphLayout.parseInstance(stores);

System.out.println("heap usage: " + layout.totalSize());

U.delete(workDir);
}

/** */
private Path getPartitionFilePath(File cacheWorkDir, int partId) {
return new File(cacheWorkDir, String.format(PART_FILE_TEMPLATE, partId)).toPath();
}

/** */
public static void main(String[] args) throws Exception {
new FileStoreHeapUtilizationJolBenchmark().benchmark();
}
}
2 changes: 1 addition & 1 deletion modules/camel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<url>http://ignite.apache.org</url>

<properties>
<guava.version>18.0</guava.version>
<guava.version>25.1-jre</guava.version>
<okhttp.version>2.5.0</okhttp.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion modules/cassandra/store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<cassandra-driver.version>3.0.0</cassandra-driver.version>
<cassandra-all.version>3.3</cassandra-all.version>
<netty.version>4.1.27.Final</netty.version>
<guava.version>19.0</guava.version>
<guava.version>25.1-jre</guava.version>
<metrics-core.version>3.0.2</metrics-core.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,17 +648,25 @@ private void createKeyspace(KeyValuePersistenceSettings settings) {

while (attempt < CQL_EXECUTION_ATTEMPTS_COUNT) {
try {
log.info("-----------------------------------------------------------------------");
log.info("Creating Cassandra keyspace '" + settings.getKeyspace() + "'");
log.info("-----------------------------------------------------------------------\n\n" +
settings.getKeyspaceDDLStatement() + "\n");
log.info("-----------------------------------------------------------------------");
if (log.isInfoEnabled()) {
log.info("-----------------------------------------------------------------------");
log.info("Creating Cassandra keyspace '" + settings.getKeyspace() + "'");
log.info("-----------------------------------------------------------------------\n\n" +
settings.getKeyspaceDDLStatement() + "\n");
log.info("-----------------------------------------------------------------------");
}

session().execute(settings.getKeyspaceDDLStatement());
log.info("Cassandra keyspace '" + settings.getKeyspace() + "' was successfully created");

if (log.isInfoEnabled())
log.info("Cassandra keyspace '" + settings.getKeyspace() + "' was successfully created");

return;
}
catch (AlreadyExistsException ignored) {
log.info("Cassandra keyspace '" + settings.getKeyspace() + "' already exist");
if (log.isInfoEnabled())
log.info("Cassandra keyspace '" + settings.getKeyspace() + "' already exist");

return;
}
catch (Throwable e) {
Expand Down Expand Up @@ -689,17 +697,25 @@ private void createTable(String table, KeyValuePersistenceSettings settings) {

while (attempt < CQL_EXECUTION_ATTEMPTS_COUNT) {
try {
log.info("-----------------------------------------------------------------------");
log.info("Creating Cassandra table '" + tableFullName + "'");
log.info("-----------------------------------------------------------------------\n\n" +
if (log.isInfoEnabled()) {
log.info("-----------------------------------------------------------------------");
log.info("Creating Cassandra table '" + tableFullName + "'");
log.info("-----------------------------------------------------------------------\n\n" +
settings.getTableDDLStatement(table) + "\n");
log.info("-----------------------------------------------------------------------");
log.info("-----------------------------------------------------------------------");
}

session().execute(settings.getTableDDLStatement(table));
log.info("Cassandra table '" + tableFullName + "' was successfully created");

if (log.isInfoEnabled())
log.info("Cassandra table '" + tableFullName + "' was successfully created");

return;
}
catch (AlreadyExistsException ignored) {
log.info("Cassandra table '" + tableFullName + "' already exist");
if (log.isInfoEnabled())
log.info("Cassandra table '" + tableFullName + "' already exist");

return;
}
catch (Throwable e) {
Expand Down Expand Up @@ -741,14 +757,19 @@ private void createTableIndexes(String table, KeyValuePersistenceSettings settin

while (attempt < CQL_EXECUTION_ATTEMPTS_COUNT) {
try {
log.info("-----------------------------------------------------------------------");
log.info("Creating indexes for Cassandra table '" + tableFullName + "'");
log.info("-----------------------------------------------------------------------");
if (log.isInfoEnabled()) {
log.info("-----------------------------------------------------------------------");
log.info("Creating indexes for Cassandra table '" + tableFullName + "'");
log.info("-----------------------------------------------------------------------");
}

for (String statement : indexDDLStatements) {
try {
log.info(statement);
log.info("-----------------------------------------------------------------------");
if (log.isInfoEnabled()) {
log.info(statement);
log.info("-----------------------------------------------------------------------");
}

session().execute(statement);
}
catch (AlreadyExistsException ignored) {
Expand All @@ -759,7 +780,8 @@ private void createTableIndexes(String table, KeyValuePersistenceSettings settin
}
}

log.info("Indexes for Cassandra table '" + tableFullName + "' were successfully created");
if (log.isInfoEnabled())
log.info("Indexes for Cassandra table '" + tableFullName + "' were successfully created");

return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.testframework.GridTestUtils;

/**
* Test that checks indexes handling with JDBC.
Expand Down Expand Up @@ -168,9 +169,9 @@ public void testCreateIndex() throws SQLException {
public void testCreateIndexWithDuplicateName() throws SQLException {
jdbcRun(CREATE_INDEX);

assertSqlException(new RunnableX() {
assertSqlException(new GridTestUtils.RunnableX() {
/** {@inheritDoc} */
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
jdbcRun(CREATE_INDEX);
}
});
Expand Down Expand Up @@ -219,9 +220,9 @@ public void testDropIndex() throws SQLException {
* Test that dropping a non-existent index yields an error.
*/
public void testDropMissingIndex() {
assertSqlException(new RunnableX() {
assertSqlException(new GridTestUtils.RunnableX() {
/** {@inheritDoc} */
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
jdbcRun(DROP_INDEX);
}
});
Expand Down Expand Up @@ -310,11 +311,11 @@ private IgniteCache<String, Person> cache() {
*
* @param r Runnable.
*/
private static void assertSqlException(RunnableX r) {
private static void assertSqlException(GridTestUtils.RunnableX r) {
// We expect IgniteSQLException with given code inside CacheException inside JDBC SQLException.

try {
r.run();
r.runx();
}
catch (SQLException e) {
return;
Expand All @@ -325,16 +326,4 @@ private static void assertSqlException(RunnableX r) {

fail(SQLException.class.getSimpleName() + " is not thrown.");
}

/**
* Runnable which can throw checked exceptions.
*/
private interface RunnableX {
/**
* Do run.
*
* @throws Exception If failed.
*/
public void run() throws Exception;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.odbc.ClientListenerProcessor;
import org.apache.ignite.internal.processors.port.GridPortRecord;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.GridTestUtils.RunnableX;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;

/**
Expand All @@ -45,68 +45,45 @@ public class JdbcThinAbstractSelfTest extends GridCommonAbstractTest {
* @param r Runnable to check support.
*/
protected void checkNotSupported(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();

return null;
}
}, SQLFeatureNotSupportedException.class, null);
GridTestUtils.assertThrowsWithCause(r, SQLFeatureNotSupportedException.class);
}

/**
* @param r Runnable to check on closed connection.
*/
protected void checkConnectionClosed(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();
GridTestUtils.assertThrowsAnyCause(log,
() -> {
r.run();

return null;
}
return null;
}, SQLException.class, "Connection is closed");
}

/**
* @param r Runnable to check on closed statement.
*/
protected void checkStatementClosed(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();
GridTestUtils.assertThrowsAnyCause(log,
() -> {
r.run();

return null;
}
return null;
}, SQLException.class, "Statement is closed");
}

/**
* @param r Runnable to check on closed result set.
*/
protected void checkResultSetClosed(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();
GridTestUtils.assertThrowsAnyCause(log,
() -> {
r.run();

return null;
}
return null;
}, SQLException.class, "Result set is closed");
}

/**
* Runnable that can throw an exception.
*/
interface RunnableX {
/**
* @throws Exception On error.
*/
void run() throws Exception;
}

/**
* @param node Node to connect to.
* @param params Connection parameters.
Expand Down