You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sk...@apache.org on 2021/11/10 12:49:11 UTC
[ignite-3] branch main updated: IGNITE-15877 Fix the code style
javadocs issues for the modules (step #2). Fixes #438
This is an automated email from the ASF dual-hosted git repository.
sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 4272626 IGNITE-15877 Fix the code style javadocs issues for the modules (step #2). Fixes #438
4272626 is described below
commit 4272626cc99ea63979ab6fab951d437d6a932fc1
Author: Kirill Tkalenko <tk...@yandex.ru>
AuthorDate: Wed Nov 10 15:48:15 2021 +0300
IGNITE-15877 Fix the code style javadocs issues for the modules (step #2). Fixes #438
Signed-off-by: Slava Koptilin <sl...@gmail.com>
---
.../affinity/RendezvousAffinityFunction.java | 12 +-
.../internal/affinity/AffinityServiceTest.java | 6 -
.../org/apache/ignite/cli/ItConfigCommandTest.java | 14 +-
.../apache/ignite/cli/CliPathsConfigLoader.java | 4 +-
.../java/org/apache/ignite/cli/IgniteCliApp.java | 5 +
.../org/apache/ignite/cli/IgniteCliException.java | 8 +-
.../java/org/apache/ignite/cli/IgnitePaths.java | 18 +-
.../org/apache/ignite/cli/InteractiveWrapper.java | 7 +-
.../src/main/java/org/apache/ignite/cli/Table.java | 20 +-
.../ignite/cli/builtins/SystemPathResolver.java | 6 +-
.../cli/builtins/config/ConfigurationClient.java | 2 +-
.../cli/builtins/module/MavenArtifactResolver.java | 6 +-
.../cli/builtins/module/MavenCoordinates.java | 6 +-
.../ignite/cli/builtins/module/ModuleRegistry.java | 10 +-
.../ignite/cli/builtins/module/ResolveResult.java | 2 +
.../ignite/cli/builtins/node/NodeManager.java | 10 +-
.../org/apache/ignite/cli/spec/CommandSpec.java | 2 +-
.../apache/ignite/cli/spec/ConfigCommandSpec.java | 4 +
.../org/apache/ignite/cli/spec/SpecAdapter.java | 7 +-
.../java/org/apache/ignite/cli/ui/Spinner.java | 8 +-
.../org/apache/ignite/cli/ui/TerminalFactory.java | 2 +-
.../org/apache/ignite/cli/AbstractCliTest.java | 2 +-
.../apache/ignite/cli/IgniteCliInterfaceTest.java | 124 +++--------
.../cli/builtins/init/InitIgniteCommandTest.java | 29 +--
.../cli/builtins/module/ModuleMangerTest.java | 32 ++-
.../org/apache/ignite/cli/ui/ProgressBarTest.java | 22 +-
.../java/org/apache/ignite/cli/ui/SpinnerTest.java | 22 +-
.../ItMetaStorageServicePersistenceTest.java | 20 +-
.../client/ItMetaStorageServiceTest.java | 11 +-
.../internal/metastorage/client/CursorImpl.java | 10 +-
.../ignite/internal/metastorage/client/Entry.java | 4 +-
.../metastorage/client/MetaStorageServiceImpl.java | 24 +-
.../internal/metastorage/client/Operation.java | 4 +-
.../metastorage/common/command/GetAllCommand.java | 8 +-
.../common/command/GetAndPutAllCommand.java | 6 +-
.../common/command/GetAndPutCommand.java | 6 +-
.../common/command/GetAndRemoveAllCommand.java | 4 +-
.../common/command/GetAndRemoveCommand.java | 4 +-
.../metastorage/common/command/GetCommand.java | 8 +-
.../metastorage/common/command/PutAllCommand.java | 6 +-
.../metastorage/common/command/PutCommand.java | 6 +-
.../metastorage/common/command/RangeCommand.java | 14 +-
.../common/command/RemoveAllCommand.java | 4 +-
.../metastorage/common/command/RemoveCommand.java | 4 +-
.../common/command/SingleEntryResponse.java | 2 +-
.../common/command/WatchExactKeysCommand.java | 10 +-
.../common/command/WatchRangeKeysCommand.java | 14 +-
.../common/command/cursor/CursorCloseCommand.java | 4 +-
.../command/cursor/CursorHasNextCommand.java | 4 +-
.../common/command/cursor/CursorNextCommand.java | 4 +-
.../common/command/cursor/CursorsCloseCommand.java | 4 +-
.../ignite/internal/metastorage/server/Entry.java | 4 +-
.../server/persistence/RocksDbKeyValueStorage.java | 11 +-
.../server/raft/MetaStorageListener.java | 16 +-
.../server/AbstractKeyValueStorageTest.java | 20 +-
.../server/RocksDbKeyValueStorageTest.java | 3 -
.../server/SimpleInMemoryKeyValueStorage.java | 70 +-----
.../internal/metastorage/MetaStorageManager.java | 48 +++-
.../metastorage/watch/AggregatedWatch.java | 6 +-
.../internal/metastorage/watch/KeyCriterion.java | 8 +-
.../metastorage/watch/WatchAggregator.java | 4 +-
.../internal/metastorage/WatchAggregatorTest.java | 44 +---
.../java/org/apache/ignite/raft/client/Peer.java | 10 +-
.../ignite/raft/client/service/CommandClosure.java | 2 +-
.../raft/client/service/RaftGroupService.java | 10 +-
.../apache/ignite/internal/raft/ItLozaTest.java | 10 +-
.../service/ItAbstractListenerSnapshotTest.java | 20 +-
.../apache/ignite/raft/server/CounterListener.java | 2 +-
.../ignite/raft/server/CounterSnapshotFile.java | 7 +-
.../ignite/raft/server/IncrementAndGetCommand.java | 4 +-
.../raft/server/ItJraftCounterServerTest.java | 31 ++-
.../raft/server/ItSimpleCounterServerTest.java | 13 +-
.../ignite/raft/server/RaftServerAbstractTest.java | 11 +-
.../ignite/internal/raft/server/RaftServer.java | 2 +-
.../internal/raft/server/impl/JraftServerImpl.java | 12 +-
.../internal/raft/server/impl/RaftServerImpl.java | 34 +--
.../ignite/rest/netty/RestApiHttpResponseTest.java | 3 -
.../ConfigurationPresentationTest.java | 36 +--
.../org/apache/ignite/rest/routes/RouteTest.java | 20 +-
.../calcite/AbstractBasicIntegrationTest.java | 31 +--
.../ignite/internal/calcite/ItAggregatesTest.java | 19 +-
.../ignite/internal/calcite/ItDataTypesTest.java | 2 +-
.../ignite/internal/calcite/ItFunctionsTest.java | 28 +--
.../ignite/internal/calcite/ItIndexSpoolTest.java | 7 +-
.../ignite/internal/calcite/ItMetadataTest.java | 24 +-
.../internal/calcite/ItMixedQueriesTest.java | 54 +----
.../internal/calcite/ItOrToUnionRuleTest.java | 20 +-
.../calcite/ItProjectScanMergeRuleTest.java | 5 +-
.../internal/calcite/ItSecondaryIndexTest.java | 245 +++++----------------
.../ignite/internal/calcite/ItSetOpTest.java | 41 +---
.../internal/calcite/ItSortAggregateTest.java | 8 +-
.../ignite/internal/calcite/util/QueryChecker.java | 92 ++++----
.../ItDistributedConfigurationPropertiesTest.java | 50 +----
.../ItDistributedConfigurationStorageTest.java | 33 +--
.../runner/app/AbstractSchemaChangeTest.java | 26 ++-
.../internal/runner/app/ItBaselineChangesTest.java | 18 +-
.../runner/app/ItDynamicTableCreationTest.java | 16 +-
.../ignite/internal/runner/app/ItIgnitionTest.java | 10 +-
.../runner/app/ItLiveSchemaChangeKvViewTest.java | 2 +-
.../runner/app/ItLiveSchemaChangeTableTest.java | 2 +-
.../internal/runner/app/ItTableCreationTest.java | 10 +-
.../internal/runner/app/ItTablesApiTest.java | 8 +-
.../runner/app/ItThinClientConnectionTest.java | 13 +-
.../runner/app/PlatformTestNodeRunner.java | 6 -
.../runner/app/jdbc/AbstractJdbcSelfTest.java | 3 +
.../app/jdbc/ItJdbcConnectionPropertiesTest.java | 2 +-
.../runner/app/jdbc/ItJdbcConnectionSelfTest.java | 101 ++-------
.../runner/app/jdbc/ItJdbcMetadataSelfTest.java | 36 ---
.../runner/app/jdbc/ItJdbcResultSetSelfTest.java | 59 +----
.../runner/app/jdbc/ItJdbcStatementSelfTest.java | 87 --------
.../org/apache/ignite/internal/app/IgniteImpl.java | 19 +-
.../apache/ignite/internal/app/IgnitionImpl.java | 12 -
.../org/apache/ignite/utils/IgniteProperties.java | 4 +-
.../storage/ConfigurationStorageTest.java | 5 +-
.../DistributedConfigurationStorageTest.java | 15 +-
.../storage/LocalConfigurationStorageTest.java | 7 +-
.../ignite/distributed/ItDistributedTableTest.java | 10 +-
.../distributed/ItInternalTableScanTest.java | 22 +-
.../ignite/distributed/ItTablePersistenceTest.java | 15 --
.../schema/marshaller/RecordSerializer.java | 4 +
.../schema/marshaller/TupleMarshallerImpl.java | 9 +-
.../ignite/internal/table/AbstractTableView.java | 6 +-
.../internal/table/KeyValueBinaryViewImpl.java | 3 +-
.../ignite/internal/table/KeyValueViewImpl.java | 3 +-
.../internal/table/RecordBinaryViewImpl.java | 6 +-
.../ignite/internal/table/RecordViewImpl.java | 5 +-
.../apache/ignite/internal/table/TableImpl.java | 2 +
.../internal/table/distributed/TableManager.java | 6 +-
.../command/response/MultiRowsResponse.java | 2 +-
.../command/response/SingleRowResponse.java | 2 +-
.../distributed/command/scan/ScanCloseCommand.java | 2 +-
.../distributed/command/scan/ScanInitCommand.java | 6 +-
.../command/scan/ScanRetrieveBatchCommand.java | 6 +-
.../table/distributed/raft/PartitionListener.java | 6 +-
.../distributed/storage/InternalTableImpl.java | 11 +-
.../internal/table/event/TableEventParameters.java | 6 +
.../TupleMarshallerFixlenOnlyBenchmark.java | 2 +-
.../TupleMarshallerVarlenOnlyBenchmark.java | 2 +-
.../org/apache/ignite/internal/table/Example.java | 6 +-
.../table/KeyValueBinaryViewOperationsTest.java | 40 +---
.../internal/table/KeyValueOperationsTest.java | 40 +---
.../internal/table/MutableRowTupleAdapterTest.java | 3 +-
.../table/RecordBinaryViewOperationsTest.java | 45 +---
.../internal/table/StrictSchemaOperationsTest.java | 25 +--
.../org/apache/ignite/internal/table/TxTest.java | 30 +--
.../raft/PartitionCommandListenerTest.java | 22 ++
.../table/impl/DummyInternalTableImpl.java | 6 +-
.../table/type/NumericTypesSerializerTest.java | 48 ++--
.../apache/ignite/internal/tx/LockException.java | 4 +
.../org/apache/ignite/internal/tx/LockManager.java | 16 +-
.../org/apache/ignite/internal/tx/Timestamp.java | 18 +-
.../java/org/apache/ignite/internal/tx/Waiter.java | 4 +-
.../ignite/internal/tx/impl/HeapLockManager.java | 35 ++-
.../internal/tx/AbstractLockManagerTest.java | 2 +
.../ignite/internal/tx/HeapLockManagerTest.java | 2 +-
.../ItPersistencePropertiesVaultServiceTest.java | 6 -
.../persistence/ItPersistentVaultServiceTest.java | 3 -
.../apache/ignite/internal/vault/VaultEntry.java | 4 +-
.../apache/ignite/internal/vault/VaultManager.java | 12 +-
.../vault/persistence/PersistentVaultService.java | 15 --
.../vault/persistence/RocksIteratorAdapter.java | 10 +-
.../ignite/internal/vault/VaultManagerTest.java | 8 +-
.../ignite/internal/vault/VaultServiceTest.java | 7 +-
163 files changed, 861 insertions(+), 1842 deletions(-)
diff --git a/modules/affinity/src/main/java/org/apache/ignite/internal/affinity/RendezvousAffinityFunction.java b/modules/affinity/src/main/java/org/apache/ignite/internal/affinity/RendezvousAffinityFunction.java
index f80c635..d4f09bc 100644
--- a/modules/affinity/src/main/java/org/apache/ignite/internal/affinity/RendezvousAffinityFunction.java
+++ b/modules/affinity/src/main/java/org/apache/ignite/internal/affinity/RendezvousAffinityFunction.java
@@ -183,7 +183,7 @@ public class RendezvousAffinityFunction {
}
/**
- * Creates assignment for REPLICATED table
+ * Creates assignment for REPLICATED table.
*
* @param nodes Topology.
* @param sortedNodes Sorted for specified partitions nodes.
@@ -302,7 +302,7 @@ public class RendezvousAffinityFunction {
}
/**
- *
+ * Hash comparator.
*/
private static class HashComparator implements Comparator<IgniteBiTuple<Long, ClusterNode>>, Serializable {
/** Serial version uid. */
@@ -317,16 +317,18 @@ public class RendezvousAffinityFunction {
}
/**
- * Sorts the initial array with linear sort algorithm array
+ * Sorts the initial array with linear sort algorithm array.
*/
private static class LazyLinearSortedContainer implements Iterable<ClusterNode> {
/** Initial node-hash array. */
private final IgniteBiTuple<Long, ClusterNode>[] arr;
- /** Count of the sorted elements */
+ /** Count of the sorted elements. */
private int sorted;
/**
+ * Constructor.
+ *
* @param arr Node / partition hash list.
* @param needFirstSortedCnt Estimate count of elements to return by iterator.
*/
@@ -347,7 +349,7 @@ public class RendezvousAffinityFunction {
}
/**
- *
+ * Sorting iterator.
*/
private class SortIterator implements Iterator<ClusterNode> {
/** Index of the first unsorted element. */
diff --git a/modules/affinity/src/test/java/org/apache/ignite/internal/affinity/AffinityServiceTest.java b/modules/affinity/src/test/java/org/apache/ignite/internal/affinity/AffinityServiceTest.java
index e8627f1..bd1641e 100644
--- a/modules/affinity/src/test/java/org/apache/ignite/internal/affinity/AffinityServiceTest.java
+++ b/modules/affinity/src/test/java/org/apache/ignite/internal/affinity/AffinityServiceTest.java
@@ -32,9 +32,6 @@ import org.junit.jupiter.api.Test;
* just checks {@link AffinityUtils} logic.
*/
public class AffinityServiceTest {
- /**
- *
- */
@Test
public void testCalculatedAssignmentHappyPath() {
List<List<ClusterNode>> assignments = AffinityUtils.calculateAssignments(
@@ -59,9 +56,6 @@ public class AffinityServiceTest {
}
}
- /**
- *
- */
@Test
public void testEmptyBaselineAssignmentsCalculation() {
List<List<ClusterNode>> assignments = AffinityUtils.calculateAssignments(
diff --git a/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ItConfigCommandTest.java b/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ItConfigCommandTest.java
index ff94044..54b8943 100644
--- a/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ItConfigCommandTest.java
+++ b/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ItConfigCommandTest.java
@@ -56,10 +56,10 @@ public class ItConfigCommandTest extends AbstractCliTest {
/** stdout. */
private ByteArrayOutputStream out;
- /** Port for REST communication */
+ /** Port for REST communication. */
private int restPort;
- /** Port for thin client communication */
+ /** Port for thin client communication. */
private int clientPort;
/** Network port. */
@@ -68,9 +68,6 @@ public class ItConfigCommandTest extends AbstractCliTest {
/** Node. */
private Ignite node;
- /**
- *
- */
@BeforeEach
void setup(@TempDir Path workDir, TestInfo testInfo) throws IOException {
// TODO: IGNITE-15131 Must be replaced by receiving the actual port configs from the started node.
@@ -95,9 +92,6 @@ public class ItConfigCommandTest extends AbstractCliTest {
out = new ByteArrayOutputStream();
}
- /**
- *
- */
@AfterEach
void tearDown(TestInfo testInfo) {
IgnitionManager.stop(testNodeName(testInfo, networkPort));
@@ -163,6 +157,8 @@ public class ItConfigCommandTest extends AbstractCliTest {
}
/**
+ * Returns any available prt.
+ *
* @return Any available port.
* @throws IOException if can't allocate port to open socket.
*/
@@ -174,6 +170,8 @@ public class ItConfigCommandTest extends AbstractCliTest {
}
/**
+ * Creates a new command line interpreter.
+ *
* @param applicationCtx DI context.
* @return New command line instance.
*/
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/CliPathsConfigLoader.java b/modules/cli/src/main/java/org/apache/ignite/cli/CliPathsConfigLoader.java
index b54217d..3233540 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/CliPathsConfigLoader.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/CliPathsConfigLoader.java
@@ -28,7 +28,7 @@ import javax.inject.Singleton;
import org.apache.ignite.cli.builtins.SystemPathResolver;
/**
- * Due to the nature of Ignite CLI tool it can be runned in the environment without ignitecfg file at all. This class created to simplify
+ * Due to the nature of Ignite CLI tool it can be run in the environment without configuration file at all. This class created to simplify
* the managing of the different cases:
* <ul>
* <li>When user download binary and run it to manage any existence remote cluster</li>
@@ -93,6 +93,8 @@ public class CliPathsConfigLoader {
}
/**
+ * Returns path to Ignite CLI configuration file.
+ *
* @return Path to Ignite CLI config file.
*/
public Path configFilePath() {
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliApp.java b/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliApp.java
index 0818125..f041da6 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliApp.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliApp.java
@@ -30,6 +30,11 @@ import org.fusesource.jansi.AnsiConsole;
* Entry point of Ignite CLI.
*/
public class IgniteCliApp {
+ /**
+ * Entry point of Ignite CLI.
+ *
+ * @param args Command line arguments.
+ */
public static void main(String... args) {
initJavaLoggerProps();
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliException.java b/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliException.java
index fff31b8..46d5813 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliException.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/IgniteCliException.java
@@ -25,14 +25,18 @@ public class IgniteCliException extends RuntimeException {
private static final long serialVersionUID = 0L;
/**
- * @param msg Message.
+ * Creates a new instance of {@code IgniteCliException} with the given {@code msg}.
+ *
+ * @param msg Detailed message.
*/
public IgniteCliException(String msg) {
super(msg);
}
/**
- * @param msg Message.
+ * Creates a new instance of {@code IgniteCliException} with the given {@code msg} and {@code cause}.
+ *
+ * @param msg Detailed message.
* @param cause Cause.
*/
public IgniteCliException(String msg, Throwable cause) {
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/IgnitePaths.java b/modules/cli/src/main/java/org/apache/ignite/cli/IgnitePaths.java
index 5110e4d..9c745f2 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/IgnitePaths.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/IgnitePaths.java
@@ -63,7 +63,7 @@ public class IgnitePaths {
/** Directory for storing server node configs. */
public final Path cfgDir;
- /** Directory for server nodes logs */
+ /** Directory for server nodes logs. */
public final Path logDir;
/**
@@ -89,6 +89,8 @@ public class IgnitePaths {
}
/**
+ * Returns a path where CLI module artifacts will be placed.
+ *
* @return Path where CLI module artifacts will be placed.
*/
public Path cliLibsDir() {
@@ -96,6 +98,8 @@ public class IgnitePaths {
}
/**
+ * Returns a path where Ignite server module artifacts will be placed..
+ *
* @return Path where Ignite server module artifacts will be placed.
*/
public Path libsDir() {
@@ -103,6 +107,8 @@ public class IgnitePaths {
}
/**
+ * Returns a path where Ignite node pid files will be created.
+ *
* @return Path where Ignite node pid files will be created.
*/
public Path cliPidsDir() {
@@ -110,13 +116,17 @@ public class IgnitePaths {
}
/**
- * @return Path to file with registry data for {@link org.apache.ignite.cli.builtins.module.ModuleRegistry}
+ * Returns a path to file with registry data for {@link org.apache.ignite.cli.builtins.module.ModuleRegistry}.
+ *
+ * @return Path to file with registry data for {@link org.apache.ignite.cli.builtins.module.ModuleRegistry}.
*/
public Path installedModulesFile() {
return workDir.resolve("modules.json");
}
/**
+ * Returns a path to directory with Ignite nodes configs.
+ *
* @return Path to directory with Ignite nodes configs.
*/
public Path serverConfigDir() {
@@ -124,6 +134,8 @@ public class IgnitePaths {
}
/**
+ * Returns a path to default Ignite node config.
+ *
* @return Path to default Ignite node config.
*/
public Path serverDefaultConfigFile() {
@@ -131,6 +143,8 @@ public class IgnitePaths {
}
/**
+ * Returns a path to default Ignite node config.
+ *
* @return Path to default Ignite node config.
*/
public Path serverJavaUtilLoggingPros() {
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/InteractiveWrapper.java b/modules/cli/src/main/java/org/apache/ignite/cli/InteractiveWrapper.java
index dc191ab..c1335ca 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/InteractiveWrapper.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/InteractiveWrapper.java
@@ -44,6 +44,8 @@ public class InteractiveWrapper {
private final Terminal terminal;
/**
+ * Creates a new instance of {@code InteractiveWrapper} for the given {@code terminal}.
+ *
* @param terminal Terminal.
*/
public InteractiveWrapper(Terminal terminal) {
@@ -51,7 +53,7 @@ public class InteractiveWrapper {
}
/**
- * Start interactive shell.
+ * Starts interactive shell.
*
* @param cmd Prepared CommandLine instance to use for interactive mode.
*/
@@ -103,7 +105,10 @@ public class InteractiveWrapper {
}
/**
+ * Returns a path to the user directory.
+ * This is the directory where JVM was run from.
*
+ * @return Path to the user directory.
*/
private static Path workDir() {
return Paths.get(System.getProperty("user.dir"));
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/Table.java b/modules/cli/src/main/java/org/apache/ignite/cli/Table.java
index 94f0e58..a72e479 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/Table.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/Table.java
@@ -33,7 +33,7 @@ public class Table {
/** Color scheme for table output. */
private final ColorScheme cs;
- /** Table data */
+ /** Table data. */
private final Collection<Row> data = new ArrayList<>();
/** Columns lengths. */
@@ -116,9 +116,6 @@ public class Table {
return sb.toString().stripTrailing();
}
- /**
- *
- */
private void appendLine(StringBuilder sb) {
sb.append(" ".repeat(indent));
@@ -130,7 +127,10 @@ public class Table {
}
/**
+ * Appends the given {@code row} to the specified string builder {@code sb}.
*
+ * @param sb String builder that accumulates a result.
+ * @param row Row to be appended to the string builder.
*/
private void appendRow(StringBuilder sb, Row row) {
sb.append(" ".repeat(indent))
@@ -148,13 +148,13 @@ public class Table {
* Row with actual data.
*/
private class DataRow implements Row {
- /**
- *
- */
+ /** Text. */
private final Text[] row;
/**
+ * Creates a new {@code DataRow} with the specified data.
*
+ * @param row Text to be rendered.
*/
DataRow(Text[] row) {
this.row = row;
@@ -185,13 +185,11 @@ public class Table {
* Row with table title.
*/
private class SectionTitle implements Row {
- /**
- *
- */
+ /** Title. */
private final Text title;
/**
- *
+ * Creates a new {@code SectionTitle} with the given {@code title}.
*/
SectionTitle(Text title) {
this.title = title;
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/SystemPathResolver.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/SystemPathResolver.java
index 344a067..9153b02 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/SystemPathResolver.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/SystemPathResolver.java
@@ -30,17 +30,21 @@ import org.apache.ignite.cli.IgniteCliException;
*/
public interface SystemPathResolver {
/**
+ * Returns system specific user home directory..
+ *
* @return System specific user home directory.
*/
Path osHomeDirectoryPath();
/**
+ * Returns directory where CLI tool binary placed.
+ *
* @return Directory where CLI tool binary placed.
*/
Path toolHomeDirectoryPath();
/**
- *
+ * Default path resolver.
*/
@Singleton
@Introspected
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/config/ConfigurationClient.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/config/ConfigurationClient.java
index df4d932..58eb5c2 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/config/ConfigurationClient.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/config/ConfigurationClient.java
@@ -36,7 +36,7 @@ import org.jetbrains.annotations.Nullable;
import picocli.CommandLine.Help.ColorScheme;
/**
- * Client to get/put HOCON based configuration from/to Ignite server nodes
+ * Client to get/put HOCON based configuration from/to Ignite server nodes.
*/
@Singleton
public class ConfigurationClient {
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenArtifactResolver.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenArtifactResolver.java
index c79e1b6..0318251 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenArtifactResolver.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenArtifactResolver.java
@@ -72,7 +72,7 @@ public class MavenArtifactResolver {
private PrintWriter out;
/**
- * Creates resolver
+ * Creates a new resolver.
*
* @param pathRslvr Resolver of system paths like home directory and etc.
* @param terminal User system terminal.
@@ -169,9 +169,9 @@ public class MavenArtifactResolver {
}
/**
- * Gets artifact file name by artifactId and version
+ * Gets artifact file name by artifactId and version.
*
- * <p>Note: Current implementation doesn't support artifacts with classifiers or non-jar packaging
+ * <p>Note: Current implementation doesn't support artifacts with classifiers or non-jar packaging.
*
* @param artifactId Maven artifact id.
* @param ver Maven version
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenCoordinates.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenCoordinates.java
index 3176e24..4d30e22 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenCoordinates.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/MavenCoordinates.java
@@ -23,13 +23,13 @@ import org.apache.ignite.cli.IgniteCliException;
* Simple wrapper of maven artifact coordinates groupid:artifactd:version.
*/
public class MavenCoordinates {
- /** Group id */
+ /** Group id. */
public final String grpId;
- /** Artifact id */
+ /** Artifact id. */
public final String artifactId;
- /** Artifact version */
+ /** Artifact version. */
public final String ver;
/**
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ModuleRegistry.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ModuleRegistry.java
index d11df62..1010af2 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ModuleRegistry.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ModuleRegistry.java
@@ -58,6 +58,8 @@ public class ModuleRegistry {
}
/**
+ * Returns path of registry file.
+ *
* @return Path of registry file.
*/
private Path moduleFile() {
@@ -103,6 +105,8 @@ public class ModuleRegistry {
}
/**
+ * Returns definitions of installed modules.
+ *
* @return Definitions of installed modules.
*/
public ModuleDefinitionsList listInstalled() {
@@ -171,7 +175,7 @@ public class ModuleRegistry {
public final String src;
/**
- * Creates module defition.
+ * Creates module definition.
*
* @param name Module name.
* @param artifacts Module server artifacts' paths.
@@ -194,6 +198,8 @@ public class ModuleRegistry {
}
/**
+ * Returns server artifacts' paths.
+ *
* @return Server artifacts' paths.
*/
@JsonGetter("artifacts")
@@ -202,6 +208,8 @@ public class ModuleRegistry {
}
/**
+ * Returns CLI artifacts paths.
+ *
* @return CLI artifacts paths.
*/
@JsonGetter("cliArtifacts")
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ResolveResult.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ResolveResult.java
index 27bc6ad..658f069 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ResolveResult.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/module/ResolveResult.java
@@ -38,6 +38,8 @@ public class ResolveResult {
}
/**
+ * Returns list of artifacts' paths.
+ *
* @return List of artifacts' paths.
*/
public List<Path> artifacts() {
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java
index 8dc4131..6819f2c 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java
@@ -175,6 +175,8 @@ public class NodeManager {
}
/**
+ * Returns actual classpath according to current installed modules.
+ *
* @return Actual classpath according to current installed modules.
* @throws IOException If couldn't read the module registry file.
*/
@@ -186,6 +188,8 @@ public class NodeManager {
}
/**
+ * Returns actual classpath items list according to current installed modules.
+ *
* @return Actual classpath items list according to current installed modules.
* @throws IOException If couldn't read the module registry file.
*/
@@ -220,6 +224,8 @@ public class NodeManager {
}
/**
+ * Returns list of running nodes.
+ *
* @param logDir Ignite installation work dir.
* @param pidsDir Dir with nodes pids.
* @return List of running nodes.
@@ -304,7 +310,7 @@ public class NodeManager {
/**
* Stops the process and waits for success.
*
- * @param pid Pid of proccess to stop.
+ * @param pid Pid of process to stop.
* @return true if process was stopped, false otherwise.
*/
private boolean stopWait(long pid) {
@@ -315,6 +321,8 @@ public class NodeManager {
}
/**
+ * Returns path of node log file.
+ *
* @param logDir Ignite log dir.
* @param nodeName Node name.
* @return Path of node log file.
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/spec/CommandSpec.java b/modules/cli/src/main/java/org/apache/ignite/cli/spec/CommandSpec.java
index d1004f2..2e0050b 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/spec/CommandSpec.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/spec/CommandSpec.java
@@ -23,7 +23,7 @@ import picocli.CommandLine;
* Base class for commands without any subcommands.
*/
public abstract class CommandSpec extends SpecAdapter {
- /** Help option specification */
+ /** Help option specification. */
@CommandLine.Option(names = "--help", usageHelp = true, hidden = true)
protected boolean usageHelpRequested;
}
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/spec/ConfigCommandSpec.java b/modules/cli/src/main/java/org/apache/ignite/cli/spec/ConfigCommandSpec.java
index 4268e4d..96effe7 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/spec/ConfigCommandSpec.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/spec/ConfigCommandSpec.java
@@ -128,6 +128,8 @@ public class ConfigCommandSpec extends CategorySpec {
private String endpoint;
/**
+ * Returns REST endpoint port.
+ *
* @return REST endpoint port.
*/
private int port() {
@@ -145,6 +147,8 @@ public class ConfigCommandSpec extends CategorySpec {
}
/**
+ * Returns REST endpoint host.
+ *
* @return REST endpoint host.
*/
private String host() {
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/spec/SpecAdapter.java b/modules/cli/src/main/java/org/apache/ignite/cli/spec/SpecAdapter.java
index 957f7ba..c4b8594 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/spec/SpecAdapter.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/spec/SpecAdapter.java
@@ -47,7 +47,12 @@ public abstract class SpecAdapter implements Runnable {
@CommandLine.Spec
protected CommandSpec spec;
-
+
+ /**
+ * Returns Ignite banner.
+ *
+ * @return Banner.
+ */
public String banner() {
String banner = Arrays
.stream(BANNER)
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/ui/Spinner.java b/modules/cli/src/main/java/org/apache/ignite/cli/ui/Spinner.java
index 1ed733d..187a98d 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/ui/Spinner.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/ui/Spinner.java
@@ -33,6 +33,8 @@ public class Spinner implements AutoCloseable {
private int spinnerCnt;
/**
+ * Creates a new {@code Spinner}.
+ *
* @param out Writer to display spinner.
*/
public Spinner(PrintWriter out) {
@@ -40,6 +42,8 @@ public class Spinner implements AutoCloseable {
}
/**
+ * Creates a new {@code Spinner}.
+ *
* @param out Writer to display spinner.
* @param spinnerPrefixText Spinner prefix text.
*/
@@ -59,9 +63,7 @@ public class Spinner implements AutoCloseable {
spinnerCnt = 1 + spinnerCnt % 3;
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
@Override
public void close() {
out.print("\r" + spinnerPrefixText + "...");
diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/ui/TerminalFactory.java b/modules/cli/src/main/java/org/apache/ignite/cli/ui/TerminalFactory.java
index a56dcb7..db9c3bd 100644
--- a/modules/cli/src/main/java/org/apache/ignite/cli/ui/TerminalFactory.java
+++ b/modules/cli/src/main/java/org/apache/ignite/cli/ui/TerminalFactory.java
@@ -25,7 +25,7 @@ import org.jline.terminal.Terminal;
import org.jline.terminal.TerminalBuilder;
/**
- * Factory for producing JLine {@link Terminal} instances
+ * Factory for producing JLine {@link Terminal} instances.
*/
@Factory
public class TerminalFactory {
diff --git a/modules/cli/src/test/java/org/apache/ignite/cli/AbstractCliTest.java b/modules/cli/src/test/java/org/apache/ignite/cli/AbstractCliTest.java
index 9a0d199..151ba47 100644
--- a/modules/cli/src/test/java/org/apache/ignite/cli/AbstractCliTest.java
+++ b/modules/cli/src/test/java/org/apache/ignite/cli/AbstractCliTest.java
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.BeforeAll;
*/
public class AbstractCliTest {
/**
- *
+ * Sets up a dumb terminal before tests.
*/
@BeforeAll
private static void beforeAll() {
diff --git a/modules/cli/src/test/java/org/apache/ignite/cli/IgniteCliInterfaceTest.java b/modules/cli/src/test/java/org/apache/ignite/cli/IgniteCliInterfaceTest.java
index 1496d27..321681f 100644
--- a/modules/cli/src/test/java/org/apache/ignite/cli/IgniteCliInterfaceTest.java
+++ b/modules/cli/src/test/java/org/apache/ignite/cli/IgniteCliInterfaceTest.java
@@ -71,14 +71,20 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
/** stdout. */
ByteArrayOutputStream out;
- /**
- *
- */
+ /** Configuration loader. */
@Mock
CliPathsConfigLoader cliPathsCfgLdr;
+ /** Paths to cli working directories. */
+ IgnitePaths ignitePaths = new IgnitePaths(
+ Path.of("bin"),
+ Path.of("work"),
+ Path.of("config"),
+ Path.of("log"),
+ "version");
+
/**
- *
+ * Sets up environment before test execution.
*/
@BeforeEach
void setup() {
@@ -89,14 +95,19 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
err = new ByteArrayOutputStream();
out = new ByteArrayOutputStream();
}
-
+
+ /**
+ * Stops application context after a test.
+ */
@AfterEach
void tearDown() {
ctx.stop();
}
/**
+ * Creates a new command line interpreter with the given application context.
*
+ * @return New {@code CommandLine} interpreter.
*/
CommandLine cmd(ApplicationContext applicationCtx) {
CommandLine.IFactory factory = new CommandFactory(applicationCtx);
@@ -105,23 +116,13 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
.setErr(new PrintWriter(err, true))
.setOut(new PrintWriter(out, true));
}
-
- IgnitePaths ignitePaths = new IgnitePaths(
- Path.of("bin"),
- Path.of("work"),
- Path.of("config"),
- Path.of("log"),
- "version");
-
+
/**
- *
+ * Tests "init" command.
*/
@DisplayName("init")
@Nested
class Init {
- /**
- *
- */
@Test
@DisplayName("init")
void init() {
@@ -137,35 +138,25 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
}
/**
- *
+ * Tests "module" command.
*/
@DisplayName("module")
@Nested
class Module {
- /**
- *
- */
+ /** Distributive module manager. */
@Mock
ModuleManager moduleMgr;
- /**
- *
- */
+ /** registry of installed CLI or Ignite server modules. */
@Mock
ModuleRegistry moduleRegistry;
- /**
- *
- */
@BeforeEach
void setUp() {
ctx.registerSingleton(moduleMgr);
ctx.registerSingleton(moduleRegistry);
}
- /**
- *
- */
@Test
@DisplayName("add mvn:groupId:artifact:version")
void add() {
@@ -178,9 +169,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
Assertions.assertEquals(0, exitCode);
}
- /**
- *
- */
@Test
@DisplayName("add mvn:groupId:artifact:version --repo http://mvnrepo.com/repostiory")
void addWithCustomRepo() throws MalformedURLException {
@@ -200,9 +188,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
Assertions.assertEquals(0, exitCode);
}
- /**
- *
- */
@Test
@DisplayName("add test-module")
void addBuiltinModule() {
@@ -217,9 +202,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
Assertions.assertEquals(0, exitCode);
}
- /**
- *
- */
@Test
@DisplayName("remove builtin-module")
void remove() {
@@ -237,9 +219,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
+ " was removed successfully.\n", out.toString());
}
- /**
- *
- */
@Test
@DisplayName("remove unknown-module")
void removeUnknownModule() {
@@ -257,9 +236,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
+ " is not yet added.\n", out.toString());
}
- /**
- *
- */
@Test
@DisplayName("list")
void list() {
@@ -322,28 +298,20 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
}
/**
- *
+ * Tests "node" command.
*/
@Nested
@DisplayName("node")
class Node {
- /**
- *
- */
+ /** Manager of local Ignite nodes. */
@Mock
NodeManager nodeMgr;
- /**
- *
- */
@BeforeEach
void setUp() {
ctx.registerSingleton(nodeMgr);
}
- /**
- *
- */
@Test
@DisplayName("start node1 --config conf.json")
void start() {
@@ -383,9 +351,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
out.toString());
}
- /**
- *
- */
@Test
@DisplayName("stop node1")
void stopRunning() {
@@ -410,9 +375,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
out.toString());
}
- /**
- *
- */
@Test
@DisplayName("stop unknown-node")
void stopUnknown() {
@@ -437,9 +399,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
out.toString());
}
- /**
- *
- */
@Test
@DisplayName("list")
void list() {
@@ -469,9 +428,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
out.toString());
}
- /**
- *
- */
@Test
@DisplayName("list")
void listEmpty() {
@@ -492,9 +448,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
out.toString());
}
- /**
- *
- */
@Test
@DisplayName("classpath")
void classpath() throws IOException {
@@ -513,34 +466,24 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
}
/**
- *
+ * Tests "config" command.
*/
@Nested
@DisplayName("config")
class Config {
- /**
- *
- */
+ /** Http client that is used for communication purposes. */
@Mock
private HttpClient httpClient;
- /**
- *
- */
+ /** HTTP response. */
@Mock
private HttpResponse<String> res;
- /**
- *
- */
@BeforeEach
void setUp() {
ctx.registerSingleton(httpClient);
}
- /**
- *
- */
//TODO: Fix in https://issues.apache.org/jira/browse/IGNITE-15306
@Test
@DisplayName("get --node-endpoint localhost:8081 --type node")
@@ -566,9 +509,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
+ "}\n", out.toString());
}
- /**
- *
- */
//TODO: Fix in https://issues.apache.org/jira/browse/IGNITE-15306
@Test
@DisplayName("get --node-endpoint localhost:8081 --selector local.baseline --type node")
@@ -594,9 +534,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
+ "}\n", out.toString());
}
- /**
- *
- */
//TODO: Fix in https://issues.apache.org/jira/browse/IGNITE-15306
@Test
@DisplayName("set --node-endpoint localhost:8081 local.baseline.autoAdjust.enabled=true --type node")
@@ -624,9 +561,6 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
+ " command to view the updated configuration.\n", out.toString());
}
- /**
- *
- */
//TODO: Fix in https://issues.apache.org/jira/browse/IGNITE-15306
@Test
@DisplayName(
@@ -659,7 +593,13 @@ public class IgniteCliInterfaceTest extends AbstractCliTest {
}
/**
+ * <em>Assert</em> that {@code expected} and {@code actual} are equal.
+ *
+ * <p>If both are {@code null}, they are considered equal.
*
+ * @param exp Expected result.
+ * @param actual Actual result.
+ * @see Object#equals(Object)
*/
private static void assertEquals(String exp, String actual) {
Assertions.assertEquals(
diff --git a/modules/cli/src/test/java/org/apache/ignite/cli/builtins/init/InitIgniteCommandTest.java b/modules/cli/src/test/java/org/apache/ignite/cli/builtins/init/InitIgniteCommandTest.java
index 1429911..1fa33b7 100644
--- a/modules/cli/src/test/java/org/apache/ignite/cli/builtins/init/InitIgniteCommandTest.java
+++ b/modules/cli/src/test/java/org/apache/ignite/cli/builtins/init/InitIgniteCommandTest.java
@@ -50,27 +50,19 @@ import picocli.CommandLine.Help.ColorScheme;
@ExtendWith(MockitoExtension.class)
@MicronautTest
public class InitIgniteCommandTest extends AbstractCliTest {
- /**
- *
- */
+ /** Path resolver.*/
@Inject
SystemPathResolver pathRslvr;
- /**
- *
- */
+ /** Maven artifact resolver. */
@Inject
MavenArtifactResolver mavenArtifactRslvr;
- /**
- *
- */
+ /** Init command instance. */
@Inject
InitIgniteCommand initIgniteCmd;
- /**
- *
- */
+ /** Configuration loader. */
@Inject
CliPathsConfigLoader cliPathsCfgLdr;
@@ -82,9 +74,6 @@ public class InitIgniteCommandTest extends AbstractCliTest {
@TempDir
Path currDir;
- /**
- *
- */
@Test
void init() throws IOException {
when(pathRslvr.osHomeDirectoryPath()).thenReturn(homeDir);
@@ -102,9 +91,6 @@ public class InitIgniteCommandTest extends AbstractCliTest {
assertTrue(ignitePaths.validateDirs());
}
- /**
- *
- */
@Test
void reinit() throws IOException {
when(pathRslvr.osHomeDirectoryPath()).thenReturn(homeDir);
@@ -129,7 +115,9 @@ public class InitIgniteCommandTest extends AbstractCliTest {
}
/**
+ * Returns maven artifact resolver.
*
+ * @return Maven artifact resolver.
*/
@MockBean(MavenArtifactResolver.class)
MavenArtifactResolver mavenArtifactResolver() {
@@ -137,7 +125,9 @@ public class InitIgniteCommandTest extends AbstractCliTest {
}
/**
+ * Returns system path resolver.
*
+ * @return System path resolver.
*/
@MockBean(SystemPathResolver.class)
SystemPathResolver systemPathResolver() {
@@ -145,7 +135,9 @@ public class InitIgniteCommandTest extends AbstractCliTest {
}
/**
+ * Removes the specified {@dir} and its subdirectories.
*
+ * @param dir Directory to be removed.
*/
private void recursiveDirRemove(Path dir) throws IOException {
Files.walk(dir)
@@ -153,6 +145,5 @@ public class InitIgniteCommandTest extends AbstractCliTest {
.map(Path::toFile)
.forEach(File::delete);
dir.toFile().delete();
-
}
}
diff --git a/modules/cli/src/test/java/org/apache/ignite/cli/builtins/module/ModuleMangerTest.java b/modules/cli/src/test/java/org/apache/ignite/cli/builtins/module/ModuleMangerTest.java
index 2bec39f..359e3ca 100644
--- a/modules/cli/src/test/java/org/apache/ignite/cli/builtins/module/ModuleMangerTest.java
+++ b/modules/cli/src/test/java/org/apache/ignite/cli/builtins/module/ModuleMangerTest.java
@@ -49,27 +49,19 @@ import picocli.CommandLine;
@ExtendWith(MockitoExtension.class)
@MicronautTest
public class ModuleMangerTest extends AbstractCliTest {
- /**
- *
- */
+ /** Maven artifact resolver. */
@Inject
MavenArtifactResolver mavenArtifactRslvr;
- /**
- *
- */
+ /** Module manager. */
@Inject
ModuleManager moduleMgr;
- /**
- *
- */
+ /** Module registery. */
@Inject
ModuleRegistry moduleRegistry;
- /**
- *
- */
+ /** Path to the artifacts. */
@TempDir
Path artifactsDir;
@@ -77,9 +69,6 @@ public class ModuleMangerTest extends AbstractCliTest {
@TempDir
Path homeDir;
- /**
- *
- */
@Test
void testCliModuleInstallation() throws IOException {
var rootArtifact = generateJar("test-module", "1.0", true);
@@ -103,9 +92,6 @@ public class ModuleMangerTest extends AbstractCliTest {
&& m.artifacts.equals(Collections.emptyList())));
}
- /**
- *
- */
@Test
void testServerModuleInstallation() throws IOException {
var rootArtifact = generateJar("test-module", "1.0", false);
@@ -130,7 +116,9 @@ public class ModuleMangerTest extends AbstractCliTest {
}
/**
+ * Returns maven artifact resolver.
*
+ * @return Maven artifact resolver.
*/
@MockBean(MavenArtifactResolver.class)
MavenArtifactResolver mavenArtifactResolver() {
@@ -138,7 +126,9 @@ public class ModuleMangerTest extends AbstractCliTest {
}
/**
+ * Returns module registry.
*
+ * @return Module registry.
*/
@MockBean(ModuleRegistry.class)
ModuleRegistry moduleStorage() {
@@ -147,6 +137,12 @@ public class ModuleMangerTest extends AbstractCliTest {
/**
* Generates jar file with CLI module mark or not.
+ *
+ * @param artifactId Artifact id.
+ * @param ver Version.
+ * @param isCliModule {@code true} if cli module.
+ *
+ * @return Path to the Jar file with CLI module mark or not.
*/
private Path generateJar(String artifactId, String ver, boolean isCliModule) throws IOException {
Manifest manifest = new Manifest();
diff --git a/modules/cli/src/test/java/org/apache/ignite/cli/ui/ProgressBarTest.java b/modules/cli/src/test/java/org/apache/ignite/cli/ui/ProgressBarTest.java
index b0c899d..34de853 100644
--- a/modules/cli/src/test/java/org/apache/ignite/cli/ui/ProgressBarTest.java
+++ b/modules/cli/src/test/java/org/apache/ignite/cli/ui/ProgressBarTest.java
@@ -29,40 +29,27 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
- *
+ * Tests progress bar.
*/
public class ProgressBarTest extends AbstractCliTest {
- /**
- *
- */
+ /** Writer that is used in order to prints formatted representation to the underlying output stream. */
private PrintWriter out;
- /**
- *
- */
+ /** CLI output stream. */
private ByteArrayOutputStream outputStream;
- /**
- *
- */
@BeforeEach
void setUp() {
outputStream = new ByteArrayOutputStream();
out = new PrintWriter(outputStream, true);
}
- /**
- *
- */
@AfterEach
void tearDown() throws IOException {
out.close();
outputStream.close();
}
- /**
- *
- */
@Test
public void testScaledToTerminalWidth() throws IOException {
var progressBar = new ProgressBar(out, 3, 80);
@@ -74,9 +61,6 @@ public class ProgressBarTest extends AbstractCliTest {
);
}
- /**
- *
- */
@Test
public void testRedundantStepsProgressBar() {
var progressBar = new ProgressBar(out, 3, 80);
diff --git a/modules/cli/src/test/java/org/apache/ignite/cli/ui/SpinnerTest.java b/modules/cli/src/test/java/org/apache/ignite/cli/ui/SpinnerTest.java
index 486e115..96ad24c 100644
--- a/modules/cli/src/test/java/org/apache/ignite/cli/ui/SpinnerTest.java
+++ b/modules/cli/src/test/java/org/apache/ignite/cli/ui/SpinnerTest.java
@@ -27,40 +27,27 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
- *
+ * Tests spinner.
*/
public class SpinnerTest {
- /**
- *
- */
+ /** Writer that is used in order to prints formatted representation to the underlying output stream. */
private PrintWriter out;
- /**
- *
- */
+ /** CLI output stream. */
private ByteArrayOutputStream outputStream;
- /**
- *
- */
@BeforeEach
public void setUp() {
outputStream = new ByteArrayOutputStream();
out = new PrintWriter(outputStream);
}
- /**
- *
- */
@AfterEach
public void tearDown() throws IOException {
out.close();
outputStream.close();
}
- /**
- *
- */
@Test
public void testSpinner() {
var spinner = new Spinner(out, "Waiting");
@@ -78,9 +65,6 @@ public class SpinnerTest {
assertEquals("\rWaiting. \rWaiting.. \rWaiting...\rWaiting. ", outputStream.toString());
}
- /**
- *
- */
@Test
public void testSpinnerClose() {
var spinner = new Spinner(out, "Waiting");
diff --git a/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServicePersistenceTest.java b/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServicePersistenceTest.java
index 221d691..05863d6 100644
--- a/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServicePersistenceTest.java
+++ b/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServicePersistenceTest.java
@@ -41,38 +41,20 @@ import org.junit.jupiter.api.extension.ExtendWith;
*/
@ExtendWith(WorkDirectoryExtension.class)
public class ItMetaStorageServicePersistenceTest extends ItAbstractListenerSnapshotTest<MetaStorageListener> {
- /**
- *
- */
private static final ByteArray FIRST_KEY = ByteArray.fromString("first");
- /**
- *
- */
private static final byte[] FIRST_VALUE = "firstValue".getBytes(StandardCharsets.UTF_8);
- /**
- *
- */
private static final ByteArray SECOND_KEY = ByteArray.fromString("second");
- /**
- *
- */
private static final byte[] SECOND_VALUE = "secondValue".getBytes(StandardCharsets.UTF_8);
- /**
- *
- */
private MetaStorageServiceImpl metaStorage;
- /**
- *
- */
private KeyValueStorage storage;
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
diff --git a/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServiceTest.java b/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServiceTest.java
index 83421fb..ff667e4 100644
--- a/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServiceTest.java
+++ b/modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServiceTest.java
@@ -101,9 +101,6 @@ public class ItMetaStorageServiceTest {
/** Nodes. */
private static final int NODES = 2;
- /**
- *
- */
private static final String METASTORAGE_RAFT_GROUP_NAME = "METASTORAGE_RAFT_GROUP";
/** Factory. */
@@ -112,9 +109,6 @@ public class ItMetaStorageServiceTest {
/** Network factory. */
private static final ClusterServiceFactory NETWORK_FACTORY = new TestScaleCubeClusterServiceFactory();
- /**
- *
- */
private static final MessageSerializationRegistry SERIALIZATION_REGISTRY = new MessageSerializationRegistryImpl();
/** Expected server result entry. */
@@ -167,9 +161,6 @@ public class ItMetaStorageServiceTest {
/** Metastorage service. */
private MetaStorageService metaStorageSvc;
- /**
- *
- */
@WorkDirectory
private Path dataPath;
@@ -867,6 +858,8 @@ public class ItMetaStorageServiceTest {
}
/**
+ * Wait for topology.
+ *
* @param cluster The cluster.
* @param exp Expected count.
* @param timeout The timeout in millis.
diff --git a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/CursorImpl.java b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/CursorImpl.java
index 753b576..3857217 100644
--- a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/CursorImpl.java
+++ b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/CursorImpl.java
@@ -48,17 +48,13 @@ public class CursorImpl<T> implements Cursor<T> {
/** Meta storage raft group service. */
private final RaftGroupService metaStorageRaftGrpSvc;
- /**
- *
- */
private final Iterator<T> it;
- /**
- *
- */
private final Function<Object, T> fn;
/**
+ * Constructor.
+ *
* @param metaStorageRaftGrpSvc Meta storage raft group service.
* @param initOp Future that runs meta storage service operation that provides cursor.
*/
@@ -106,7 +102,7 @@ public class CursorImpl<T> implements Cursor<T> {
}
/**
- *
+ * Extension of {@link Iterator}.
*/
private class InnerIterator implements Iterator<T> {
/** {@inheritDoc} */
diff --git a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Entry.java b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Entry.java
index 4528588..146c4e8 100644
--- a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Entry.java
+++ b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Entry.java
@@ -22,7 +22,9 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
- * Represents a storage unit as entry with key, value and revision, where
+ * Represents a storage unit as entry with key, value and revision.
+ *
+ * <p>Where:
* <ul>
* <li>key - an unique entry's key. Keys are comparable in lexicographic manner.</li>
* <li>value - a data which is associated with a key and represented as an array of bytes.</li>
diff --git a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/MetaStorageServiceImpl.java b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/MetaStorageServiceImpl.java
index 032fb7e..f762ac9 100644
--- a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/MetaStorageServiceImpl.java
+++ b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/MetaStorageServiceImpl.java
@@ -80,6 +80,8 @@ public class MetaStorageServiceImpl implements MetaStorageService {
private final String localNodeId;
/**
+ * Constructor.
+ *
* @param metaStorageRaftGrpSvc Meta storage raft group service.
* @param localNodeId Local node id.
*/
@@ -285,9 +287,6 @@ public class MetaStorageServiceImpl implements MetaStorageService {
return metaStorageRaftGrpSvc.run(new CursorsCloseCommand(nodeId));
}
- /**
- *
- */
private static List<OperationInfo> toOperationInfos(Collection<Operation> ops) {
List<OperationInfo> res = new ArrayList<>(ops.size());
@@ -312,9 +311,6 @@ public class MetaStorageServiceImpl implements MetaStorageService {
return res;
}
- /**
- *
- */
private static ConditionInfo toConditionInfo(@NotNull Condition condition) {
ConditionInfo cnd = null;
@@ -343,9 +339,6 @@ public class MetaStorageServiceImpl implements MetaStorageService {
return cnd;
}
- /**
- *
- */
private static Map<ByteArray, Entry> multipleEntryResult(Object obj) {
MultipleEntryResponse resp = (MultipleEntryResponse) obj;
@@ -360,18 +353,12 @@ public class MetaStorageServiceImpl implements MetaStorageService {
return res;
}
- /**
- *
- */
private static Entry singleEntryResult(Object obj) {
SingleEntryResponse resp = (SingleEntryResponse) obj;
return new EntryImpl(new ByteArray(resp.key()), resp.value(), resp.revision(), resp.updateCounter());
}
- /**
- *
- */
private static WatchEvent watchResponse(Object obj) {
MultipleEntryResponse resp = (MultipleEntryResponse) obj;
@@ -455,11 +442,8 @@ public class MetaStorageServiceImpl implements MetaStorageService {
);
}
- /** Watcher thread, uses pulling logic in order to retrieve watch notifications from server */
+ /** Watcher thread, uses pulling logic in order to retrieve watch notifications from server. */
private final class Watcher extends Thread {
- /**
- *
- */
private volatile boolean stop = false;
/** Watch event cursor. */
@@ -469,6 +453,8 @@ public class MetaStorageServiceImpl implements MetaStorageService {
private WatchListener lsnr;
/**
+ * Constructor.
+ *
* @param cursor Watch event cursor.
* @param lsnr The listener which receives and handles watch updates.
*/
diff --git a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Operation.java b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Operation.java
index c4bf9ba..bbfe9eb 100644
--- a/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Operation.java
+++ b/modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/Operation.java
@@ -38,7 +38,7 @@ public final class Operation {
}
/**
- *
+ * Returns actual operation implementation.
*/
public InnerOp inner() {
return upd;
@@ -128,7 +128,7 @@ public final class Operation {
}
/**
- *
+ * Extension of {@link InnerOp}.
*/
private static class AbstractOp implements InnerOp {
/** Key. */
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAllCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAllCommand.java
index a690ab0..f373d0a 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAllCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAllCommand.java
@@ -36,6 +36,8 @@ public final class GetAllCommand implements ReadCommand {
private long revUpperBound;
/**
+ * Constructor.
+ *
* @param keys The collection of keys. Couldn't be {@code null} or empty. Collection elements couldn't be {@code null}.
*/
public GetAllCommand(@NotNull Set<ByteArray> keys) {
@@ -49,6 +51,8 @@ public final class GetAllCommand implements ReadCommand {
}
/**
+ * Constructor.
+ *
* @param keys The collection of keys. Couldn't be {@code null} or empty. Collection elements couldn't be {@code null}.
* @param revUpperBound The upper bound for entry revisions. Must be positive.
*/
@@ -61,14 +65,14 @@ public final class GetAllCommand implements ReadCommand {
}
/**
- * @return The list of keys.
+ * Returns the list of keys.
*/
public @NotNull List<byte[]> keys() {
return keys;
}
/**
- * @return The upper bound for entry revisions. Must be positive.
+ * Returns the upper bound for entry revisions. Must be positive.
*/
public long revision() {
return revUpperBound;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutAllCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutAllCommand.java
index e226bfa..df72941 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutAllCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutAllCommand.java
@@ -38,6 +38,8 @@ public final class GetAndPutAllCommand implements WriteCommand {
private final List<byte[]> vals;
/**
+ * Constructor.
+ *
* @param vals Values.
*/
public GetAndPutAllCommand(@NotNull Map<ByteArray, byte[]> vals) {
@@ -54,14 +56,14 @@ public final class GetAndPutAllCommand implements WriteCommand {
}
/**
- * @return Keys.
+ * Returns keys.
*/
public @NotNull List<byte[]> keys() {
return keys;
}
/**
- * @return Values.
+ * Returns values.
*/
public @NotNull List<byte[]> vals() {
return vals;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutCommand.java
index 07af641..5857e27 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndPutCommand.java
@@ -35,6 +35,8 @@ public final class GetAndPutCommand implements WriteCommand {
private final byte[] val;
/**
+ * Constructor.
+ *
* @param key The key. Couldn't be {@code null}.
* @param val The value. Couldn't be {@code null}.
*/
@@ -44,14 +46,14 @@ public final class GetAndPutCommand implements WriteCommand {
}
/**
- * @return The key. Couldn't be {@code null}.
+ * Returns the key. Couldn't be {@code null}.
*/
public @NotNull byte[] key() {
return key;
}
/**
- * @return The value. Couldn't be {@code null}.
+ * Returns the value. Couldn't be {@code null}.
*/
public @NotNull byte[] value() {
return val;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveAllCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveAllCommand.java
index 0cd44c8..9ced374 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveAllCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveAllCommand.java
@@ -33,6 +33,8 @@ public final class GetAndRemoveAllCommand implements WriteCommand {
private final List<byte[]> keys;
/**
+ * Constructor.
+ *
* @param keys The keys collection. Couldn't be {@code null}.
*/
public GetAndRemoveAllCommand(@NotNull Set<ByteArray> keys) {
@@ -44,7 +46,7 @@ public final class GetAndRemoveAllCommand implements WriteCommand {
}
/**
- * @return The keys collection. Couldn't be {@code null}.
+ * Returns the keys collection. Couldn't be {@code null}.
*/
public @NotNull List<byte[]> keys() {
return keys;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveCommand.java
index 323e94e..ec2d61d 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetAndRemoveCommand.java
@@ -31,6 +31,8 @@ public final class GetAndRemoveCommand implements WriteCommand {
private final byte[] key;
/**
+ * Constructor.
+ *
* @param key The key. Couldn't be {@code null}.
*/
public GetAndRemoveCommand(@NotNull ByteArray key) {
@@ -38,7 +40,7 @@ public final class GetAndRemoveCommand implements WriteCommand {
}
/**
- * @return The key. Couldn't be {@code null}.
+ * Returns the key. Couldn't be {@code null}.
*/
public @NotNull byte[] key() {
return key;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetCommand.java
index 3af4342..2cb6a91 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/GetCommand.java
@@ -33,6 +33,8 @@ public final class GetCommand implements ReadCommand {
private long revUpperBound;
/**
+ * Constructor.
+ *
* @param key Key. Couldn't be {@code null}.
*/
public GetCommand(@NotNull ByteArray key) {
@@ -40,6 +42,8 @@ public final class GetCommand implements ReadCommand {
}
/**
+ * Constructor.
+ *
* @param key Key. Couldn't be {@code null}.
* @param revUpperBound The upper bound for entry revisions. Must be positive.
*/
@@ -52,14 +56,14 @@ public final class GetCommand implements ReadCommand {
}
/**
- * @return Key.
+ * Returns key.
*/
public @NotNull byte[] key() {
return key;
}
/**
- * @return The upper bound for entry revisions, or {@code null} if wasn't specified.
+ * Returns the upper bound for entry revisions, or {@code null} if wasn't specified.
*/
public long revision() {
return revUpperBound;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutAllCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutAllCommand.java
index b207ab2..145ad59 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutAllCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutAllCommand.java
@@ -35,6 +35,8 @@ public final class PutAllCommand implements WriteCommand {
private final List<byte[]> vals;
/**
+ * Constructor.
+ *
* @param vals he map of keys and corresponding values. Couldn't be {@code null} or empty.
*/
public PutAllCommand(@NotNull Map<ByteArray, byte[]> vals) {
@@ -61,14 +63,14 @@ public final class PutAllCommand implements WriteCommand {
}
/**
- * @return Entries values.
+ * Returns entries values.
*/
public @NotNull List<byte[]> keys() {
return keys;
}
/**
- * @return Entries values.
+ * Returns entries values.
*/
public @NotNull List<byte[]> values() {
return vals;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutCommand.java
index 22f3700..51a7fca 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/PutCommand.java
@@ -35,6 +35,8 @@ public final class PutCommand implements WriteCommand {
private final byte[] val;
/**
+ * Constructor.
+ *
* @param key The key. Couldn't be {@code null}.
* @param val The value. Couldn't be {@code null}.
*/
@@ -44,14 +46,14 @@ public final class PutCommand implements WriteCommand {
}
/**
- * @return The key. Couldn't be {@code null}.
+ * Returns the key. Couldn't be {@code null}.
*/
public @NotNull byte[] key() {
return key;
}
/**
- * @return The value. Couldn't be {@code null}.
+ * Returns the value. Couldn't be {@code null}.
*/
public @NotNull byte[] value() {
return val;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RangeCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RangeCommand.java
index 188c82a..5280022 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RangeCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RangeCommand.java
@@ -49,6 +49,8 @@ public final class RangeCommand implements WriteCommand {
private final IgniteUuid cursorId;
/**
+ * Constructor.
+ *
* @param keyFrom Start key of range (inclusive).
* @param keyTo End key of range (exclusive).
* @param requesterNodeId Id of the node that requests range.
@@ -64,6 +66,8 @@ public final class RangeCommand implements WriteCommand {
}
/**
+ * Constructor.
+ *
* @param keyFrom Start key of range (inclusive).
* @param keyTo End key of range (exclusive).
* @param revUpperBound The upper bound for entry revision. {@code -1} means latest revision.
@@ -85,35 +89,35 @@ public final class RangeCommand implements WriteCommand {
}
/**
- * @return Start key of range (inclusive). Couldn't be {@code null}.
+ * Returns start key of range (inclusive). Couldn't be {@code null}.
*/
public @NotNull byte[] keyFrom() {
return keyFrom;
}
/**
- * @return End key of range (exclusive). Could be {@code null}.
+ * Returns end key of range (exclusive). Could be {@code null}.
*/
public @Nullable byte[] keyTo() {
return keyTo;
}
/**
- * @return The upper bound for entry revision. Means latest revision.
+ * Returns the upper bound for entry revision. Means latest revision.
*/
public @NotNull long revUpperBound() {
return revUpperBound;
}
/**
- * @return Id of the node that requests range.
+ * Returns id of the node that requests range.
*/
public @NotNull String requesterNodeId() {
return requesterNodeId;
}
/**
- * @return Id of cursor that is associated with the current command.
+ * Returns id of cursor that is associated with the current command.
*/
@NotNull
public IgniteUuid getCursorId() {
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveAllCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveAllCommand.java
index e117124..86434dc 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveAllCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveAllCommand.java
@@ -33,6 +33,8 @@ public final class RemoveAllCommand implements WriteCommand {
private final List<byte[]> keys;
/**
+ * Constructor.
+ *
* @param keys The keys collection. Couldn't be {@code null}.
*/
public RemoveAllCommand(@NotNull Set<ByteArray> keys) {
@@ -44,7 +46,7 @@ public final class RemoveAllCommand implements WriteCommand {
}
/**
- * @return The keys list. Couldn't be {@code null}.
+ * Returns the keys list. Couldn't be {@code null}.
*/
public @NotNull List<byte[]> keys() {
return keys;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveCommand.java
index daa6f6e..e572651 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/RemoveCommand.java
@@ -30,6 +30,8 @@ public final class RemoveCommand implements WriteCommand {
private final byte[] key;
/**
+ * Constructor.
+ *
* @param key he key. Couldn't be {@code null}.
*/
public RemoveCommand(@NotNull ByteArray key) {
@@ -37,7 +39,7 @@ public final class RemoveCommand implements WriteCommand {
}
/**
- * @return The key. Couldn't be {@code null}.
+ * Returns the key. Couldn't be {@code null}.
*/
public @NotNull byte[] key() {
return key;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/SingleEntryResponse.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/SingleEntryResponse.java
index ebe41d3..0252667 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/SingleEntryResponse.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/SingleEntryResponse.java
@@ -36,7 +36,7 @@ public class SingleEntryResponse implements Serializable {
/** Revision. */
private final long rev;
- /** Update counter */
+ /** Update counter. */
private final long updCntr;
/**
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchExactKeysCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchExactKeysCommand.java
index 20bd057..48cfad7 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchExactKeysCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchExactKeysCommand.java
@@ -45,6 +45,8 @@ public final class WatchExactKeysCommand implements WriteCommand {
private final IgniteUuid cursorId;
/**
+ * Constructor.
+ *
* @param keys The keys collection. Couldn't be {@code null}.
* @param revision Start revision inclusive. {@code 0} - all revisions.
* @param requesterNodeId Id of the node that requests watch.
@@ -70,28 +72,28 @@ public final class WatchExactKeysCommand implements WriteCommand {
}
/**
- * @return The keys list. Couldn't be {@code null}.
+ * Returns the keys list. Couldn't be {@code null}.
*/
public @NotNull List<byte[]> keys() {
return keys;
}
/**
- * @return Start revision inclusive.
+ * Returns start revision inclusive.
*/
public @NotNull Long revision() {
return revision;
}
/**
- * @return Id of the node that requests range.
+ * Returns id of the node that requests range.
*/
public @NotNull String requesterNodeId() {
return requesterNodeId;
}
/**
- * @return Id of cursor that is associated with the current command.
+ * Returns id of cursor that is associated with the current command.
*/
@NotNull
public IgniteUuid getCursorId() {
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchRangeKeysCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchRangeKeysCommand.java
index cff9519..4acace7 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchRangeKeysCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/WatchRangeKeysCommand.java
@@ -47,6 +47,8 @@ public final class WatchRangeKeysCommand implements WriteCommand {
private final IgniteUuid cursorId;
/**
+ * Constructor.
+ *
* @param keyFrom Start key of range (inclusive).
* @param keyTo End key of range (exclusive).
* @param requesterNodeId Id of the node that requests watch.
@@ -62,6 +64,8 @@ public final class WatchRangeKeysCommand implements WriteCommand {
}
/**
+ * Constructor.
+ *
* @param keyFrom Start key of range (inclusive).
* @param keyTo End key of range (exclusive).
* @param revision Start revision inclusive. {@code 0} - all revisions.
@@ -83,35 +87,35 @@ public final class WatchRangeKeysCommand implements WriteCommand {
}
/**
- * @return Start key of range (inclusive). Couldn't be {@code null}.
+ * Returns start key of range (inclusive). Couldn't be {@code null}.
*/
public @Nullable byte[] keyFrom() {
return keyFrom;
}
/**
- * @return End key of range (exclusive). Could be {@code null}.
+ * Returns end key of range (exclusive). Could be {@code null}.
*/
public @Nullable byte[] keyTo() {
return keyTo;
}
/**
- * @return Start revision inclusive. {@code 0} - all revisions.
+ * Returns start revision inclusive. {@code 0} - all revisions.
*/
public long revision() {
return revision;
}
/**
- * @return Id of the node that requests range.
+ * Returns id of the node that requests range.
*/
public @NotNull String requesterNodeId() {
return requesterNodeId;
}
/**
- * @return Id of cursor that is associated with the current command.
+ * Returns id of cursor that is associated with the current command.
*/
public IgniteUuid getCursorId() {
return cursorId;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorCloseCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorCloseCommand.java
index c59e169..67c23cc 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorCloseCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorCloseCommand.java
@@ -30,6 +30,8 @@ public class CursorCloseCommand implements WriteCommand {
private final IgniteUuid cursorId;
/**
+ * Constructor.
+ *
* @param cursorId Cursor id.
*/
public CursorCloseCommand(@NotNull IgniteUuid cursorId) {
@@ -37,7 +39,7 @@ public class CursorCloseCommand implements WriteCommand {
}
/**
- * @return Cursor id.
+ * Returns cursor id.
*/
public @NotNull IgniteUuid cursorId() {
return cursorId;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorHasNextCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorHasNextCommand.java
index eeee649..8959f50 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorHasNextCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorHasNextCommand.java
@@ -30,6 +30,8 @@ public class CursorHasNextCommand implements ReadCommand {
private final IgniteUuid cursorId;
/**
+ * Constructor.
+ *
* @param cursorId Cursor id.
*/
public CursorHasNextCommand(@NotNull IgniteUuid cursorId) {
@@ -37,7 +39,7 @@ public class CursorHasNextCommand implements ReadCommand {
}
/**
- * @return Cursor id.
+ * Returns cursor id.
*/
public @NotNull IgniteUuid cursorId() {
return cursorId;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorNextCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorNextCommand.java
index a40cbd8..ee081e0 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorNextCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorNextCommand.java
@@ -30,6 +30,8 @@ public class CursorNextCommand implements WriteCommand {
private final IgniteUuid cursorId;
/**
+ * Constructor.
+ *
* @param cursorId Cursor id.
*/
public CursorNextCommand(@NotNull IgniteUuid cursorId) {
@@ -37,7 +39,7 @@ public class CursorNextCommand implements WriteCommand {
}
/**
- * @return Cursor id.
+ * Returns cursor id.
*/
public @NotNull IgniteUuid cursorId() {
return cursorId;
diff --git a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorsCloseCommand.java b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorsCloseCommand.java
index 57508cf..84572f2 100644
--- a/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorsCloseCommand.java
+++ b/modules/metastorage-common/src/main/java/org/apache/ignite/internal/metastorage/common/command/cursor/CursorsCloseCommand.java
@@ -30,6 +30,8 @@ public class CursorsCloseCommand implements WriteCommand {
private final String nodeId;
/**
+ * Constructor.
+ *
* @param nodeId Node id.
*/
public CursorsCloseCommand(@NotNull String nodeId) {
@@ -37,7 +39,7 @@ public class CursorsCloseCommand implements WriteCommand {
}
/**
- * @return Cursor id.
+ * Returns cursor id.
*/
public @NotNull String nodeId() {
return nodeId;
diff --git a/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/Entry.java b/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/Entry.java
index a07a7ef..ce8972f 100644
--- a/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/Entry.java
+++ b/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/Entry.java
@@ -21,7 +21,9 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
- * Represents a storage unit as entry with key, value and revision, where
+ * Represents a storage unit as entry with key, value and revision.
+ *
+ * <p>Where:
* <ul>
* <li>key - an unique entry's key represented by an array of bytes. Keys are comparable in lexicographic manner.</li>
* <li>value - a data which is associated with a key and represented as an array of bytes.</li>
diff --git a/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/persistence/RocksDbKeyValueStorage.java b/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/persistence/RocksDbKeyValueStorage.java
index dd0b81c..e2a8d9b 100644
--- a/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/persistence/RocksDbKeyValueStorage.java
+++ b/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/persistence/RocksDbKeyValueStorage.java
@@ -92,7 +92,7 @@ import org.rocksdb.WriteOptions;
* entry and the value is a {@code byte[]} that represents a {@code long[]} where every item is a revision of the storage.
*/
public class RocksDbKeyValueStorage implements KeyValueStorage {
- /** Suffix for the temporary snapshot folder */
+ /** Suffix for the temporary snapshot folder. */
private static final String TMP_SUFFIX = ".tmp";
/** A revision to store with system entries. */
@@ -1044,22 +1044,19 @@ public class RocksDbKeyValueStorage implements KeyValueStorage {
}
/**
- * @return Database lock
+ * Returns database lock.
*/
ReadWriteLock lock() {
return rwLock;
}
/**
- * @return Database.
+ * Returns database.
*/
RocksDB db() {
return db;
}
-
- /**
- *
- */
+
@TestOnly
public Path getDbPath() {
return dbPath;
diff --git a/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/raft/MetaStorageListener.java b/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/raft/MetaStorageListener.java
index 708e01e..a4c1c22 100644
--- a/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/raft/MetaStorageListener.java
+++ b/modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/raft/MetaStorageListener.java
@@ -80,6 +80,8 @@ public class MetaStorageListener implements RaftGroupListener {
private final Map<IgniteUuid, CursorMeta> cursors;
/**
+ * Constructor.
+ *
* @param storage Storage.
*/
public MetaStorageListener(KeyValueStorage storage) {
@@ -376,16 +378,13 @@ public class MetaStorageListener implements RaftGroupListener {
}
/**
- * @return {@link KeyValueStorage} that is backing this listener.
+ * Returns {@link KeyValueStorage} that is backing this listener.
*/
@TestOnly
public KeyValueStorage getStorage() {
return storage;
}
- /**
- *
- */
private static Condition toCondition(ConditionInfo info) {
byte[] key = info.key();
@@ -418,9 +417,6 @@ public class MetaStorageListener implements RaftGroupListener {
}
}
- /**
- *
- */
private static List<Operation> toOperations(List<OperationInfo> infos) {
List<Operation> ops = new ArrayList<>(infos.size());
@@ -461,21 +457,21 @@ public class MetaStorageListener implements RaftGroupListener {
}
/**
- * @return Cursor.
+ * Returns cursor.
*/
public Cursor<?> cursor() {
return cursor;
}
/**
- * @return Cursor type.
+ * Returns cursor type.
*/
public CursorType type() {
return type;
}
/**
- * @return Id of the node that creates cursor.
+ * Returns id of the node that creates cursor.
*/
public String requesterNodeId() {
return requesterNodeId;
diff --git a/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/AbstractKeyValueStorageTest.java b/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/AbstractKeyValueStorageTest.java
index 28b6bf7..389a789 100644
--- a/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/AbstractKeyValueStorageTest.java
+++ b/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/AbstractKeyValueStorageTest.java
@@ -43,11 +43,11 @@ import org.junit.jupiter.api.Test;
* Tests for key-value storage implementations.
*/
public abstract class AbstractKeyValueStorageTest {
- /**
- *
- */
private KeyValueStorage storage;
+ /**
+ * Before each.
+ */
@BeforeEach
public void setUp() {
storage = storage();
@@ -55,13 +55,16 @@ public abstract class AbstractKeyValueStorageTest {
storage.start();
}
+ /**
+ * After each.
+ */
@AfterEach
void tearDown() throws Exception {
storage.close();
}
/**
- * @return Key value storage for this test.
+ * Returns key value storage for this test.
*/
abstract KeyValueStorage storage();
@@ -2048,25 +2051,16 @@ public abstract class AbstractKeyValueStorageTest {
assertFalse(it.hasNext());
}
- /**
- *
- */
private static void fill(KeyValueStorage storage, int keySuffix, int num) {
for (int i = 0; i < num; i++) {
storage.getAndPut(key(keySuffix), keyValue(keySuffix, i + 1));
}
}
- /**
- *
- */
private static byte[] key(int k) {
return ("key" + k).getBytes();
}
- /**
- *
- */
private static byte[] keyValue(int k, int v) {
return ("key" + k + '_' + "val" + v).getBytes();
}
diff --git a/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/RocksDbKeyValueStorageTest.java b/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/RocksDbKeyValueStorageTest.java
index 0d6abfd..43babae 100644
--- a/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/RocksDbKeyValueStorageTest.java
+++ b/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/RocksDbKeyValueStorageTest.java
@@ -28,9 +28,6 @@ import org.junit.jupiter.api.extension.ExtendWith;
*/
@ExtendWith(WorkDirectoryExtension.class)
public class RocksDbKeyValueStorageTest extends AbstractKeyValueStorageTest {
- /**
- *
- */
@WorkDirectory
private Path workDir;
diff --git a/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/SimpleInMemoryKeyValueStorage.java b/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/SimpleInMemoryKeyValueStorage.java
index 92dc4f3..75b581c 100644
--- a/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/SimpleInMemoryKeyValueStorage.java
+++ b/modules/metastorage-server/src/test/java/org/apache/ignite/internal/metastorage/server/SimpleInMemoryKeyValueStorage.java
@@ -385,9 +385,6 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
throw new UnsupportedOperationException();
}
- /**
- *
- */
private boolean doRemove(byte[] key, long curRev) {
Entry e = doGet(key, LATEST_REV, false);
@@ -400,9 +397,6 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
return true;
}
- /**
- *
- */
private void compactForKey(
byte[] key,
List<Long> revs,
@@ -427,9 +421,6 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
}
}
- /**
- *
- */
@NotNull
private Collection<Entry> doGetAll(List<byte[]> keys, long rev) {
assert keys != null : "keys list can't be null.";
@@ -447,9 +438,6 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
return res;
}
- /**
- *
- */
@NotNull
private Entry doGet(byte[] key, long rev, boolean exactRev) {
assert rev == LATEST_REV && !exactRev || rev > LATEST_REV :
@@ -499,9 +487,6 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
return -1;
}
- /**
- *
- */
@NotNull
private Entry doGetValue(byte[] key, long lastRev) {
if (lastRev == 0) {
@@ -523,9 +508,6 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
return new Entry(key, lastVal.bytes(), lastRev, lastVal.updateCounter());
}
- /**
- *
- */
private long doPut(byte[] key, byte[] bytes, long curRev) {
long curUpdCntr = ++updCntr;
@@ -555,9 +537,6 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
return lastRev;
}
- /**
- *
- */
private long doPutAll(long curRev, List<byte[]> keys, List<byte[]> bytesList) {
synchronized (mux) {
// Update revsIdx.
@@ -588,16 +567,10 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
}
}
- /**
- *
- */
private static long lastRevision(List<Long> revs) {
return revs.get(revs.size() - 1);
}
- /**
- *
- */
private static List<Long> listOf(long val) {
List<Long> res = new ArrayList<>();
@@ -607,47 +580,23 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
}
/**
- *
+ * Extension of {@link Cursor}.
*/
private class RangeCursor implements Cursor<Entry> {
- /**
- *
- */
private final byte[] keyFrom;
- /**
- *
- */
private final byte[] keyTo;
- /**
- *
- */
private final long rev;
- /**
- *
- */
private final Iterator<Entry> it;
- /**
- *
- */
private Entry nextRetEntry;
- /**
- *
- */
private byte[] lastRetKey;
- /**
- *
- */
private boolean finished;
- /**
- *
- */
RangeCursor(byte[] keyFrom, byte[] keyTo, long rev) {
this.keyFrom = keyFrom;
this.keyTo = keyTo;
@@ -767,32 +716,17 @@ public class SimpleInMemoryKeyValueStorage implements KeyValueStorage {
}
/**
- *
+ * Extension of {@link Cursor}.
*/
private class WatchCursor implements Cursor<WatchEvent> {
- /**
- *
- */
private final Predicate<byte[]> predicate;
- /**
- *
- */
private final Iterator<WatchEvent> it;
- /**
- *
- */
private long lastRetRev;
- /**
- *
- */
private long nextRetRev = -1;
- /**
- *
- */
WatchCursor(long rev, Predicate<byte[]> predicate) {
this.predicate = predicate;
this.lastRetRev = rev - 1;
diff --git a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
index 351ae5f..fc94b7e 100644
--- a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
+++ b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
@@ -69,7 +69,9 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
- * MetaStorage manager is responsible for:
+ * MetaStorage manager.
+ *
+ * <p>Responsible for:
* <ul>
* <li>Handling cluster init message.</li>
* <li>Managing meta storage lifecycle including instantiation meta storage raft group.</li>
@@ -129,7 +131,7 @@ public class MetaStorageManager implements IgniteComponent {
*/
private boolean deployed;
- /** Flag indicates if meta storage nodes were set on start */
+ /** Flag indicates if meta storage nodes were set on start. */
private boolean metaStorageNodesOnStart;
/** Actual storage for the Metastorage. */
@@ -431,6 +433,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Retrieves an entry for the given key.
+ *
* @see MetaStorageService#get(ByteArray)
*/
public @NotNull CompletableFuture<Entry> get(@NotNull ByteArray key) {
@@ -446,6 +450,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Retrieves an entry for the given key and the revision upper bound.
+ *
* @see MetaStorageService#get(ByteArray, long)
*/
public @NotNull CompletableFuture<Entry> get(@NotNull ByteArray key, long revUpperBound) {
@@ -461,6 +467,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Retrieves entries for given keys.
+ *
* @see MetaStorageService#getAll(Set)
*/
public @NotNull CompletableFuture<Map<ByteArray, Entry>> getAll(Set<ByteArray> keys) {
@@ -476,6 +484,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Retrieves entries for given keys and the revision upper bound.
+ *
* @see MetaStorageService#getAll(Set, long)
*/
public @NotNull CompletableFuture<Map<ByteArray, Entry>> getAll(Set<ByteArray> keys, long revUpperBound) {
@@ -491,6 +501,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Inserts or updates an entry with the given key and the given value.
+ *
* @see MetaStorageService#put(ByteArray, byte[])
*/
public @NotNull CompletableFuture<Void> put(@NotNull ByteArray key, byte[] val) {
@@ -506,6 +518,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Inserts or updates an entry with the given key and the given value and retrieves a previous entry for the given key.
+ *
* @see MetaStorageService#getAndPut(ByteArray, byte[])
*/
public @NotNull CompletableFuture<Entry> getAndPut(@NotNull ByteArray key, byte[] val) {
@@ -521,6 +535,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Inserts or updates entries with given keys and given values.
+ *
* @see MetaStorageService#putAll(Map)
*/
public @NotNull CompletableFuture<Void> putAll(@NotNull Map<ByteArray, byte[]> vals) {
@@ -536,6 +552,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Inserts or updates entries with given keys and given values and retrieves a previous entries for given keys.
+ *
* @see MetaStorageService#getAndPutAll(Map)
*/
public @NotNull CompletableFuture<Map<ByteArray, Entry>> getAndPutAll(@NotNull Map<ByteArray, byte[]> vals) {
@@ -551,6 +569,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Removes an entry for the given key.
+ *
* @see MetaStorageService#remove(ByteArray)
*/
public @NotNull CompletableFuture<Void> remove(@NotNull ByteArray key) {
@@ -566,6 +586,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Removes an entry for the given key.
+ *
* @see MetaStorageService#getAndRemove(ByteArray)
*/
public @NotNull CompletableFuture<Entry> getAndRemove(@NotNull ByteArray key) {
@@ -581,6 +603,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Removes entries for given keys.
+ *
* @see MetaStorageService#removeAll(Set)
*/
public @NotNull CompletableFuture<Void> removeAll(@NotNull Set<ByteArray> keys) {
@@ -596,6 +620,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Removes entries for given keys and retrieves previous entries.
+ *
* @see MetaStorageService#getAndRemoveAll(Set)
*/
public @NotNull CompletableFuture<Map<ByteArray, Entry>> getAndRemoveAll(@NotNull Set<ByteArray> keys) {
@@ -632,6 +658,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Updates an entry for the given key conditionally.
+ *
* @see MetaStorageService#invoke(Condition, Collection, Collection)
*/
public @NotNull CompletableFuture<Boolean> invoke(
@@ -651,6 +679,9 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Retrieves entries for the given key range in lexicographic order.
+ * Entries will be filtered out by upper bound of given revision number.
+ *
* @see MetaStorageService#range(ByteArray, ByteArray, long)
*/
public @NotNull Cursor<Entry> range(@NotNull ByteArray keyFrom, @Nullable ByteArray keyTo, long revUpperBound)
@@ -669,6 +700,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Retrieves entries for the given key range in lexicographic order.
+ *
* @see MetaStorageService#range(ByteArray, ByteArray)
*/
public @NotNull Cursor<Entry> range(@NotNull ByteArray keyFrom, @Nullable ByteArray keyTo) throws NodeStoppingException {
@@ -786,6 +819,8 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
+ * Compacts meta storage (removes all tombstone entries and old entries except of entries with latest revision).
+ *
* @see MetaStorageService#compact()
*/
public @NotNull CompletableFuture<Void> compact() {
@@ -801,7 +836,7 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
- * @return Applied revision for {@link VaultManager#putAll} operation.
+ * Returns applied revision for {@link VaultManager#putAll} operation.
*/
private long appliedRevision() {
byte[] appliedRevision = vaultMgr.get(APPLIED_REV).join().value();
@@ -860,8 +895,9 @@ public class MetaStorageManager implements IgniteComponent {
}
/**
- * @param id of watch to redeploy.
- * @return future, which will be completed after redeploy finished.
+ * Returns future, which will be completed after redeploy finished.
+ *
+ * @param id Id of watch to redeploy.
*/
private CompletableFuture<Long> waitForReDeploy(long id) {
if (deployed) {
@@ -921,6 +957,8 @@ public class MetaStorageManager implements IgniteComponent {
private final InnerIterator it = new InnerIterator();
/**
+ * Constructor.
+ *
* @param innerCursorFut Inner cursor future.
*/
CursorWrapper(
diff --git a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/AggregatedWatch.java b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/AggregatedWatch.java
index 828a0e2..1796e51 100644
--- a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/AggregatedWatch.java
+++ b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/AggregatedWatch.java
@@ -46,21 +46,21 @@ public class AggregatedWatch {
}
/**
- * @return Key criterion.
+ * Returns key criterion.
*/
public KeyCriterion keyCriterion() {
return keyCriterion;
}
/**
- * @return Watch listener.
+ * Returns watch listener.
*/
public WatchListener listener() {
return lsnr;
}
/**
- * @return Revision.
+ * Returns revision.
*/
public long revision() {
return revision;
diff --git a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/KeyCriterion.java b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/KeyCriterion.java
index 5fadeee..529afe0 100644
--- a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/KeyCriterion.java
+++ b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/KeyCriterion.java
@@ -215,14 +215,14 @@ public abstract class KeyCriterion {
}
/**
- * @return Start of the range.
+ * Returns start of the range.
*/
public ByteArray from() {
return from;
}
/**
- * @return End of the range (exclusive).
+ * Returns end of the range (exclusive).
*/
public ByteArray to() {
return to;
@@ -293,7 +293,7 @@ public abstract class KeyCriterion {
}
/**
- * @return Collection of keys.
+ * Returns collection of keys.
*/
public Set<ByteArray> keys() {
return keys;
@@ -360,7 +360,7 @@ public abstract class KeyCriterion {
}
/**
- * @return The key of criterion.
+ * Returns the key of criterion.
*/
public ByteArray key() {
return key;
diff --git a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/WatchAggregator.java b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/WatchAggregator.java
index 54044bf..34ebd58 100644
--- a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/WatchAggregator.java
+++ b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/WatchAggregator.java
@@ -235,14 +235,14 @@ public class WatchAggregator {
}
/**
- * @return key criterion.
+ * Returns key criterion.
*/
public KeyCriterion keyCriterion() {
return keyCriterion;
}
/**
- * @return watch listener.
+ * Returns watch listener.
*/
public WatchListener listener() {
return lsnr;
diff --git a/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/WatchAggregatorTest.java b/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/WatchAggregatorTest.java
index 078e473..a602353 100644
--- a/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/WatchAggregatorTest.java
+++ b/modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/WatchAggregatorTest.java
@@ -41,12 +41,9 @@ import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
/**
- *
+ * Test class for {@link WatchAggregator}.
*/
public class WatchAggregatorTest {
- /**
- *
- */
@Test
public void testEventsRouting() {
var watchAggregator = new WatchAggregator();
@@ -78,9 +75,6 @@ public class WatchAggregatorTest {
assertEquals(List.of(entryEvt2), watchEvt2Res.getValue().entryEvents());
}
- /**
- *
- */
@Test
public void testCancel() {
var watchAggregator = new WatchAggregator();
@@ -115,9 +109,6 @@ public class WatchAggregatorTest {
verify(lsnr2, times(2)).onUpdate(any());
}
- /**
- *
- */
@Test
public void testCancelByFalseFromListener() {
var watchAggregator = new WatchAggregator();
@@ -152,9 +143,6 @@ public class WatchAggregatorTest {
}
- /**
- *
- */
@Test
public void testOneCriterionInference() {
var watchAggregator = new WatchAggregator();
@@ -165,9 +153,6 @@ public class WatchAggregatorTest {
assertEquals(new KeyCriterion.ExactCriterion(new ByteArray("key")), keyCriterion);
}
- /**
- *
- */
@Test
public void testTwoExactCriteriaUnion() {
var watchAggregator = new WatchAggregator();
@@ -182,9 +167,6 @@ public class WatchAggregatorTest {
assertEquals(expKeyCriterion, keyCriterion);
}
- /**
- *
- */
@Test
public void testTwoEqualExactCriteriaUnion() {
var watchAggregator = new WatchAggregator();
@@ -196,9 +178,6 @@ public class WatchAggregatorTest {
assertEquals(keyCriterion, keyCriterion);
}
- /**
- *
- */
@Test
public void testThatKeyCriteriaUnionAssociative() {
var data = Arrays.asList(
@@ -213,9 +192,6 @@ public class WatchAggregatorTest {
}
}
- /**
- *
- */
@Test
public void testTwoEqualCollectionCriteriaUnion() {
var watchAggregator = new WatchAggregator();
@@ -230,9 +206,6 @@ public class WatchAggregatorTest {
assertEquals(expKeyCriterion, keyCriterion);
}
- /**
- *
- */
@Test
public void testExactInTheMiddleAndRangeCriteriaOnTheEdgesUnion() {
var watchAggregator = new WatchAggregator();
@@ -246,9 +219,6 @@ public class WatchAggregatorTest {
assertEquals(expKeyCriterion, keyCriterion);
}
- /**
- *
- */
@Test
public void testHighExactAndLowerRangeCriteriaUnion() {
var watchAggregator = new WatchAggregator();
@@ -262,9 +232,6 @@ public class WatchAggregatorTest {
assertEquals(expKeyCriterion, keyCriterion);
}
- /**
- *
- */
@Test
public void testNullKeyAsStartOfRangeCriterion() {
var watchAggregator = new WatchAggregator();
@@ -278,9 +245,6 @@ public class WatchAggregatorTest {
assertEquals(expKeyCriterion, keyCriterion);
}
- /**
- *
- */
@Test
public void testNullKeyAsEndOfRangeCriterion() {
var watchAggregator = new WatchAggregator();
@@ -294,9 +258,6 @@ public class WatchAggregatorTest {
assertEquals(expKeyCriterion, keyCriterion);
}
- /**
- *
- */
@Test
public void testAllTypesOfCriteriaUnion() {
var watchAggregator = new WatchAggregator();
@@ -311,9 +272,6 @@ public class WatchAggregatorTest {
assertEquals(expKeyCriterion, keyCriterion);
}
- /**
- *
- */
private Entry entry(String key, String val, long revision, long updateCntr) {
return new Entry() {
/** {@inheritDoc} */
diff --git a/modules/raft-client/src/main/java/org/apache/ignite/raft/client/Peer.java b/modules/raft-client/src/main/java/org/apache/ignite/raft/client/Peer.java
index 10f2944..aa2af69 100644
--- a/modules/raft-client/src/main/java/org/apache/ignite/raft/client/Peer.java
+++ b/modules/raft-client/src/main/java/org/apache/ignite/raft/client/Peer.java
@@ -38,6 +38,8 @@ public final class Peer implements Serializable {
private final int priority;
/**
+ * Constructor.
+ *
* @param peer Peer.
*/
public Peer(Peer peer) {
@@ -46,6 +48,8 @@ public final class Peer implements Serializable {
}
/**
+ * Constructor.
+ *
* @param addr The address.
*/
public Peer(NetworkAddress addr) {
@@ -53,6 +57,8 @@ public final class Peer implements Serializable {
}
/**
+ * Constructor.
+ *
* @param addr The address.
* @param priority Election priority.
*/
@@ -62,14 +68,14 @@ public final class Peer implements Serializable {
}
/**
- * @return The address.
+ * Returns address.
*/
public NetworkAddress address() {
return this.addr;
}
/**
- * @return Election priority.
+ * Returns election priority.
*/
public int getPriority() {
return priority;
diff --git a/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/CommandClosure.java b/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/CommandClosure.java
index 0ac8b8b..4ff50a7 100644
--- a/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/CommandClosure.java
+++ b/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/CommandClosure.java
@@ -29,7 +29,7 @@ import org.jetbrains.annotations.Nullable;
*/
public interface CommandClosure<R extends Command> {
/**
- * @return The command.
+ * Returns command.
*/
R command();
diff --git a/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/RaftGroupService.java b/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/RaftGroupService.java
index ea54200..f938f90 100644
--- a/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/RaftGroupService.java
+++ b/modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/RaftGroupService.java
@@ -45,12 +45,12 @@ import org.jetbrains.annotations.Nullable;
*/
public interface RaftGroupService {
/**
- * @return Group id.
+ * Returns group id.
*/
@NotNull String groupId();
/**
- * @return Default timeout for the operations in milliseconds.
+ * Returns default timeout for the operations in milliseconds.
*/
long timeout();
@@ -62,18 +62,18 @@ public interface RaftGroupService {
void timeout(long newTimeout);
/**
- * @return Current leader id or {@code null} if it has not been yet initialized.
+ * Returns current leader id or {@code null} if it has not been yet initialized.
*/
@Nullable Peer leader();
/**
- * @return A list of voting peers or {@code null} if it has not been yet initialized. The order is corresponding to the time of joining
+ * Returns a list of voting peers or {@code null} if it has not been yet initialized. The order is corresponding to the time of joining
* to the replication group.
*/
@Nullable List<Peer> peers();
/**
- * @return A list of leaners or {@code null} if it has not been yet initialized. The order is corresponding to the time of joining to
+ * Returns a list of leaners or {@code null} if it has not been yet initialized. The order is corresponding to the time of joining to
* the replication group.
*/
@Nullable List<Peer> learners();
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/internal/raft/ItLozaTest.java b/modules/raft/src/integrationTest/java/org/apache/ignite/internal/raft/ItLozaTest.java
index 377f6c7..1d056b6 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/internal/raft/ItLozaTest.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/internal/raft/ItLozaTest.java
@@ -63,14 +63,8 @@ public class ItLozaTest {
/** Server port offset. */
private static final int PORT = 20010;
- /**
- *
- */
private static final MessageSerializationRegistry SERIALIZATION_REGISTRY = new MessageSerializationRegistryImpl();
- /**
- *
- */
@WorkDirectory
private Path dataPath;
@@ -86,6 +80,8 @@ public class ItLozaTest {
}
/**
+ * Returns the client cluster view.
+ *
* @param testInfo Test info.
* @param port Local port.
* @param srvs Server nodes of the cluster.
@@ -106,7 +102,7 @@ public class ItLozaTest {
}
/**
- * Tests that RaftGroupServiceImpl uses shared executor for retrying RaftGroupServiceImpl#sendWithRetry()
+ * Tests that RaftGroupServiceImpl uses shared executor for retrying RaftGroupServiceImpl#sendWithRetry().
*/
@Test
public void testRaftServiceUsingSharedExecutor(TestInfo testInfo) throws Exception {
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/client/service/ItAbstractListenerSnapshotTest.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/client/service/ItAbstractListenerSnapshotTest.java
index b269c41..750c3d1 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/client/service/ItAbstractListenerSnapshotTest.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/client/service/ItAbstractListenerSnapshotTest.java
@@ -82,14 +82,8 @@ public abstract class ItAbstractListenerSnapshotTest<T extends RaftGroupListener
/** Network factory. */
private static final ClusterServiceFactory NETWORK_FACTORY = new TestScaleCubeClusterServiceFactory();
- /**
- *
- */
private static final MessageSerializationRegistry SERIALIZATION_REGISTRY = new MessageSerializationRegistryImpl();
- /**
- *
- */
@WorkDirectory
private Path workDir;
@@ -157,7 +151,11 @@ public abstract class ItAbstractListenerSnapshotTest<T extends RaftGroupListener
private final boolean interactAfterSnapshot;
/**
+ * Constructor.
*
+ * @param deleteFolder {@code true} if the raft group's persistence must be cleared before the follower's restart.
+ * @param interactAfterSnapshot {@code true} if test should interact with the raft group after a snapshot has been captured.
+ * In this case, the follower node should catch up with the leader using raft log.
*/
private TestData(boolean deleteFolder, boolean interactAfterSnapshot) {
this.deleteFolder = deleteFolder;
@@ -172,7 +170,7 @@ public abstract class ItAbstractListenerSnapshotTest<T extends RaftGroupListener
}
/**
- * @return {@link #testSnapshot} parameters.
+ * Returns {@link #testSnapshot} parameters.
*/
private static List<TestData> testSnapshotData() {
return List.of(
@@ -288,6 +286,8 @@ public abstract class ItAbstractListenerSnapshotTest<T extends RaftGroupListener
public abstract BooleanSupplier snapshotCheckClosure(JraftServerImpl restarted, boolean interactedAfterSnapshot);
/**
+ * Returns path to the group's persistence.
+ *
* @param listener Raft group listener.
* @return Path to the group's persistence.
*/
@@ -302,7 +302,7 @@ public abstract class ItAbstractListenerSnapshotTest<T extends RaftGroupListener
public abstract RaftGroupListener createListener(Path listenerPersistencePath);
/**
- * @return Raft group id for tests.
+ * Returns raft group id for tests.
*/
public abstract String raftGroupId();
@@ -323,6 +323,8 @@ public abstract class ItAbstractListenerSnapshotTest<T extends RaftGroupListener
}
/**
+ * Wait for topology.
+ *
* @param cluster The cluster.
* @param exp Expected count.
* @param timeout The timeout in millis.
@@ -333,7 +335,7 @@ public abstract class ItAbstractListenerSnapshotTest<T extends RaftGroupListener
}
/**
- * @return Local address.
+ * Returns local address.
*/
private static String getLocalAddress() {
try {
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterListener.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterListener.java
index 441e63f..0ed93ff 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterListener.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterListener.java
@@ -114,7 +114,7 @@ public class CounterListener implements RaftGroupListener {
}
/**
- * @return Current value.
+ * Returns current value.
*/
public long value() {
return counter.get();
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterSnapshotFile.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterSnapshotFile.java
index 0598163..367f441 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterSnapshotFile.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/CounterSnapshotFile.java
@@ -38,6 +38,8 @@ class CounterSnapshotFile {
private String path;
/**
+ * Constructor.
+ *
* @param path The path.
*/
CounterSnapshotFile(String path) {
@@ -46,7 +48,7 @@ class CounterSnapshotFile {
}
/**
- * @return The path.
+ * Returns the path.
*/
public String getPath() {
return this.path;
@@ -68,7 +70,8 @@ class CounterSnapshotFile {
}
/**
- * @return The loaded counter value.
+ * Returns the loaded counter value.
+ *
* @throws IOException If failed.
*/
public long load() throws IOException {
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/IncrementAndGetCommand.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/IncrementAndGetCommand.java
index 766ba73..75ebeff 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/IncrementAndGetCommand.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/IncrementAndGetCommand.java
@@ -29,6 +29,8 @@ public class IncrementAndGetCommand implements WriteCommand {
private final long delta;
/**
+ * Constructor.
+ *
* @param delta The delta.
*/
public IncrementAndGetCommand(long delta) {
@@ -36,7 +38,7 @@ public class IncrementAndGetCommand implements WriteCommand {
}
/**
- * @return The delta.
+ * Returns the delta.
*/
public long delta() {
return delta;
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java
index 21e9350..d8ce9c6 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java
@@ -134,7 +134,7 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
private ScheduledExecutorService executor;
/**
- *
+ * Before each.
*/
@BeforeEach
void before() {
@@ -144,7 +144,7 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
}
/**
- *
+ * After each.
*/
@AfterEach
@Override
@@ -186,6 +186,8 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
}
/**
+ * Starts server.
+ *
* @param idx The index.
* @return Raft server instance.
*/
@@ -217,6 +219,8 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
}
/**
+ * Starts client.
+ *
* @param groupId Group id.
* @return The client.
* @throws Exception If failed.
@@ -308,9 +312,6 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
.collect(Collectors.toSet());
}
- /**
- *
- */
@Test
public void testRefreshLeader() throws Exception {
startCluster();
@@ -332,9 +333,6 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
assertNotNull(clients.get(1).leader());
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCounterCommandListener() throws Exception {
startCluster();
@@ -465,7 +463,7 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
}
}
- /** Tests if a raft group become unavailable in case of a critical error */
+ /** Tests if a raft group become unavailable in case of a critical error. */
@Test
public void testApplyWithFailure() throws Exception {
listenerFactory = () -> new CounterListener() {
@@ -635,25 +633,16 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
doTestFollowerCatchUp(false, true);
}
- /**
- *
- */
@Test
public void testFollowerCatchUpFromSnapshot() throws Exception {
doTestFollowerCatchUp(true, true);
}
- /**
- *
- */
@Test
public void testFollowerCatchUpFromLog2() throws Exception {
doTestFollowerCatchUp(false, false);
}
- /**
- *
- */
@Test
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15156")
public void testFollowerCatchUpFromSnapshot2() throws Exception {
@@ -661,6 +650,8 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
}
/**
+ * Do test follower catch up.
+ *
* @param snapshot {@code True} to create snapshot on leader and truncate log.
* @param cleanDir {@code True} to clean persistent state on follower before restart.
* @throws Exception If failed.
@@ -749,6 +740,8 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
}
/**
+ * Applies increments.
+ *
* @param client The client
* @param start Start element.
* @param stop Stop element.
@@ -778,6 +771,8 @@ class ItJraftCounterServerTest extends RaftServerAbstractTest {
}
/**
+ * Validates state machine.
+ *
* @param expected Expected value.
* @param server The server.
* @param groupId Group id.
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItSimpleCounterServerTest.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItSimpleCounterServerTest.java
index c0c046a..5f71403 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItSimpleCounterServerTest.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItSimpleCounterServerTest.java
@@ -76,9 +76,6 @@ class ItSimpleCounterServerTest extends RaftServerAbstractTest {
*/
private RaftGroupService client2;
- /**
- *
- */
@WorkDirectory
private Path dataPath;
@@ -86,7 +83,7 @@ class ItSimpleCounterServerTest extends RaftServerAbstractTest {
private ScheduledExecutorService executor;
/**
- * @throws Exception If failed.
+ * Before each.
*/
@BeforeEach
void before() throws Exception {
@@ -130,7 +127,7 @@ class ItSimpleCounterServerTest extends RaftServerAbstractTest {
}
/**
- * @throws Exception If failed.
+ * After each.
*/
@AfterEach
@Override
@@ -148,9 +145,6 @@ class ItSimpleCounterServerTest extends RaftServerAbstractTest {
super.after();
}
- /**
- *
- */
@Test
public void testRefreshLeader() throws Exception {
Peer leader = client1.leader();
@@ -162,9 +156,6 @@ class ItSimpleCounterServerTest extends RaftServerAbstractTest {
assertNotNull(client1.leader());
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCounterCommandListener() throws Exception {
client1.refreshLeader().get();
diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/RaftServerAbstractTest.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/RaftServerAbstractTest.java
index 3c5d95d..77a4978 100644
--- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/RaftServerAbstractTest.java
+++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/RaftServerAbstractTest.java
@@ -37,14 +37,8 @@ import org.junit.jupiter.api.TestInfo;
* Abstract test for raft server.
*/
abstract class RaftServerAbstractTest {
- /**
- *
- */
protected static final IgniteLogger LOG = IgniteLogger.forClass(RaftServerAbstractTest.class);
- /**
- *
- */
protected static final RaftMessagesFactory FACTORY = new RaftMessagesFactory();
/** Network factory. */
@@ -55,9 +49,6 @@ abstract class RaftServerAbstractTest {
*/
protected static final int PORT = 20010;
- /**
- *
- */
private static final MessageSerializationRegistry SERIALIZATION_REGISTRY = new MessageSerializationRegistryImpl();
/** Test info. */
@@ -76,6 +67,8 @@ abstract class RaftServerAbstractTest {
}
/**
+ * Creates a client cluster view.
+ *
* @param port Local port.
* @param servers Server nodes of the cluster.
* @return The client cluster view.
diff --git a/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/RaftServer.java b/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/RaftServer.java
index 810fd91..8890599 100644
--- a/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/RaftServer.java
+++ b/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/RaftServer.java
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
*/
public interface RaftServer extends IgniteComponent {
/**
- * @return Cluster service.
+ * Returns cluster service.
*/
ClusterService clusterService();
diff --git a/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java b/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
index 5a82edb..90ac87d 100644
--- a/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
+++ b/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
@@ -92,6 +92,8 @@ public class JraftServerImpl implements RaftServer {
private ExecutorService requestExecutor;
/**
+ * Constructor.
+ *
* @param service Cluster service.
* @param dataPath Data path.
*/
@@ -100,6 +102,8 @@ public class JraftServerImpl implements RaftServer {
}
/**
+ * Constructor.
+ *
* @param service Cluster service.
* @param dataPath Data path.
* @param opts Default node options.
@@ -231,6 +235,8 @@ public class JraftServerImpl implements RaftServer {
}
/**
+ * Returns path to persistence folder.
+ *
* @param groupId Group id.
* @return The path to persistence folder.
*/
@@ -319,6 +325,8 @@ public class JraftServerImpl implements RaftServer {
}
/**
+ * Returns service group.
+ *
* @param groupId Group id.
* @return Service group.
*/
@@ -327,12 +335,14 @@ public class JraftServerImpl implements RaftServer {
}
/**
- *
+ * Wrapper of {@link StateMachineAdapter}.
*/
public static class DelegatingStateMachine extends StateMachineAdapter {
private final RaftGroupListener listener;
/**
+ * Constructor.
+ *
* @param listener The listener.
*/
DelegatingStateMachine(RaftGroupListener listener) {
diff --git a/modules/raft/src/test/java/org/apache/ignite/internal/raft/server/impl/RaftServerImpl.java b/modules/raft/src/test/java/org/apache/ignite/internal/raft/server/impl/RaftServerImpl.java
index accce11..009e827 100644
--- a/modules/raft/src/test/java/org/apache/ignite/internal/raft/server/impl/RaftServerImpl.java
+++ b/modules/raft/src/test/java/org/apache/ignite/internal/raft/server/impl/RaftServerImpl.java
@@ -53,50 +53,28 @@ import org.jetbrains.annotations.Nullable;
* A single node service implementation. Only for test purposes.
*/
public class RaftServerImpl implements RaftServer {
- /**
- *
- */
private static final int QUEUE_SIZE = 1000;
/** The logger. */
private static final IgniteLogger LOG = IgniteLogger.forClass(RaftServerImpl.class);
- /**
- *
- */
private final RaftMessagesFactory clientMsgFactory;
- /**
- *
- */
private final ClusterService service;
- /**
- *
- */
private final ConcurrentMap<String, RaftGroupListener> listeners = new ConcurrentHashMap<>();
- /**
- *
- */
private final BlockingQueue<CommandClosureEx<ReadCommand>> readQueue;
- /**
- *
- */
private final BlockingQueue<CommandClosureEx<WriteCommand>> writeQueue;
- /**
- *
- */
private volatile Thread readWorker;
- /**
- *
- */
private volatile Thread writeWorker;
/**
+ * Constructor.
+ *
* @param service Network service.
* @param clientMsgFactory Client message factory.
*/
@@ -216,6 +194,8 @@ public class RaftServerImpl implements RaftServer {
}
/**
+ * Handle action request.
+ *
* @param sender The sender.
* @param req The request.
* @param corellationId Corellation id.
@@ -260,6 +240,8 @@ public class RaftServerImpl implements RaftServer {
}
/**
+ * Process the queue.
+ *
* @param queue The queue.
* @param clo The closure.
* @param <T> Command type.
@@ -290,11 +272,11 @@ public class RaftServerImpl implements RaftServer {
}
/**
- *
+ * Extension of {@link CommandClosure}.
*/
private interface CommandClosureEx<T extends Command> extends CommandClosure<T> {
/**
- * @return The listener.
+ * Returns listener.
*/
RaftGroupListener listener();
}
diff --git a/modules/rest/src/test/java/org/apache/ignite/rest/netty/RestApiHttpResponseTest.java b/modules/rest/src/test/java/org/apache/ignite/rest/netty/RestApiHttpResponseTest.java
index f2922b3..6b2ea45 100644
--- a/modules/rest/src/test/java/org/apache/ignite/rest/netty/RestApiHttpResponseTest.java
+++ b/modules/rest/src/test/java/org/apache/ignite/rest/netty/RestApiHttpResponseTest.java
@@ -32,9 +32,6 @@ import org.junit.jupiter.api.Test;
* Testing the {@link RestApiHttpResponse}.
*/
public class RestApiHttpResponseTest {
- /**
- *
- */
@Test
void testToJson() {
RestApiHttpResponse res = new RestApiHttpResponse(new DefaultHttpResponse(HttpVersion.HTTP_1_1, OK));
diff --git a/modules/rest/src/test/java/org/apache/ignite/rest/presentation/ConfigurationPresentationTest.java b/modules/rest/src/test/java/org/apache/ignite/rest/presentation/ConfigurationPresentationTest.java
index 446ca37..b9ac8f8 100644
--- a/modules/rest/src/test/java/org/apache/ignite/rest/presentation/ConfigurationPresentationTest.java
+++ b/modules/rest/src/test/java/org/apache/ignite/rest/presentation/ConfigurationPresentationTest.java
@@ -57,7 +57,7 @@ public class ConfigurationPresentationTest {
private static TestRootConfiguration cfg;
/**
- *
+ * Before all.
*/
@BeforeAll
static void beforeAll() {
@@ -87,7 +87,7 @@ public class ConfigurationPresentationTest {
}
/**
- *
+ * After all.
*/
@AfterAll
static void afterAll() {
@@ -100,16 +100,13 @@ public class ConfigurationPresentationTest {
}
/**
- *
+ * Before each.
*/
@BeforeEach
void beforeEach() throws Exception {
cfg.change(cfg -> cfg.changeFoo("foo").changeSubCfg(subCfg -> subCfg.changeBar("bar"))).get(1, SECONDS);
}
-
- /**
- *
- */
+
@Test
void testRepresentWholeCfg() {
String s = "{\"root\":{\"foo\":\"foo\",\"subCfg\":{\"bar\":\"bar\"}}}";
@@ -117,10 +114,7 @@ public class ConfigurationPresentationTest {
assertEquals(s, cfgPresentation.represent());
assertEquals(s, cfgPresentation.representByPath(null));
}
-
- /**
- *
- */
+
@Test
void testCorrectRepresentCfgByPath() {
assertEquals("{\"foo\":\"foo\",\"subCfg\":{\"bar\":\"bar\"}}", cfgPresentation.representByPath("root"));
@@ -128,10 +122,7 @@ public class ConfigurationPresentationTest {
assertEquals("{\"bar\":\"bar\"}", cfgPresentation.representByPath("root.subCfg"));
assertEquals("\"bar\"", cfgPresentation.representByPath("root.subCfg.bar"));
}
-
- /**
- *
- */
+
@Test
void testErrorRepresentCfgByPath() {
assertThrows(
@@ -139,10 +130,7 @@ public class ConfigurationPresentationTest {
() -> cfgPresentation.representByPath(UUID.randomUUID().toString())
);
}
-
- /**
- *
- */
+
@Test
void testCorrectUpdateFullCfg() {
String updateVal = "{\"root\":{\"foo\":\"bar\",\"subCfg\":{\"bar\":\"foo\"}}}";
@@ -153,10 +141,7 @@ public class ConfigurationPresentationTest {
assertEquals("foo", cfg.subCfg().bar().value());
assertEquals(updateVal, cfgPresentation.represent());
}
-
- /**
- *
- */
+
@Test
void testCorrectUpdateSubCfg() {
cfgPresentation.update("{\"root\":{\"subCfg\":{\"bar\":\"foo\"}}}");
@@ -165,10 +150,7 @@ public class ConfigurationPresentationTest {
assertEquals("foo", cfg.subCfg().bar().value());
assertEquals("{\"root\":{\"foo\":\"foo\",\"subCfg\":{\"bar\":\"foo\"}}}", cfgPresentation.represent());
}
-
- /**
- *
- */
+
@Test
void testErrorUpdateCfg() {
assertThrows(
diff --git a/modules/rest/src/test/java/org/apache/ignite/rest/routes/RouteTest.java b/modules/rest/src/test/java/org/apache/ignite/rest/routes/RouteTest.java
index fb0111a..fe48323 100644
--- a/modules/rest/src/test/java/org/apache/ignite/rest/routes/RouteTest.java
+++ b/modules/rest/src/test/java/org/apache/ignite/rest/routes/RouteTest.java
@@ -29,12 +29,9 @@ import io.netty.handler.codec.http.HttpHeaderValues;
import org.junit.jupiter.api.Test;
/**
- *
+ * Test class for {@link Route}.
*/
public class RouteTest {
- /**
- *
- */
@Test
void testMatchByUri() {
var route = new Route("/user", GET, null, (request, response) -> {
@@ -43,9 +40,6 @@ public class RouteTest {
assertTrue(route.match(req));
}
- /**
- *
- */
@Test
void testNonMatchByUri() {
var route = new Route("/user", GET, null, (request, response) -> {
@@ -54,9 +48,6 @@ public class RouteTest {
assertFalse(route.match(req));
}
- /**
- *
- */
@Test
void testMatchByContentTypeIfAcceptTypeEmpty() {
var route = new Route("/user", GET, null, (request, response) -> {
@@ -66,9 +57,6 @@ public class RouteTest {
assertTrue(route.match(req));
}
- /**
- *
- */
@Test
void testMatchByContentTypeIfAcceptTypeNonEmpty() {
var route = new Route("/user", PUT, "text/plain", (request, response) -> {
@@ -78,9 +66,6 @@ public class RouteTest {
assertTrue(route.match(req));
}
- /**
- *
- */
@Test
void testNonMatchByContentTypeIfAcceptTypeNonEmpty() {
var route = new Route("/user", PUT, "text/plain", (request, response) -> {
@@ -90,9 +75,6 @@ public class RouteTest {
assertFalse(route.match(req));
}
- /**
- *
- */
@Test
void testMatchByUriWithParams() {
var route = new Route("/user/:user", GET, null, (request, response) -> {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/AbstractBasicIntegrationTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/AbstractBasicIntegrationTest.java
index ca820e8..6718944 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/AbstractBasicIntegrationTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/AbstractBasicIntegrationTest.java
@@ -48,14 +48,11 @@ import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;
/**
- *
+ * Abstract basic integration test.
*/
@ExtendWith(WorkDirectoryExtension.class)
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class AbstractBasicIntegrationTest {
- /**
- *
- */
private static final IgniteLogger LOG = IgniteLogger.forClass(AbstractBasicIntegrationTest.class);
/** Nodes bootstrap configuration. */
@@ -102,12 +99,12 @@ public class AbstractBasicIntegrationTest {
/** Cluster nodes. */
protected static final List<Ignite> CLUSTER_NODES = new ArrayList<>();
- /** Work directory */
+ /** Work directory. */
@WorkDirectory
private static Path WORK_DIR;
/**
- *
+ * Before all.
*/
@BeforeAll
static void startNodes() {
@@ -117,7 +114,7 @@ public class AbstractBasicIntegrationTest {
}
/**
- *
+ * After all.
*/
@AfterAll
static void stopNodes() throws Exception {
@@ -129,10 +126,7 @@ public class AbstractBasicIntegrationTest {
LOG.info("End tearDown()");
}
-
- /**
- *
- */
+
protected static QueryChecker assertQuery(String qry) {
return new QueryChecker(qry) {
@Override
@@ -141,10 +135,7 @@ public class AbstractBasicIntegrationTest {
}
};
}
-
- /**
- *
- */
+
protected static Table createAndPopulateTable() {
TableDefinition schTbl1 = SchemaBuilders.tableBuilder("PUBLIC", "PERSON").columns(
SchemaBuilders.column("ID", ColumnType.INT32).asNonNull().build(),
@@ -170,10 +161,7 @@ public class AbstractBasicIntegrationTest {
return tbl;
}
-
- /**
- *
- */
+
protected static void insertData(Table table, String[] columnNames, Object[]... tuples) {
RecordView<Tuple> view = table.recordView();
@@ -208,10 +196,7 @@ public class AbstractBasicIntegrationTest {
batch.clear();
}
}
-
- /**
- *
- */
+
protected static List<List<?>> sql(String sql, Object... args) {
return getAllFromCursor(
((IgniteImpl) CLUSTER_NODES.get(0)).queryEngine().query("PUBLIC", sql, args).get(0)
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItAggregatesTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItAggregatesTest.java
index ca66c26..090852c 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItAggregatesTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItAggregatesTest.java
@@ -28,21 +28,18 @@ import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
- *
+ * Group of tests to verify aggregation functions.
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItAggregatesTest extends AbstractBasicIntegrationTest {
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
createAndPopulateTable();
}
-
- /**
- *
- */
+
@Test
public void countOfNonNumericField() {
assertQuery("select count(name) from person").returns(4L).check();
@@ -115,10 +112,7 @@ public class ItAggregatesTest extends AbstractBasicIntegrationTest {
.returns(12d)
.check();
}
-
- /**
- *
- */
+
@Test
public void testMultipleRowsFromSingleAggr() {
assertThrows(
@@ -139,10 +133,7 @@ public class ItAggregatesTest extends AbstractBasicIntegrationTest {
assertQuery("SELECT t.id, (SELECT x FROM TABLE(system_range(t.id, t.id))) FROM person t").check();
}
-
- /**
- *
- */
+
@Disabled("https://issues.apache.org/jira/browse/IGNITE-14597")
@Test
public void testAnyValAggr() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItDataTypesTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItDataTypesTest.java
index c051f6b..f76b55d 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItDataTypesTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItDataTypesTest.java
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15107")
public class ItDataTypesTest extends AbstractBasicIntegrationTest {
/**
- *
+ * Before all.
*/
@Test
public void testUnicodeStrings() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItFunctionsTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItFunctionsTest.java
index 18cb49f..c4187d2 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItFunctionsTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItFunctionsTest.java
@@ -42,18 +42,12 @@ import org.junit.jupiter.api.Test;
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItFunctionsTest extends AbstractBasicIntegrationTest {
- /**
- *
- */
@Test
public void testLength() {
assertQuery("SELECT LENGTH('TEST')").returns(4).check();
assertQuery("SELECT LENGTH(NULL)").returns(new Object[]{null}).check();
}
-
- /**
- *
- */
+
@Test
public void testCurrentDateTimeTimeStamp() {
checkDateTimeQuery("SELECT CURRENT_DATE", Date::new);
@@ -65,10 +59,7 @@ public class ItFunctionsTest extends AbstractBasicIntegrationTest {
checkDateTimeQuery("SELECT {fn CURTIME()}", Time::new);
checkDateTimeQuery("SELECT {fn NOW()}", Timestamp::new);
}
-
- /**
- *
- */
+
private static <T> void checkDateTimeQuery(String sql, LongFunction<T> func) {
while (true) {
long tsBeg = System.currentTimeMillis();
@@ -96,10 +87,7 @@ public class ItFunctionsTest extends AbstractBasicIntegrationTest {
return;
}
}
-
- /**
- *
- */
+
@Test
public void testRange() {
assertQuery("SELECT * FROM table(system_range(1, 4))")
@@ -144,10 +132,7 @@ public class ItFunctionsTest extends AbstractBasicIntegrationTest {
assertEquals("Increment can't be 0", ex.getCause().getMessage());
}
-
- /**
- *
- */
+
@Test
public void testRangeWithCache() {
TableDefinition tblDef = SchemaBuilders.tableBuilder("PUBLIC", "TEST")
@@ -213,10 +198,7 @@ public class ItFunctionsTest extends AbstractBasicIntegrationTest {
CLUSTER_NODES.get(0).tables().dropTable(tblName);
}
}
-
- /**
- *
- */
+
@Test
public void testPercentRemainder() {
assertQuery("SELECT 3 % 2").returns(1).check();
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItIndexSpoolTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItIndexSpoolTest.java
index c0bce9d..ca8ee01 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItIndexSpoolTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItIndexSpoolTest.java
@@ -42,13 +42,10 @@ import org.junit.jupiter.params.provider.ValueSource;
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItIndexSpoolTest extends AbstractBasicIntegrationTest {
- /**
- *
- */
private static final IgniteLogger LOG = IgniteLogger.forClass(AbstractBasicIntegrationTest.class);
/**
- *
+ * After each.
*/
@AfterEach
protected void cleanUp() {
@@ -66,7 +63,7 @@ public class ItIndexSpoolTest extends AbstractBasicIntegrationTest {
}
/**
- *
+ * Test.
*/
@ParameterizedTest(name = "tableSize=" + ARGUMENTS_PLACEHOLDER)
@ValueSource(ints = {1, 10, 512, 513, 2000})
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMetadataTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMetadataTest.java
index e4d1e81..6233d7a 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMetadataTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMetadataTest.java
@@ -30,21 +30,18 @@ import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
- *
+ * Group of tests to verify the query metadata returned alongside the query result.
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItMetadataTest extends AbstractBasicIntegrationTest {
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
createAndPopulateTable();
}
-
- /**
- *
- */
+
@Test
public void trimColumnNames() {
String var300 = generate(() -> "X").limit(300).collect(joining());
@@ -52,10 +49,7 @@ public class ItMetadataTest extends AbstractBasicIntegrationTest {
assertQuery("select '" + var300 + "' from person").columnNames(var256).check();
}
-
- /**
- *
- */
+
@Test
public void columnNames() {
assertQuery("select (select count(*) from person), (select avg(salary) from person) from person")
@@ -83,10 +77,7 @@ public class ItMetadataTest extends AbstractBasicIntegrationTest {
assertQuery("select 1, -1, 'some string' from person").columnNames("1", "-1", "'some string'").check();
}
-
- /**
- *
- */
+
@Test
public void infixTypeCast() {
assertQuery("select id, id::tinyint as tid, id::smallint as sid, id::varchar as vid from person")
@@ -94,10 +85,7 @@ public class ItMetadataTest extends AbstractBasicIntegrationTest {
.columnTypes(Integer.class, Byte.class, Short.class, String.class)
.check();
}
-
- /**
- *
- */
+
@Test
public void columnOrder() {
TableDefinition schTbl1 = SchemaBuilders.tableBuilder("PUBLIC", "COLUMN_ORDER").columns(
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMixedQueriesTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMixedQueriesTest.java
index 8e4e52e..65c5037 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMixedQueriesTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItMixedQueriesTest.java
@@ -33,12 +33,12 @@ import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
- *
+ * Group of tests that still has not been sorted out. It’s better to avoid extending this class with new tests.
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
@@ -105,10 +105,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(1, rows.size());
assertEquals(Arrays.asList("щщ", "Б"), first(rows));
}
-
- /**
- *
- */
+
@Test
public void testOrderingByColumnOutsideSelectList() {
assertQuery("select salary from emp2 order by id desc")
@@ -125,10 +122,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
.returns("Igor1", 26d)
.check();
}
-
- /**
- *
- */
+
@Test
public void testEqConditionWithDistinctSubquery() {
List<List<?>> rows = sql(
@@ -136,10 +130,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(3, rows.size());
}
-
- /**
- *
- */
+
@Test
public void testEqConditionWithAggregateSubqueryMax() {
List<List<?>> rows = sql(
@@ -147,10 +138,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(3, rows.size());
}
-
- /**
- *
- */
+
@Test
public void testEqConditionWithAggregateSubqueryMin() {
List<List<?>> rows = sql(
@@ -158,10 +146,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(1, rows.size());
}
-
- /**
- *
- */
+
@Test
public void testInConditionWithSubquery() {
List<List<?>> rows = sql(
@@ -169,10 +154,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(4, rows.size());
}
-
- /**
- *
- */
+
@Test
public void testDistinctQueryWithInConditionWithSubquery() {
List<List<?>> rows = sql("SELECT distinct(name) FROM emp1 o WHERE name IN ("
@@ -181,10 +163,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(2, rows.size());
}
-
- /**
- *
- */
+
@Test
public void testNotInConditionWithSubquery() {
List<List<?>> rows = sql(
@@ -192,10 +171,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(3, rows.size());
}
-
- /**
- *
- */
+
@Test
public void testExistsConditionWithSubquery() {
List<List<?>> rows = sql("SELECT name FROM emp1 o WHERE EXISTS ("
@@ -205,10 +181,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(4, rows.size());
}
-
- /**
- *
- */
+
@Test
public void testNotExistsConditionWithSubquery() {
List<List<?>> rows = sql("SELECT name FROM emp1 o WHERE NOT EXISTS ("
@@ -232,10 +205,7 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest {
assertEquals(1, rows.size());
}
-
- /**
- *
- */
+
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15107")
@Test
public void testSequentialInserts() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItOrToUnionRuleTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItOrToUnionRuleTest.java
index 55e2e8f..6662185 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItOrToUnionRuleTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItOrToUnionRuleTest.java
@@ -43,28 +43,16 @@ import org.junit.jupiter.api.Test;
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-14925")
public class ItOrToUnionRuleTest extends AbstractBasicIntegrationTest {
- /**
- *
- */
public static final String IDX_SUBCAT_ID = "IDX_SUBCAT_ID";
-
- /**
- *
- */
+
public static final String IDX_SUBCATEGORY = "IDX_SUBCATEGORY";
-
- /**
- *
- */
+
public static final String IDX_CATEGORY = "IDX_CATEGORY";
-
- /**
- *
- */
+
public static final String IDX_CAT_ID = "IDX_CAT_ID";
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItProjectScanMergeRuleTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItProjectScanMergeRuleTest.java
index 3afb52e..7d9efac 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItProjectScanMergeRuleTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItProjectScanMergeRuleTest.java
@@ -41,13 +41,10 @@ import org.junit.jupiter.api.Test;
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItProjectScanMergeRuleTest extends AbstractBasicIntegrationTest {
- /**
- *
- */
public static final String IDX_CAT_ID = "IDX_CAT_ID";
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSecondaryIndexTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSecondaryIndexTest.java
index f2678bd..d28353d 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSecondaryIndexTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSecondaryIndexTest.java
@@ -40,28 +40,16 @@ import org.junit.jupiter.api.Test;
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-14925")
public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
- /**
- *
- */
private static final String PK_IDX = "PK_IDX";
-
- /**
- *
- */
+
private static final String DEPID_IDX = "DEPID_IDX";
-
- /**
- *
- */
+
private static final String NAME_CITY_IDX = "NAME_CITY_IDX";
-
- /**
- *
- */
+
private static final String NAME_DEPID_CITY_IDX = "NAME_DEPID_CITY_IDX";
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
@@ -158,10 +146,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
{"Ivan5", 25L, 2L, 4L},
});
}
-
- /**
- *
- */
+
@Test
public void testEqualsFilterWithUnwrpKey() {
assertQuery("SELECT F1 FROM UNWRAP_PK WHERE F2=2")
@@ -169,10 +154,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns("Ivan")
.check();
}
-
- /**
- *
- */
+
@Test
public void testIndexLoopJoin() {
assertQuery("SELECT /*+ DISABLE_RULE('MergeJoinConverter', 'NestedLoopJoinConverter') */ d1.name, d2.name "
@@ -205,10 +187,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
}
// ===== No filter =====
-
- /**
- *
- */
+
@Test
public void testNoFilter() {
assertQuery("SELECT * FROM Developer")
@@ -240,10 +219,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
}
// ===== id filter =====
-
- /**
- *
- */
+
@Test
public void testKeyEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE id=2")
@@ -251,10 +227,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(2, "Beethoven", 2, "Vienna", 44)
.check();
}
-
- /**
- *
- */
+
@Test
public void testKeyGreaterThanFilter() {
assertQuery("SELECT * FROM Developer WHERE id>? and id<?")
@@ -270,10 +243,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(11, "Glinka", 10, "Smolenskaya gb", 53)
.check();
}
-
- /**
- *
- */
+
@Test
public void testKeyGreaterThanOrEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE id>=3 and id<12")
@@ -289,10 +259,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(11, "Glinka", 10, "Smolenskaya gb", 53)
.check();
}
-
- /**
- *
- */
+
@Test
public void testKeyLessThanFilter() {
assertQuery("SELECT * FROM Developer WHERE id<3")
@@ -301,10 +268,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(2, "Beethoven", 2, "Vienna", 44)
.check();
}
-
- /**
- *
- */
+
@Test
public void testKeyLessThanOrEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE id<=2")
@@ -315,10 +279,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
}
// ===== indexed field filter =====
-
- /**
- *
- */
+
@Test
public void testIndexedFieldEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE depId=2")
@@ -327,10 +288,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(4, "Strauss", 2, "Munich", 66)
.check();
}
-
- /**
- *
- */
+
@Test
public void testIndexedFieldGreaterThanFilter() {
assertQuery("SELECT * FROM Developer WHERE depId>21")
@@ -339,10 +297,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(23, "Musorgskii", 22, "", -1)
.check();
}
-
- /**
- *
- */
+
@Test
public void testIndexedFieldGreaterThanOrEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE depId>=21")
@@ -351,10 +306,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(23, "Musorgskii", 22, "", -1)
.check();
}
-
- /**
- *
- */
+
@Test
public void testIndexedFieldLessThanFilter() {
assertQuery("SELECT * FROM Developer WHERE depId<?")
@@ -365,10 +317,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(4, "Strauss", 2, "Munich", 66)
.check();
}
-
- /**
- *
- */
+
@Test
public void testIndexedFieldLessThanOrEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE depId<=?")
@@ -381,10 +330,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
}
// ===== non-indexed field filter =====
-
- /**
- *
- */
+
@Test
public void testNonIndexedFieldEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE age=?")
@@ -393,10 +339,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(2, "Beethoven", 2, "Vienna", 44)
.check();
}
-
- /**
- *
- */
+
@Test
public void testNonIndexedFieldGreaterThanFilter() {
assertQuery("SELECT * FROM Developer WHERE age>?")
@@ -412,10 +355,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(11, "Glinka", 10, "Smolenskaya gb", 53)
.check();
}
-
- /**
- *
- */
+
@Test
public void testNonIndexedFieldGreaterThanOrEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE age>=?")
@@ -432,10 +372,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(11, "Glinka", 10, "Smolenskaya gb", 53)
.check();
}
-
- /**
- *
- */
+
@Test
public void testNonIndexedFieldLessThanFilter() {
assertQuery("SELECT * FROM Developer WHERE age<?")
@@ -461,10 +398,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(23, "Musorgskii", 22, "", -1)
.check();
}
-
- /**
- *
- */
+
@Test
public void testNonIndexedFieldLessThanOrEqualsFilter() {
assertQuery("SELECT * FROM Developer WHERE age<=?")
@@ -492,10 +426,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
}
// ===== various complex conditions =====
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition1() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND depId=3")
@@ -503,10 +434,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition2() {
assertQuery("SELECT * FROM Developer WHERE depId=? AND name=?")
@@ -515,10 +443,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition3() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND depId=3 AND city='Vienna'")
@@ -526,20 +451,14 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition4() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND depId=3 AND city='Leipzig'")
.matches(containsIndexScan("PUBLIC", "DEVELOPER", NAME_DEPID_CITY_IDX))
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition5() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND city='Vienna'")
@@ -547,10 +466,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition6() {
assertQuery("SELECT * FROM Developer WHERE name>='Mozart' AND depId=3")
@@ -558,10 +474,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition7() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND depId>=2")
@@ -569,10 +482,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition8() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND depId>=2 AND age>20")
@@ -580,10 +490,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition9() {
assertQuery("SELECT * FROM Developer WHERE name>='Mozart' AND depId>=2 AND city>='Vienna'")
@@ -592,10 +499,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(10, "Shubert", 9, "Vienna", 31)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition10() {
assertQuery("SELECT * FROM Developer WHERE name>='Mozart' AND city>='Vienna'")
@@ -604,10 +508,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(10, "Shubert", 9, "Vienna", 31)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition11() {
assertQuery("SELECT * FROM Developer WHERE name>='Mozart' AND depId=3 AND city>='Vienna'")
@@ -615,10 +516,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition12() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND depId=3 AND city='Vienna'")
@@ -626,10 +524,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition13() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' AND depId>=3 AND city='Vienna'")
@@ -637,10 +532,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition14() {
assertQuery("SELECT * FROM Developer WHERE name>='Mozart' AND depId=3 AND city>='Vienna'")
@@ -648,10 +540,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition15() {
assertQuery("SELECT * FROM Developer WHERE age=33 AND city='Vienna'")
@@ -659,10 +548,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testComplexIndexCondition16() {
assertQuery("SELECT * FROM Developer WHERE age=33 AND (city='Vienna' AND depId=3)")
@@ -670,20 +556,14 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testEmptyResult() {
assertQuery("SELECT * FROM Developer WHERE age=33 AND city='Leipzig'")
.matches(containsTableScan("PUBLIC", "DEVELOPER"))
.check();
}
-
- /**
- *
- */
+
@Test
public void testOrCondition1() {
assertQuery("SELECT * FROM Developer WHERE name='Mozart' OR age=55")
@@ -697,10 +577,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(3, "Bach", 1, "Leipzig", 55)
.check();
}
-
- /**
- *
- */
+
@Test
@Disabled("https://issues.apache.org/jira/browse/IGNITE-13710")
public void testOrCondition2() {
@@ -710,10 +587,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
@Disabled("https://issues.apache.org/jira/browse/IGNITE-13710")
public void testOrCondition3() {
@@ -723,10 +597,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(1, "Mozart", 3, "Vienna", 33)
.check();
}
-
- /**
- *
- */
+
@Test
public void testOrCondition4() {
assertQuery("SELECT * FROM Developer WHERE depId=1 OR (name='Mozart' AND depId=3)")
@@ -736,10 +607,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.returns(3, "Bach", 1, "Leipzig", 55)
.check();
}
-
- /**
- *
- */
+
@Test
public void testOrCondition5() {
assertQuery("SELECT * FROM Developer WHERE depId=1 OR name='Mozart'")
@@ -749,10 +617,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
}
// ===== various complex conditions =====
-
- /**
- *
- */
+
@Test
public void testOrderByKey() {
assertQuery("SELECT * FROM Developer WHERE id<=4 ORDER BY id")
@@ -765,10 +630,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.ordered()
.check();
}
-
- /**
- *
- */
+
@Test
public void testOrderByDepId() {
assertQuery("SELECT * FROM Developer ORDER BY depId")
@@ -802,10 +664,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.ordered()
.check();
}
-
- /**
- *
- */
+
@Test
public void testOrderByNameCityAsc() {
assertQuery("SELECT * FROM Developer ORDER BY name, city")
@@ -838,10 +697,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.ordered()
.check();
}
-
- /**
- *
- */
+
@Test
public void testOrderByNameCityDesc() {
assertQuery("SELECT ID, NAME, DEPID, CITY, AGE FROM Developer ORDER BY name DESC, city DESC")
@@ -873,10 +729,7 @@ public class ItSecondaryIndexTest extends AbstractBasicIntegrationTest {
.ordered()
.check();
}
-
- /**
- *
- */
+
@Test
public void testOrderByNoIndexedColumn() {
assertQuery("SELECT * FROM Developer ORDER BY age DESC")
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSetOpTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSetOpTest.java
index f1a8791..f412be1 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSetOpTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSetOpTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItSetOpTest extends AbstractBasicIntegrationTest {
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
@@ -68,9 +68,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
});
}
- /**
- *
- */
@Test
public void testExcept() {
List<List<?>> rows = sql("SELECT name FROM emp1 EXCEPT SELECT name FROM emp2");
@@ -79,9 +76,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals("Igor", rows.get(0).get(0));
}
- /**
- *
- */
@Test
public void testExceptFromEmpty() {
List<List<?>> rows = sql("SELECT name FROM emp1 WHERE salary < 0 EXCEPT SELECT name FROM emp2");
@@ -89,9 +83,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(0, rows.size());
}
- /**
- *
- */
@Test
public void testExceptSeveralColumns() {
List<List<?>> rows = sql("SELECT name, salary FROM emp1 EXCEPT SELECT name, salary FROM emp2");
@@ -101,9 +92,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(1, countIf(rows, r -> r.get(0).equals("Roman")));
}
- /**
- *
- */
@Test
public void testExceptAll() {
List<List<?>> rows = sql("SELECT name FROM emp1 EXCEPT ALL SELECT name FROM emp2");
@@ -113,9 +101,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(1, countIf(rows, r -> r.get(0).equals("Igor1")));
}
- /**
- *
- */
@Test
public void testExceptNested() {
List<List<?>> rows =
@@ -126,9 +111,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(1, countIf(rows, r -> r.get(0).equals("Igor1")));
}
- /**
- *
- */
@Test
@Disabled
public void testSetOpBigBatch() {
@@ -205,9 +187,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(128, countIf(rows, r -> r.get(0).equals(3)));
}
- /**
- *
- */
@Test
public void testIntersect() {
List<List<?>> rows = sql("SELECT name FROM emp1 INTERSECT SELECT name FROM emp2");
@@ -217,9 +196,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(1, countIf(rows, r -> r.get(0).equals("Roman")));
}
- /**
- *
- */
@Test
public void testIntersectAll() {
List<List<?>> rows = sql("SELECT name FROM emp1 INTERSECT ALL SELECT name FROM emp2");
@@ -229,9 +205,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(1, countIf(rows, r -> r.get(0).equals("Roman")));
}
- /**
- *
- */
@Test
public void testIntersectEmpty() {
List<List<?>> rows = sql("SELECT name FROM emp1 WHERE salary < 0 INTERSECT SELECT name FROM emp2");
@@ -239,9 +212,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(0, rows.size());
}
- /**
- *
- */
@Test
public void testIntersectSeveralColumns() {
List<List<?>> rows = sql("SELECT name, salary FROM emp1 INTERSECT ALL SELECT name, salary FROM emp2");
@@ -250,9 +220,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(2, countIf(rows, r -> r.get(0).equals("Igor1")));
}
- /**
- *
- */
@Test
public void testUnionAll() {
List<List<?>> rows = sql("SELECT name, salary FROM emp1 "
@@ -264,9 +231,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(14, rows.size());
}
- /**
- *
- */
@Test
public void testUnion() {
List<List<?>> rows = sql("SELECT name, salary FROM emp1 "
@@ -278,9 +242,6 @@ public class ItSetOpTest extends AbstractBasicIntegrationTest {
assertEquals(9, rows.size());
}
- /**
- *
- */
@Test
public void testUnionWithDistinct() {
List<List<?>> rows = sql(
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSortAggregateTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSortAggregateTest.java
index 24dbce9..a1dfb04 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSortAggregateTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/ItSortAggregateTest.java
@@ -36,13 +36,10 @@ import org.junit.jupiter.api.Test;
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-15655")
public class ItSortAggregateTest extends AbstractBasicIntegrationTest {
- /**
- *
- */
public static final int ROWS = 103;
/**
- *
+ * Before all.
*/
@BeforeAll
static void initTestData() {
@@ -82,9 +79,6 @@ public class ItSortAggregateTest extends AbstractBasicIntegrationTest {
}
}
- /**
- *
- */
@Test
public void mapReduceAggregate() {
List<List<?>> res = sql(
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/util/QueryChecker.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/util/QueryChecker.java
index a236a52..dde1bb1 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/util/QueryChecker.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/util/QueryChecker.java
@@ -159,9 +159,12 @@ public abstract class QueryChecker {
public static Matcher<String> containsSubPlan(String subPlan) {
return CoreMatchers.containsString(subPlan);
}
-
+
/**
+ * Sub string matcher.
*
+ * @param substring Substring.
+ * @return Matcher.
*/
public static Matcher<String> matches(final String substring) {
return new SubstringMatcher("contains", false, substring) {
@@ -176,7 +179,7 @@ public abstract class QueryChecker {
}
/**
- *
+ * Adds plan matchers.
*/
public QueryChecker matches(Matcher<String>... planMatcher) {
Collections.addAll(planMatchers, planMatcher);
@@ -226,74 +229,58 @@ public abstract class QueryChecker {
Arrays.stream(idxNames).map(idx -> containsIndexScan(schema, tblName, idx)).collect(Collectors.toList())
);
}
-
- /**
- *
- */
+
private final String qry;
-
- /**
- *
- */
+
private final ArrayList<Matcher<String>> planMatchers = new ArrayList<>();
-
- /**
- *
- */
+
private List<List<?>> expectedResult;
-
- /**
- *
- */
+
private List<String> expectedColumnNames;
-
- /**
- *
- */
+
private List<Type> expectedColumnTypes;
-
- /**
- *
- */
+
private boolean ordered;
-
- /**
- *
- */
+
private Object[] params = OBJECT_EMPTY_ARRAY;
-
- /**
- *
- */
+
private String exactPlan;
-
+
/**
+ * Constructor.
*
+ * @param qry Query.
*/
public QueryChecker(String qry) {
this.qry = qry;
}
/**
+ * Sets ordered.
*
+ * @return This.
*/
public QueryChecker ordered() {
ordered = true;
return this;
}
-
+
/**
+ * Sets params.
*
+ * @return This.
*/
public QueryChecker withParams(Object... params) {
this.params = params;
return this;
}
-
+
/**
+ * Sets returns.
*
+ * @return This.
*/
public QueryChecker returns(Object... res) {
if (expectedResult == null) {
@@ -304,34 +291,38 @@ public abstract class QueryChecker {
return this;
}
-
- /**
- *
- */
+
+ /** Creates a matcher that matches if the examined string contains the specified string anywhere. */
public static Matcher<String> containsUnion(boolean all) {
return CoreMatchers.containsString("IgniteUnionAll(all=[" + all + "])");
}
-
+
/**
+ * Sets columns names.
*
+ * @return This.
*/
public QueryChecker columnNames(String... columns) {
expectedColumnNames = Arrays.asList(columns);
return this;
}
-
+
/**
+ * Sets columns types.
*
+ * @return This.
*/
public QueryChecker columnTypes(Type... columns) {
expectedColumnTypes = Arrays.asList(columns);
return this;
}
-
+
/**
+ * Sets plan.
*
+ * @return This.
*/
public QueryChecker planEquals(String plan) {
exactPlan = plan;
@@ -340,7 +331,7 @@ public abstract class QueryChecker {
}
/**
- *
+ * Run checks.
*/
public void check() {
// Check plan.
@@ -398,10 +389,7 @@ public abstract class QueryChecker {
assertEqualsCollections(expectedResult, res);
}
}
-
- /**
- *
- */
+
protected abstract QueryProcessor getEngine();
/**
@@ -442,12 +430,10 @@ public abstract class QueryChecker {
}
/**
- *
+ * List comparator.
*/
private class ListComparator implements Comparator<List<?>> {
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public int compare(List<?> o1, List<?> o2) {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/ItDistributedConfigurationPropertiesTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/ItDistributedConfigurationPropertiesTest.java
index fd995b3..4de678a 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/ItDistributedConfigurationPropertiesTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/ItDistributedConfigurationPropertiesTest.java
@@ -74,9 +74,6 @@ public class ItDistributedConfigurationPropertiesTest {
/** Test distributed configuration schema. */
@ConfigurationRoot(rootName = "root", type = ConfigurationType.DISTRIBUTED)
public static class DistributedConfigurationSchema {
- /**
- *
- */
@Value(hasDefault = true)
@DirectAccess
public String str = "foo";
@@ -86,39 +83,18 @@ public class ItDistributedConfigurationPropertiesTest {
* An emulation of an Ignite node, that only contains components necessary for tests.
*/
private static class Node {
- /**
- *
- */
private final List<String> metaStorageNodes;
-
- /**
- *
- */
+
private final VaultManager vaultManager;
-
- /**
- *
- */
+
private final ClusterService clusterService;
-
- /**
- *
- */
+
private final Loza raftManager;
-
- /**
- *
- */
+
private final ConfigurationManager cfgManager;
-
- /**
- *
- */
+
private final MetaStorageManager metaStorageManager;
-
- /**
- *
- */
+
private final ConfigurationManager distributedCfgManager;
/** Flag that disables storage updates. */
@@ -240,19 +216,13 @@ public class ItDistributedConfigurationPropertiesTest {
receivesUpdates = false;
}
}
-
- /**
- *
- */
+
private Node firstNode;
-
- /**
- *
- */
+
private Node secondNode;
/**
- *
+ * Before each.
*/
@BeforeEach
void setUp(@WorkDirectory Path workDir, TestInfo testInfo) throws Exception {
@@ -283,7 +253,7 @@ public class ItDistributedConfigurationPropertiesTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/storage/ItDistributedConfigurationStorageTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/storage/ItDistributedConfigurationStorageTest.java
index 5052f2a..eb4f942 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/storage/ItDistributedConfigurationStorageTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/configuration/storage/ItDistributedConfigurationStorageTest.java
@@ -61,39 +61,18 @@ public class ItDistributedConfigurationStorageTest {
* An emulation of an Ignite node, that only contains components necessary for tests.
*/
private static class Node {
- /**
- *
- */
private final String name;
-
- /**
- *
- */
+
private final VaultManager vaultManager;
-
- /**
- *
- */
+
private final ClusterService clusterService;
-
- /**
- *
- */
+
private final Loza raftManager;
-
- /**
- *
- */
+
private final ConfigurationManager cfgManager;
-
- /**
- *
- */
+
private final MetaStorageManager metaStorageManager;
-
- /**
- *
- */
+
private final DistributedConfigurationStorage cfgStorage;
/**
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/AbstractSchemaChangeTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/AbstractSchemaChangeTest.java
index 6f9b425..ff6ec7d 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/AbstractSchemaChangeTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/AbstractSchemaChangeTest.java
@@ -68,12 +68,12 @@ abstract class AbstractSchemaChangeTest {
/** Cluster nodes. */
private final List<Ignite> clusterNodes = new ArrayList<>();
- /** Work directory */
+ /** Work directory. */
@WorkDirectory
private Path workDir;
/**
- *
+ * Before each.
*/
@BeforeEach
void setUp(TestInfo testInfo) {
@@ -122,7 +122,7 @@ abstract class AbstractSchemaChangeTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void afterEach() throws Exception {
@@ -174,7 +174,7 @@ abstract class AbstractSchemaChangeTest {
}
/**
- * @return Grid nodes.
+ * Returns grid nodes.
*/
@NotNull
protected List<Ignite> startGrid() {
@@ -186,6 +186,8 @@ abstract class AbstractSchemaChangeTest {
}
/**
+ * Creates tables.
+ *
* @param nodes Cluster nodes.
*/
protected void createTable(List<Ignite> nodes) {
@@ -206,6 +208,8 @@ abstract class AbstractSchemaChangeTest {
}
/**
+ * Adds column.
+ *
* @param nodes Cluster nodes.
* @param columnToAdd Column to add.
*/
@@ -220,6 +224,8 @@ abstract class AbstractSchemaChangeTest {
}
/**
+ * Drops column.
+ *
* @param nodes Cluster nodes.
* @param colName Name of column to drop.
*/
@@ -238,6 +244,8 @@ abstract class AbstractSchemaChangeTest {
}
/**
+ * Renames column.
+ *
* @param nodes Cluster nodes.
* @param oldName Old column name.
* @param newName New column name.
@@ -260,6 +268,8 @@ abstract class AbstractSchemaChangeTest {
}
/**
+ * Changes column default.
+ *
* @param nodes Cluster nodes.
* @param colName Column name.
* @param defSup Default value supplier.
@@ -303,12 +313,8 @@ abstract class AbstractSchemaChangeTest {
);
});
}
-
- /**
- * @param expectedType Expected cause type.
- * @param executable Executable that throws exception.
- */
- public <T extends Throwable> void assertThrowsWithCause(Class<T> expectedType, Executable executable) {
+
+ protected <T extends Throwable> void assertThrowsWithCause(Class<T> expectedType, Executable executable) {
Throwable ex = assertThrows(IgniteException.class, executable);
while (ex.getCause() != null) {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItBaselineChangesTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItBaselineChangesTest.java
index 1e7b26b..e7a21eb 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItBaselineChangesTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItBaselineChangesTest.java
@@ -46,7 +46,7 @@ import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.extension.ExtendWith;
/**
- * Test for baseline changes
+ * Test for baseline changes.
*/
@ExtendWith(WorkDirectoryExtension.class)
public class ItBaselineChangesTest {
@@ -56,19 +56,13 @@ public class ItBaselineChangesTest {
/** Nodes bootstrap configuration. */
private final Map<String, String> initClusterNodes = new LinkedHashMap<>();
- /**
- *
- */
private final List<Ignite> clusterNodes = new ArrayList<>();
- /**
- *
- */
@WorkDirectory
private Path workDir;
/**
- *
+ * Before each.
*/
@BeforeEach
void setUp(TestInfo testInfo) {
@@ -93,7 +87,7 @@ public class ItBaselineChangesTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
@@ -158,9 +152,6 @@ public class ItBaselineChangesTest {
assertEquals(1, (Long) tbl4.recordView().get(keyTuple1).value("key"));
}
- /**
- *
- */
private String buildConfig(String metastoreNodeName, int nodeIdx) {
return "{\n"
+ " node.metastorageNodes: [ \"" + metastoreNodeName + "\" ],\n"
@@ -173,9 +164,6 @@ public class ItBaselineChangesTest {
+ "}";
}
- /**
- *
- */
private int nodePort(int nodeIdx) {
return BASE_PORT + nodeIdx;
}
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItDynamicTableCreationTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItDynamicTableCreationTest.java
index 47c937a..ce3e59e 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItDynamicTableCreationTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItDynamicTableCreationTest.java
@@ -65,20 +65,14 @@ class ItDynamicTableCreationTest {
/** Nodes bootstrap configuration. */
private final Map<String, String> nodesBootstrapCfg = new LinkedHashMap<>();
-
- /**
- *
- */
+
private final List<Ignite> clusterNodes = new ArrayList<>();
-
- /**
- *
- */
+
@WorkDirectory
private Path workDir;
/**
- *
+ * Before each.
*/
@BeforeEach
void setUp(TestInfo testInfo) {
@@ -127,7 +121,7 @@ class ItDynamicTableCreationTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
@@ -135,7 +129,7 @@ class ItDynamicTableCreationTest {
}
/**
- * @return Grid nodes.
+ * Returns grid nodes.
*/
@NotNull
protected List<Ignite> startGrid() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgnitionTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgnitionTest.java
index c686a70..66695f7 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgnitionTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgnitionTest.java
@@ -52,19 +52,13 @@ class ItIgnitionTest {
/** Nodes bootstrap configuration. */
private final Map<String, String> nodesBootstrapCfg = new LinkedHashMap<>();
- /**
- *
- */
private final List<Ignite> startedNodes = new ArrayList<>();
- /**
- *
- */
@WorkDirectory
private Path workDir;
/**
- *
+ * Before each.
*/
@BeforeEach
void setUp(TestInfo testInfo) {
@@ -113,7 +107,7 @@ class ItIgnitionTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeKvViewTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeKvViewTest.java
index 717ae64..3016ed1 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeKvViewTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeKvViewTest.java
@@ -76,7 +76,7 @@ class ItLiveSchemaChangeKvViewTest extends AbstractSchemaChangeTest {
}
/**
- * Check strict schema works correctly after live schema
+ * Check strict schema works correctly after live schema.
*/
@Test
public void testLiveSchemaAddColumnsSwitchToStrict() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeTableTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeTableTest.java
index 208b83d..ff58be3 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeTableTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItLiveSchemaChangeTableTest.java
@@ -139,7 +139,7 @@ class ItLiveSchemaChangeTableTest extends AbstractSchemaChangeTest {
}
/**
- * Check strict schema works correctly after live schema
+ * Check strict schema works correctly after live schema.
*/
@Test
public void testLiveSchemaAddColumnsSwitchToStrict() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTableCreationTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTableCreationTest.java
index 6b92dce..784eca3 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTableCreationTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTableCreationTest.java
@@ -55,19 +55,13 @@ class ItTableCreationTest {
/** Nodes bootstrap configuration with preconfigured tables. */
private final LinkedHashMap<String, String> nodesBootstrapCfg = new LinkedHashMap<>();
- /**
- *
- */
private final List<Ignite> clusterNodes = new ArrayList<>();
- /**
- *
- */
@WorkDirectory
private Path workDir;
/**
- *
+ * Before each.
*/
@BeforeEach
void setUp(TestInfo testInfo) {
@@ -191,7 +185,7 @@ class ItTableCreationTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTablesApiTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTablesApiTest.java
index 9058a72..516d5e7 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTablesApiTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTablesApiTest.java
@@ -118,7 +118,7 @@ public class ItTablesApiTest extends IgniteAbstractTest {
private List<Ignite> clusterNodes;
/**
- * @throws Exception If failed.
+ * Before each.
*/
@BeforeEach
void beforeEach(TestInfo testInfo) throws Exception {
@@ -136,7 +136,7 @@ public class ItTablesApiTest extends IgniteAbstractTest {
}
/**
- * @throws Exception If failed.
+ * After each.
*/
@AfterEach
void afterEach() throws Exception {
@@ -264,7 +264,7 @@ public class ItTablesApiTest extends IgniteAbstractTest {
/** Inhibit flag. */
private boolean inhibit = false;
- /** Wrapped listener */
+ /** Wrapped listener. */
private WatchListener realListener;
/**
@@ -314,6 +314,8 @@ public class ItTablesApiTest extends IgniteAbstractTest {
}
/**
+ * Creates table.
+ *
* @param node Cluster node.
* @param schemaName Schema name.
* @param shortTableName Table name.
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItThinClientConnectionTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItThinClientConnectionTest.java
index f3f597a..7b677f1 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItThinClientConnectionTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItThinClientConnectionTest.java
@@ -52,26 +52,17 @@ import org.junit.jupiter.api.extension.ExtendWith;
*/
@ExtendWith(WorkDirectoryExtension.class)
public class ItThinClientConnectionTest extends IgniteAbstractTest {
- /**
- *
- */
private static final String SCHEMA_NAME = "PUB";
- /**
- *
- */
private static final String TABLE_NAME = "tbl1";
/** Nodes bootstrap configuration. */
private final Map<String, String> nodesBootstrapCfg = new LinkedHashMap<>();
- /**
- *
- */
private final List<Ignite> startedNodes = new ArrayList<>();
/**
- *
+ * Before each.
*/
@BeforeEach
void setup(TestInfo testInfo) {
@@ -106,7 +97,7 @@ public class ItThinClientConnectionTest extends IgniteAbstractTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/PlatformTestNodeRunner.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/PlatformTestNodeRunner.java
index 2ff8080..99ddbe9 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/PlatformTestNodeRunner.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/PlatformTestNodeRunner.java
@@ -41,14 +41,8 @@ public class PlatformTestNodeRunner {
/** Test node name. */
private static final String NODE_NAME = PlatformTestNodeRunner.class.getCanonicalName();
- /**
- *
- */
private static final String SCHEMA_NAME = "PUB";
- /**
- *
- */
private static final String TABLE_NAME = "tbl1";
/** Time to keep the node alive. */
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/AbstractJdbcSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/AbstractJdbcSelfTest.java
index 6571ad2..cdb3e40 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/AbstractJdbcSelfTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/AbstractJdbcSelfTest.java
@@ -33,6 +33,9 @@ import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.function.Executable;
import org.junit.jupiter.api.io.TempDir;
+/**
+ * Abstract jdbc self test.
+ */
public class AbstractJdbcSelfTest {
/** URL. */
protected static final String URL = "jdbc:ignite:thin://127.0.1.1:10800";
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionPropertiesTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionPropertiesTest.java
index 43ba9bc..bb88861 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionPropertiesTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionPropertiesTest.java
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
public class ItJdbcConnectionPropertiesTest {
/**
* Test check the {@link ConnectionPropertiesImpl#getDriverPropertyInfo()} return properties with prefix {@link
- * ConnectionPropertiesImpl#PROP_PREFIX}
+ * ConnectionPropertiesImpl#PROP_PREFIX}.
*/
@Test
public void testNamePrefixDriverPropertyInfo() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java
index 76601be..4c2357f 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java
@@ -64,7 +64,7 @@ import org.junit.jupiter.api.Test;
@SuppressWarnings("ThrowableNotThrown")
public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
/**
- * Test JDBC loading via ServiceLoader
+ * Test JDBC loading via ServiceLoader.
*/
@Test
public void testServiceLoader() {
@@ -82,9 +82,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
assertNotNull(igniteJdbcDriver);
}
- /**
- * @throws Exception If failed.
- */
@SuppressWarnings({"EmptyTryBlock", "unused"})
@Test
public void testDefaults() throws Exception {
@@ -99,9 +96,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@SuppressWarnings({"EmptyTryBlock", "unused"})
@Test
@Disabled("ITDS-1887")
@@ -195,9 +189,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
assertThrows(SQLException.class, () -> DriverManager.getConnection(url), errMsg);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testClose() throws Exception {
final Connection conn;
@@ -216,9 +207,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
assertThrows(SQLException.class, () -> conn.isValid(-2), "Invalid timeout");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCreateStatement() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -236,7 +224,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -278,7 +266,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -325,9 +313,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testPrepareStatement() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -351,7 +336,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -400,7 +385,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -454,9 +439,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testPrepareStatementAutoGeneratedKeysUnsupported() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -488,9 +470,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testPrepareCallUnsupported() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -516,9 +495,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testNativeSql() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -563,9 +539,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCommit() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -592,9 +565,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testRollback() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -665,7 +635,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -684,9 +654,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetReadOnly() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -701,7 +668,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -727,9 +694,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetTransactionIsolation() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -762,9 +726,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testClearGetWarnings() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -788,9 +749,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetTypeMap() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -825,7 +783,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -867,7 +825,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -891,7 +849,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -924,7 +882,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -957,7 +915,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO IGNITE-15188
+ * TODO IGNITE-15188.
*
* @throws Exception If failed.
*/
@@ -984,9 +942,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCreateClob() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1007,9 +962,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCreateBlob() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1030,9 +982,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCreateNclob() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1053,9 +1002,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCreateSqlXml() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1076,9 +1022,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetClientInfoPair() throws Exception {
// fail("https://issues.apache.org/jira/browse/IGNITE-5425");
@@ -1105,9 +1048,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetClientInfoProperties() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1137,9 +1077,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCreateArrayOf() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1164,9 +1101,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCreateStruct() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1189,9 +1123,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetSchema() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1215,9 +1146,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testAbort() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1236,9 +1164,6 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetNetworkTimeout() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -1269,7 +1194,7 @@ public class ItJdbcConnectionSelfTest extends AbstractJdbcSelfTest {
}
/**
- * @return Savepoint.
+ * Returns savepoint.
*/
private Savepoint getFakeSavepoint() {
return new Savepoint() {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcMetadataSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcMetadataSelfTest.java
index 1519c84..142933a 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcMetadataSelfTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcMetadataSelfTest.java
@@ -96,9 +96,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
tbl2.recordView().insert(Tuple.create().set("ID", 1).set("NAME", "AAA").set("BIGDATA", BigDecimal.valueOf(10)));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testResultSetMetaData() throws Exception {
Statement stmt = DriverManager.getConnection(URL).createStatement();
@@ -129,9 +126,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
assertEquals(meta.getColumnClassName(2), "java.lang.Integer");
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled
public void testDecimalAndDateTypeMetaData() throws Exception {
@@ -165,9 +159,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetTables() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -193,9 +184,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetColumns() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -292,9 +280,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testVersions() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -305,9 +290,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testSchemasMetadata() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -325,9 +307,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testEmptySchemasMetadata() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -337,9 +316,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testPrimaryKeyMetadata() throws Exception {
try (Connection conn = DriverManager.getConnection(URL);
@@ -357,9 +333,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetAllPrimaryKeys() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -382,9 +355,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testInvalidCatalog() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -412,9 +382,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetTableTypes() throws Exception {
try (Connection conn = DriverManager.getConnection(URL)) {
@@ -430,9 +397,6 @@ public class ItJdbcMetadataSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled
public void testParametersMetadata() throws Exception {
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcResultSetSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcResultSetSelfTest.java
index 0cf2f1e..14789c2 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcResultSetSelfTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcResultSetSelfTest.java
@@ -90,9 +90,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testBoolean() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -163,9 +160,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}, "Cannot convert to boolean: qwe");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testByte() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -203,9 +197,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertEquals(1, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testShort() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -244,9 +235,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertEquals(1, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testInteger() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -285,9 +273,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertEquals(1, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testLong() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -326,9 +311,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertEquals(1, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testFloat() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -367,9 +349,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertEquals(1, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testDouble() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -408,9 +387,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertEquals(1, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testBigDecimal() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -449,7 +425,7 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO: IGNITE-15163
+ * TODO: IGNITE-15163.
*
* @throws Exception If failed.
*/
@@ -463,6 +439,8 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
/**
+ * Converts {@link String} to {@link BigDecimal}.
+ *
* @param strDec String representation of a decimal value.
* @param scale Scale.
* @return BigDecimal object.
@@ -476,9 +454,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testString() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -518,7 +493,7 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO: IGNITE-15163
+ * TODO: IGNITE-15163.
*
* @throws Exception If failed.
*/
@@ -542,7 +517,7 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO: IGNITE-15163
+ * TODO: IGNITE-15163.
*
* @throws Exception If failed.
*/
@@ -573,7 +548,7 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO: IGNITE-15163
+ * TODO: IGNITE-15163.
*
* @throws Exception If failed.
*/
@@ -604,7 +579,7 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
}
/**
- * TODO: IGNITE-15163
+ * TODO: IGNITE-15163.
*
* @throws Exception If failed.
*/
@@ -708,9 +683,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertFalse(rs.isBeforeFirst());
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testFindColumn() throws Exception {
final ResultSet rs = stmt.executeQuery(SQL);
@@ -723,9 +695,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
assertThrows(SQLException.class, () -> rs.findColumn("wrong"), "Column not found: wrong");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testNotSupportedTypes() throws Exception {
final ResultSet rs = stmt.executeQuery(SQL);
@@ -777,9 +746,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
checkNotSupported(() -> rs.getSQLXML("id"));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testUpdateNotSupported() throws Exception {
final ResultSet rs = stmt.executeQuery(SQL);
@@ -953,9 +919,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
checkNotSupported(rs::moveToInsertRow);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testExceptionOnClosedResultSet() throws Exception {
final ResultSet rs = stmt.executeQuery(SQL);
@@ -1053,17 +1016,13 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
*/
@SuppressWarnings("PackageVisibleField")
private static class TestObjectField implements Serializable {
- /**
- *
- */
final int ai;
- /**
- *
- */
final String bi;
/**
+ * Constructor.
+ *
* @param ai A.
* @param bi B.
*/
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcStatementSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcStatementSelfTest.java
index 14a4cb8..794c619 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcStatementSelfTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcStatementSelfTest.java
@@ -85,9 +85,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertTrue(conn.isClosed());
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled("IGNITE-15108")
public void testExecuteQuery0() throws Exception {
@@ -118,9 +115,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertEquals(2, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testExecuteQuery1() throws Exception {
final String sqlText = "select 5;";
@@ -141,9 +135,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.executeQuery(sqlText));
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled("IGNITE-15108")
public void testExecute() throws Exception {
@@ -180,9 +171,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertFalse(stmt.getMoreResults(), "Statement has more results.");
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled("IGNITE-15108")
public void testMaxRows() throws Exception {
@@ -245,9 +233,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertEquals(2, cnt);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCloseResultSet0() throws Exception {
ResultSet rs0 = stmt.executeQuery(SQL);
@@ -264,9 +249,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertTrue(rs2.isClosed(), "ResultSet must be explicitly closed after close statement");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCloseResultSet1() throws Exception {
stmt.execute(SQL);
@@ -278,9 +260,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertTrue(rs.isClosed(), "ResultSet must be explicitly closed after close statement");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCloseResultSetByConnectionClose() throws Exception {
ResultSet rs = stmt.executeQuery(SQL);
@@ -291,9 +270,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertTrue(rs.isClosed(), "ResultSet must be implicitly closed after close connection");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCloseOnCompletionAfterQuery() throws Exception {
assertFalse(stmt.isCloseOnCompletion(), "Invalid default closeOnCompletion");
@@ -321,9 +297,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertTrue(stmt.isClosed(), "Statement must be closed");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCloseOnCompletionBeforeQuery() throws Exception {
assertFalse(stmt.isCloseOnCompletion(), "Invalid default closeOnCompletion");
@@ -351,9 +324,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertTrue(stmt.isClosed(), "Statement must be closed");
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testExecuteQueryMultipleOnlyResultSets() throws Exception {
// assertTrue(conn.getMetaData().supportsMultipleResultSets());
@@ -387,9 +357,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertFalse(stmt.getMoreResults());
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled("IGNITE-15108")
public void testExecuteQueryMultipleOnlyDml() throws Exception {
@@ -427,9 +394,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertFalse(stmt0.getMoreResults());
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled("IGNITE-15108")
public void testExecuteQueryMultipleMixed() throws Exception {
@@ -493,9 +457,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
}
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled("IGNITE-15108")
public void testExecuteUpdate() throws Exception {
@@ -508,9 +469,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.executeUpdate(sqlText));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testExecuteUpdateProducesResultSet() {
final String sqlText = "select * from test";
@@ -520,9 +478,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
);
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testClose() throws Exception {
String sqlText = "select 1";
@@ -543,9 +498,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertTrue(rs.isClosed());
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetMaxFieldSizeUnsupported() throws Exception {
assertEquals(0, stmt.getMaxFieldSize());
@@ -564,9 +516,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.setMaxFieldSize(100));
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled
public void testGetSetMaxRows() throws Exception {
@@ -599,9 +548,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.setMaxRows(maxRows));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetSetQueryTimeout() throws Exception {
assertEquals(0, stmt.getQueryTimeout());
@@ -626,9 +572,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.setQueryTimeout(timeout));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testMaxFieldSize() throws Exception {
assertTrue(stmt.getMaxFieldSize() >= 0);
@@ -639,9 +582,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkNotSupported(() -> stmt.setMaxFieldSize(100));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testQueryTimeout() throws Exception {
assertEquals(0, stmt.getQueryTimeout(), "Default timeout invalid: " + stmt.getQueryTimeout());
@@ -657,9 +597,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.setQueryTimeout(10));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testWarningsOnClosedStatement() throws Exception {
stmt.clearWarnings();
@@ -673,9 +610,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.clearWarnings());
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testCursorName() throws Exception {
checkNotSupported(() -> stmt.setCursorName("test"));
@@ -685,9 +619,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.setCursorName("test"));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetMoreResults() throws Exception {
assertFalse(stmt.getMoreResults());
@@ -707,9 +638,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.getMoreResults());
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetMoreResultsKeepCurrent() throws Exception {
assertFalse(stmt.getMoreResults(Statement.CLOSE_CURRENT_RESULT));
@@ -727,9 +655,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.getMoreResults(Statement.KEEP_CURRENT_RESULT));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testGetMoreResultsCloseAll() throws Exception {
assertFalse(stmt.getMoreResults(Statement.CLOSE_CURRENT_RESULT));
@@ -764,9 +689,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
stmt.executeBatch();
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testFetchDirection() throws Exception {
assertEquals(ResultSet.FETCH_FORWARD, stmt.getFetchDirection());
@@ -784,9 +706,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkStatementClosed(() -> stmt.getFetchDirection());
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testAutogenerated() throws Exception {
assertThrows(
@@ -818,9 +737,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
checkNotSupported(() -> stmt.execute("select 1", new String[]{"a", "b"}));
}
- /**
- * @throws Exception If failed.
- */
@Test
public void testStatementTypeMismatchSelectForCachedQuery() throws Exception {
// Put query to cache.
@@ -835,9 +751,6 @@ public class ItJdbcStatementSelfTest extends AbstractJdbcSelfTest {
assertNull(stmt.getResultSet(), "Not results expected. Last statement is executed with exception");
}
- /**
- * @throws Exception If failed.
- */
@Test
@Disabled("IGNITE-15108")
public void testStatementTypeMismatchUpdate() throws Exception {
diff --git a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
index 6c101d9..db647ae 100644
--- a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
+++ b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
@@ -363,21 +363,21 @@ public class IgniteImpl implements Ignite {
}
/**
- * @return Node configuration.
+ * Returns node configuration.
*/
public ConfigurationRegistry nodeConfiguration() {
return nodeCfgMgr.configurationRegistry();
}
/**
- * @return Cluster configuration.
+ * Returns cluster configuration.
*/
public ConfigurationRegistry clusterConfiguration() {
return clusterCfgMgr.configurationRegistry();
}
/**
- * @return Client handler module.
+ * Returns client handler module.
*/
public ClientHandlerModule clientHandlerModule() {
return clientHandlerModule;
@@ -480,19 +480,10 @@ public class IgniteImpl implements Ignite {
* Node state.
*/
private enum Status {
- /**
- *
- */
STARTING,
-
- /**
- *
- */
+
STARTED,
-
- /**
- *
- */
+
STOPPING
}
}
diff --git a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgnitionImpl.java b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgnitionImpl.java
index 52a529f..177364f 100644
--- a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgnitionImpl.java
+++ b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgnitionImpl.java
@@ -40,9 +40,6 @@ public class IgnitionImpl implements Ignition {
/** The logger. */
private static final IgniteLogger LOG = IgniteLogger.forClass(IgnitionImpl.class);
- /**
- *
- */
private static final String[] BANNER = {
"",
" # ___ __",
@@ -59,9 +56,6 @@ public class IgnitionImpl implements Ignition {
" ## /____/\n"
};
- /**
- *
- */
private static final String VER_KEY = "version";
/**
@@ -157,16 +151,10 @@ public class IgnitionImpl implements Ignition {
return nodeToStart;
}
- /**
- *
- */
private static void ackSuccessStart() {
LOG.info("Apache Ignite started successfully!");
}
- /**
- *
- */
private static void ackBanner() {
String ver = IgniteProperties.get(VER_KEY);
diff --git a/modules/runner/src/main/java/org/apache/ignite/utils/IgniteProperties.java b/modules/runner/src/main/java/org/apache/ignite/utils/IgniteProperties.java
index af7a1ee..c6e2d3f 100644
--- a/modules/runner/src/main/java/org/apache/ignite/utils/IgniteProperties.java
+++ b/modules/runner/src/main/java/org/apache/ignite/utils/IgniteProperties.java
@@ -38,6 +38,8 @@ public class IgniteProperties {
}
/**
+ * Reads properties.
+ *
* @param path Path.
* @param props Properties.
* @param throwExc Flag indicating whether to throw an exception or not.
@@ -69,7 +71,7 @@ public class IgniteProperties {
}
/**
- *
+ * Constructor.
*/
private IgniteProperties() {
// No-op.
diff --git a/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/ConfigurationStorageTest.java b/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/ConfigurationStorageTest.java
index 71d7ba3..0c6c8ae 100644
--- a/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/ConfigurationStorageTest.java
+++ b/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/ConfigurationStorageTest.java
@@ -32,9 +32,6 @@ import org.junit.jupiter.api.Test;
* Base class for testing {@link ConfigurationStorage} implementations.
*/
public abstract class ConfigurationStorageTest {
- /**
- *
- */
private ConfigurationStorage storage;
/**
@@ -43,7 +40,7 @@ public abstract class ConfigurationStorageTest {
public abstract ConfigurationStorage getStorage();
/**
- *
+ * Before each.
*/
@BeforeEach
void setUp() {
diff --git a/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorageTest.java b/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorageTest.java
index 55a554f..557652c 100644
--- a/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorageTest.java
+++ b/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorageTest.java
@@ -49,23 +49,14 @@ import org.junit.jupiter.api.BeforeEach;
* Tests for the {@link DistributedConfigurationStorage}.
*/
public class DistributedConfigurationStorageTest extends ConfigurationStorageTest {
- /**
- *
- */
private final VaultManager vaultManager = new VaultManager(new InMemoryVaultService());
- /**
- *
- */
private final KeyValueStorage metaStorage = new SimpleInMemoryKeyValueStorage();
- /**
- *
- */
private final MetaStorageManager metaStorageManager = mockMetaStorageManager();
/**
- *
+ * Before each.
*/
@BeforeEach
void start() {
@@ -75,7 +66,7 @@ public class DistributedConfigurationStorageTest extends ConfigurationStorageTes
}
/**
- *
+ * After each.
*/
@AfterEach
void stop() throws Exception {
@@ -181,7 +172,9 @@ public class DistributedConfigurationStorageTest extends ConfigurationStorageTes
private final Cursor<org.apache.ignite.internal.metastorage.server.Entry> internalCursor;
/**
+ * Constructor.
*
+ * @param internalCursor internal cursor.
*/
CursorAdapter(Cursor<org.apache.ignite.internal.metastorage.server.Entry> internalCursor) {
this.internalCursor = internalCursor;
diff --git a/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/LocalConfigurationStorageTest.java b/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/LocalConfigurationStorageTest.java
index 717a2d4..a9a4de3 100644
--- a/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/LocalConfigurationStorageTest.java
+++ b/modules/runner/src/test/java/org/apache/ignite/internal/configuration/storage/LocalConfigurationStorageTest.java
@@ -26,13 +26,10 @@ import org.junit.jupiter.api.BeforeEach;
* Tests for the {@link LocalConfigurationStorage}.
*/
public class LocalConfigurationStorageTest extends ConfigurationStorageTest {
- /**
- *
- */
private final VaultManager vaultManager = new VaultManager(new InMemoryVaultService());
/**
- *
+ * Before each.
*/
@BeforeEach
void startVault() {
@@ -40,7 +37,7 @@ public class LocalConfigurationStorageTest extends ConfigurationStorageTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void stopVault() throws Exception {
diff --git a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItDistributedTableTest.java b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItDistributedTableTest.java
index 4455307..f35534d 100644
--- a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItDistributedTableTest.java
+++ b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItDistributedTableTest.java
@@ -110,9 +110,6 @@ public class ItDistributedTableTest {
/** Network factory. */
private static final ClusterServiceFactory NETWORK_FACTORY = new TestScaleCubeClusterServiceFactory();
- /**
- *
- */
private static final MessageSerializationRegistry SERIALIZATION_REGISTRY = new MessageSerializationRegistryImpl();
/** Client. */
@@ -131,9 +128,6 @@ public class ItDistributedTableTest {
/** Cluster. */
private ArrayList<ClusterService> cluster = new ArrayList<>();
- /**
- *
- */
@WorkDirectory
private Path dataPath;
@@ -555,6 +549,8 @@ public class ItDistributedTableTest {
}
/**
+ * Starts client.
+ *
* @param testInfo Test info.
* @param port Local port.
* @param nodeFinder Node finder.
@@ -575,6 +571,8 @@ public class ItDistributedTableTest {
}
/**
+ * Wait for topology.
+ *
* @param cluster The cluster.
* @param expected Expected count.
* @param timeout The timeout in millis.
diff --git a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableScanTest.java b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableScanTest.java
index d80eddd..ff44e2c 100644
--- a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableScanTest.java
+++ b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableScanTest.java
@@ -85,28 +85,16 @@ import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
/**
- * Tests for {@link InternalTable#scan(int, org.apache.ignite.tx.Transaction)}
+ * Tests for {@link InternalTable#scan(int, org.apache.ignite.tx.Transaction)}.
*/
@ExtendWith(MockitoExtension.class)
public class ItInternalTableScanTest {
- /**
- *
- */
private static final ClusterServiceFactory NETWORK_FACTORY = new TestScaleCubeClusterServiceFactory();
- /**
- *
- */
private static final MessageSerializationRegistry SERIALIZATION_REGISTRY = new MessageSerializationRegistryImpl();
- /**
- *
- */
private static final RaftMessagesFactory FACTORY = new RaftMessagesFactory();
- /**
- *
- */
private static final String TEST_TABLE_NAME = "testTbl";
/** Id for the test RAFT group. */
@@ -116,14 +104,8 @@ public class ItInternalTableScanTest {
@Mock
private PartitionStorage mockStorage;
- /**
- *
- */
private ClusterService network;
- /**
- *
- */
private RaftServer raftSrv;
/** Internal table to test. */
@@ -133,7 +115,7 @@ public class ItInternalTableScanTest {
ScheduledExecutorService executor;
/**
- * Prepare test environment:
+ * Prepare test environment.
* <ol>
* <li>Start network node.</li>
* <li>Start raft server.</li>
diff --git a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTablePersistenceTest.java b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTablePersistenceTest.java
index e4df8d1..6ff1dd0 100644
--- a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTablePersistenceTest.java
+++ b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTablePersistenceTest.java
@@ -50,33 +50,18 @@ import org.apache.ignite.raft.client.service.RaftGroupService;
* Persistent partitions raft group snapshots tests.
*/
public class ItTablePersistenceTest extends ItAbstractListenerSnapshotTest<PartitionListener> {
- /**
- *
- */
private static final SchemaDescriptor SCHEMA = new SchemaDescriptor(
1,
new Column[]{new Column("key", NativeTypes.INT64, false)},
new Column[]{new Column("value", NativeTypes.INT64, false)}
);
- /**
- *
- */
private static final Row FIRST_KEY = createKeyRow(0);
- /**
- *
- */
private static final Row FIRST_VALUE = createKeyValueRow(0, 0);
- /**
- *
- */
private static final Row SECOND_KEY = createKeyRow(1);
- /**
- *
- */
private static final Row SECOND_VALUE = createKeyValueRow(1, 1);
/** Paths for created partition listeners. */
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/RecordSerializer.java b/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/RecordSerializer.java
index c74a5c8..5792f10 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/RecordSerializer.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/RecordSerializer.java
@@ -25,12 +25,16 @@ import org.jetbrains.annotations.NotNull;
*/
public interface RecordSerializer<R> {
/**
+ * Serializes the record.
+ *
* @param red Record to serialize.
* @return Table row with columns set from given object.
*/
Row serialize(@NotNull R red);
/**
+ * Deserializes the record.
+ *
* @param row Table row.
* @return Deserialized record object.
*/
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/TupleMarshallerImpl.java b/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/TupleMarshallerImpl.java
index 2c003e8..67842e7 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/TupleMarshallerImpl.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/TupleMarshallerImpl.java
@@ -273,6 +273,8 @@ public class TupleMarshallerImpl implements TupleMarshaller {
}
/**
+ * Extracts columns.
+ *
* @param tuple Tuple representing a Row.
* @param schema Schema.
* @return Extra columns.
@@ -366,6 +368,8 @@ public class TupleMarshallerImpl implements TupleMarshaller {
}
/**
+ * Writes column.
+ *
* @param rowAsm Row assembler.
* @param col Column.
* @param tup Internal tuple.
@@ -432,15 +436,16 @@ public class TupleMarshallerImpl implements TupleMarshaller {
}
/**
- * @return Number of columns that matches schema.
+ * Returns number of columns that matches schema.
*/
public int knownColumns() {
return knownColumns;
}
/**
+ * Returns column value.
+ *
* @param columnName Columns name.
- * @return Column value.
*/
Object value(String columnName) {
Object val = tuple.valueOrDefault(columnName, POISON_OBJECT);
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/AbstractTableView.java b/modules/table/src/main/java/org/apache/ignite/internal/table/AbstractTableView.java
index c7f9c91..14e5498 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/AbstractTableView.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/AbstractTableView.java
@@ -35,11 +35,11 @@ abstract class AbstractTableView {
/** Schema registry. */
protected final SchemaRegistry schemaReg;
- /** The transaction */
+ /** The transaction. */
protected final @Nullable Transaction tx;
/**
- * Constructor
+ * Constructor.
*
* @param tbl Internal table.
* @param schemaReg Schema registry.
@@ -73,7 +73,7 @@ abstract class AbstractTableView {
}
/**
- * @return Current transaction.
+ * Returns current transaction.
*/
public @Nullable Transaction transaction() {
return tx;
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueBinaryViewImpl.java b/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueBinaryViewImpl.java
index 8abe25d..bfdf230 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueBinaryViewImpl.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueBinaryViewImpl.java
@@ -377,8 +377,9 @@ public class KeyValueBinaryViewImpl extends AbstractTableView implements KeyValu
}
/**
+ * Returns row.
+ *
* @param row Binary row.
- * @return Row.
*/
protected Row wrap(BinaryRow row) {
if (row == null) {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueViewImpl.java b/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueViewImpl.java
index 590012d..d9aa6ac 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueViewImpl.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/KeyValueViewImpl.java
@@ -304,8 +304,9 @@ public class KeyValueViewImpl<K, V> extends AbstractTableView implements KeyValu
}
/**
+ * Returns marshaller.
+ *
* @param schemaVersion Schema version.
- * @return Marshaller.
*/
private KvMarshaller<K, V> marshaller(int schemaVersion) {
if (marsh == null || marsh.schemaVersion == schemaVersion) {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/RecordBinaryViewImpl.java b/modules/table/src/main/java/org/apache/ignite/internal/table/RecordBinaryViewImpl.java
index 7fd9e34..667f8ef 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/RecordBinaryViewImpl.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/RecordBinaryViewImpl.java
@@ -401,8 +401,9 @@ public class RecordBinaryViewImpl extends AbstractTableView implements RecordVie
}
/**
+ * Returns table row tuple.
+ *
* @param row Binary row.
- * @return Table row tuple.
*/
private Tuple wrap(BinaryRow row) {
if (row == null) {
@@ -415,8 +416,9 @@ public class RecordBinaryViewImpl extends AbstractTableView implements RecordVie
}
/**
+ * Returns table rows.
+ *
* @param rows Binary rows.
- * @return Table rows.
*/
private Collection<Tuple> wrap(Collection<BinaryRow> rows) {
if (rows == null) {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/RecordViewImpl.java b/modules/table/src/main/java/org/apache/ignite/internal/table/RecordViewImpl.java
index 849061b..22e410d 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/RecordViewImpl.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/RecordViewImpl.java
@@ -278,15 +278,16 @@ public class RecordViewImpl<R> extends AbstractTableView implements RecordView<R
}
/**
- * @return Marshaller.
+ * Returns marshaller.
*/
private RecordSerializer<R> serializer() {
throw new UnsupportedOperationException("Not implemented yet.");
}
/**
+ * Returns schema-aware row.
+ *
* @param row Binary row.
- * @return Schema-aware row.
*/
private Row wrap(BinaryRow row) {
if (row == null) {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/TableImpl.java b/modules/table/src/main/java/org/apache/ignite/internal/table/TableImpl.java
index 2cd2f88..f34216d 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/TableImpl.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/TableImpl.java
@@ -103,6 +103,8 @@ public class TableImpl implements Table {
}
/**
+ * Sets new schema management mode.
+ *
* @param schemaMode New schema management mode.
*/
public void schemaMode(SchemaManagementMode schemaMode) {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
index 5c8da9a..be5f1be 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
@@ -101,11 +101,9 @@ public class TableManager extends Producer<TableEvent, TableEventParameters> imp
IgniteComponent {
/** The logger. */
private static final IgniteLogger LOG = IgniteLogger.forClass(TableManager.class);
-
- /** */
+
private static final int INITIAL_SCHEMA_VERSION = 1;
-
- /** */
+
private static final IgniteUuidGenerator TABLE_ID_GENERATOR = new IgniteUuidGenerator(UUID.randomUUID(), 0);
/** Tables configuration. */
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/MultiRowsResponse.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/MultiRowsResponse.java
index 5f6410f..4fcc806 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/MultiRowsResponse.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/MultiRowsResponse.java
@@ -58,7 +58,7 @@ public class MultiRowsResponse implements Serializable {
}
/**
- * @return Binary rows.
+ * Returns binary rows.
*/
public List<BinaryRow> getValues() {
if (rows == null && rowsBytes != null) {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/SingleRowResponse.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/SingleRowResponse.java
index ff816fc..4ed7fe6 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/SingleRowResponse.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/response/SingleRowResponse.java
@@ -58,7 +58,7 @@ public class SingleRowResponse implements Serializable {
}
/**
- * @return Binary row.
+ * Returns binary row.
*/
@Nullable
public BinaryRow getValue() {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanCloseCommand.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanCloseCommand.java
index e6aa83d..f5e1b4a 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanCloseCommand.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanCloseCommand.java
@@ -39,7 +39,7 @@ public class ScanCloseCommand implements WriteCommand {
}
/**
- * @return Id of scan that is associated with the current command.
+ * Returns id of scan that is associated with the current command.
*/
public @NotNull IgniteUuid scanId() {
return scanId;
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanInitCommand.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanInitCommand.java
index 2feb32f..b41b00b 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanInitCommand.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanInitCommand.java
@@ -34,6 +34,8 @@ public class ScanInitCommand implements WriteCommand {
private final IgniteUuid scanId;
/**
+ * Constructor.
+ *
* @param requesterNodeId Id of the node that requests scan.
* @param scanId Id of scan that is associated with the current command.
*/
@@ -46,14 +48,14 @@ public class ScanInitCommand implements WriteCommand {
}
/**
- * @return Id of the node that requests scan.
+ * Returns id of the node that requests scan.
*/
public @NotNull String requesterNodeId() {
return requesterNodeId;
}
/**
- * @return Id of scan that is associated with the current command.
+ * Returns id of scan that is associated with the current command.
*/
@NotNull
public IgniteUuid scanId() {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanRetrieveBatchCommand.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanRetrieveBatchCommand.java
index 6833d8c..cb394f0 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanRetrieveBatchCommand.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/command/scan/ScanRetrieveBatchCommand.java
@@ -34,6 +34,8 @@ public class ScanRetrieveBatchCommand implements WriteCommand {
private final IgniteUuid scanId;
/**
+ * Constructor.
+ *
* @param itemsToRetrieveCnt Amount of items to retrieve.
* @param scanId Id of scan that is associated with the current command.
*/
@@ -46,14 +48,14 @@ public class ScanRetrieveBatchCommand implements WriteCommand {
}
/**
- * @return Amount of items to retrieve.
+ * Returns amount of items to retrieve.
*/
public int itemsToRetrieveCount() {
return itemsToRetrieveCnt;
}
/**
- * @return Id of scan that is associated with the current command.
+ * Returns id of scan that is associated with the current command.
*/
@NotNull
public IgniteUuid scanId() {
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java
index baffa89..70685b9 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java
@@ -595,7 +595,7 @@ public class PartitionListener implements RaftGroupListener {
}
/**
- * @return Underlying storage.
+ * Returns underlying storage.
*/
@TestOnly
public PartitionStorage getStorage() {
@@ -627,14 +627,14 @@ public class PartitionListener implements RaftGroupListener {
}
/**
- * @return Cursor.
+ * Returns cursor.
*/
public Cursor<DataRow> cursor() {
return cursor;
}
/**
- * @return Id of the node that creates cursor.
+ * Returns id of the node that creates cursor.
*/
public String requesterNodeId() {
return requesterNodeId;
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
index 572779c..fef6c00 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
@@ -101,6 +101,8 @@ public class InternalTableImpl implements InternalTable {
private final TableStorage tableStorage;
/**
+ * Constructor.
+ *
* @param tableName Table name.
* @param tableId Table id.
* @param partMap Map partition id to raft group.
@@ -433,9 +435,6 @@ public class InternalTableImpl implements InternalTable {
/** {@link Publisher} that relatively notifies about partition rows. */
private final RaftGroupService raftGrpSvc;
- /**
- *
- */
private AtomicBoolean subscribed;
/**
@@ -468,14 +467,8 @@ public class InternalTableImpl implements InternalTable {
* Partition Scan Subscription.
*/
private class PartitionScanSubscription implements Subscription {
- /**
- *
- */
private final Subscriber<? super BinaryRow> subscriber;
- /**
- *
- */
private final AtomicBoolean canceled;
/** Scan id to uniquely identify it on server side. */
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/event/TableEventParameters.java b/modules/table/src/main/java/org/apache/ignite/internal/table/event/TableEventParameters.java
index 5c74bfb..b22becc 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/event/TableEventParameters.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/event/TableEventParameters.java
@@ -35,6 +35,8 @@ public class TableEventParameters implements EventParameters {
private final TableImpl table;
/**
+ * Constructor.
+ *
* @param table Table instance.
*/
public TableEventParameters(TableImpl table) {
@@ -42,6 +44,8 @@ public class TableEventParameters implements EventParameters {
}
/**
+ * Constructor.
+ *
* @param tableId Table identifier.
* @param tableName Table name.
*/
@@ -50,6 +54,8 @@ public class TableEventParameters implements EventParameters {
}
/**
+ * Constructor.
+ *
* @param tableId Table identifier.
* @param tableName Table name.
* @param table Table instance.
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerFixlenOnlyBenchmark.java b/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerFixlenOnlyBenchmark.java
index 210ecb2..b9dd1e7 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerFixlenOnlyBenchmark.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerFixlenOnlyBenchmark.java
@@ -89,7 +89,7 @@ public class TupleMarshallerFixlenOnlyBenchmark {
}
/**
- *
+ * Setup.
*/
@Setup
public void init() {
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerVarlenOnlyBenchmark.java b/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerVarlenOnlyBenchmark.java
index d6f538d..ec00aaf 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerVarlenOnlyBenchmark.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/benchmarks/TupleMarshallerVarlenOnlyBenchmark.java
@@ -102,7 +102,7 @@ public class TupleMarshallerVarlenOnlyBenchmark {
}
/**
- *
+ * Setup.
*/
@Setup
public void init() {
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/Example.java b/modules/table/src/test/java/org/apache/ignite/internal/table/Example.java
index 2ee7cdb..f2fcce8 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/Example.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/Example.java
@@ -33,14 +33,14 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
/**
- *
+ * Example.
*/
@SuppressWarnings({
"PMD.EmptyLineSeparatorCheck", "emptylineseparator",
"unused", "UnusedAssignment", "InstanceVariableMayNotBeInitialized", "JoinDeclarationAndAssignmentJava"})
public class Example {
/**
- * @return Table implementation.
+ * Returns table implementation.
*/
private static List<Table> tableFactory() {
return Collections.singletonList(new TableImpl(new DummyInternalTableImpl(), null, null));
@@ -107,7 +107,7 @@ public class Example {
/**
* Use case 2: using simple KV mappings The table has structure is [ [id int, orgId int] // key [name varchar, lastName varchar, decimal
- * salary, int department] // value ]
+ * salary, int department] // value ].
*/
@Disabled
@ParameterizedTest
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueBinaryViewOperationsTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueBinaryViewOperationsTest.java
index b23612e..f46fcc3 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueBinaryViewOperationsTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueBinaryViewOperationsTest.java
@@ -56,10 +56,7 @@ public class KeyValueBinaryViewOperationsTest {
private KeyValueView<Tuple, Tuple> tableView() {
return new KeyValueBinaryViewImpl(new DummyInternalTableImpl(), new DummySchemaManagerImpl(schema), null, null);
}
-
- /**
- *
- */
+
@Test
public void put() {
KeyValueView<Tuple, Tuple> tbl = tableView();
@@ -92,10 +89,7 @@ public class KeyValueBinaryViewOperationsTest {
tbl.put(key, val3);
assertEqualsValues(schema, val3, tbl.get(key));
}
-
- /**
- *
- */
+
@Test
public void putIfAbsent() {
KeyValueView<Tuple, Tuple> tbl = tableView();
@@ -118,10 +112,7 @@ public class KeyValueBinaryViewOperationsTest {
assertEqualsValues(schema, val, tbl.get(key));
assertEqualsValues(schema, val, tbl.get(Tuple.create().set("id", 1L)));
}
-
- /**
- *
- */
+
@Test
public void getAndPut() {
KeyValueView<Tuple, Tuple> tbl = tableView();
@@ -145,10 +136,7 @@ public class KeyValueBinaryViewOperationsTest {
assertEqualsValues(schema, val3, tbl.get(key));
assertNull(tbl.get(Tuple.create().set("id", 2L)));
}
-
- /**
- *
- */
+
@Test
public void contains() {
KeyValueView<Tuple, Tuple> tbl = tableView();
@@ -177,10 +165,7 @@ public class KeyValueBinaryViewOperationsTest {
tbl.remove(Tuple.create().set("id", 2L));
assertFalse(tbl.contains(Tuple.create().set("id", 2L)));
}
-
- /**
- *
- */
+
@Test
public void remove() {
KeyValueView<Tuple, Tuple> tbl = tableView();
@@ -213,10 +198,7 @@ public class KeyValueBinaryViewOperationsTest {
assertNull(tbl.get(key2));
assertFalse(tbl.remove(key2));
}
-
- /**
- *
- */
+
@Test
public void removeExact() {
final KeyValueView<Tuple, Tuple> tbl = tableView();
@@ -261,10 +243,7 @@ public class KeyValueBinaryViewOperationsTest {
assertFalse(tbl.remove(key2, val2));
assertNull(tbl.get(key2));
}
-
- /**
- *
- */
+
@Test
public void replace() {
KeyValueView<Tuple, Tuple> tbl = tableView();
@@ -300,10 +279,7 @@ public class KeyValueBinaryViewOperationsTest {
assertFalse(tbl.replace(key2, null));
assertNull(tbl.get(key2));
}
-
- /**
- *
- */
+
@Test
public void replaceExact() {
KeyValueView<Tuple, Tuple> tbl = tableView();
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueOperationsTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueOperationsTest.java
index 36cd15b..7fb5483 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueOperationsTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/KeyValueOperationsTest.java
@@ -62,10 +62,7 @@ public class KeyValueOperationsTest {
private KeyValueView<Long, Long> kvView() {
return new KeyValueViewImpl<>(new DummyInternalTableImpl(), new DummySchemaManagerImpl(schema), mapper, mapper, null);
}
-
- /**
- *
- */
+
@Test
public void put() {
KeyValueView<Long, Long> tbl = kvView();
@@ -93,10 +90,7 @@ public class KeyValueOperationsTest {
tbl.put(1L, 33L);
assertEquals(33L, tbl.get(1L));
}
-
- /**
- *
- */
+
@Test
public void putIfAbsent() {
KeyValueView<Long, Long> tbl = kvView();
@@ -113,10 +107,7 @@ public class KeyValueOperationsTest {
assertEquals(11L, tbl.get(1L));
}
-
- /**
- *
- */
+
@Test
public void getAndPut() {
KeyValueView<Long, Long> tbl = kvView();
@@ -133,10 +124,7 @@ public class KeyValueOperationsTest {
assertEquals(33L, tbl.get(1L));
}
-
- /**
- *
- */
+
@Test
public void contains() {
KeyValueView<Long, Long> tbl = kvView();
@@ -160,10 +148,7 @@ public class KeyValueOperationsTest {
tbl.remove(2L);
assertFalse(tbl.contains(2L));
}
-
- /**
- *
- */
+
@Test
public void remove() {
KeyValueView<Long, Long> tbl = kvView();
@@ -191,10 +176,7 @@ public class KeyValueOperationsTest {
assertNull(tbl.get(2L));
assertFalse(tbl.remove(2L));
}
-
- /**
- *
- */
+
@Test
public void removeExact() {
KeyValueView<Long, Long> tbl = kvView();
@@ -234,10 +216,7 @@ public class KeyValueOperationsTest {
assertFalse(tbl.remove(2L, 22L));
assertNull(tbl.get(2L));
}
-
- /**
- *
- */
+
@Test
public void replace() {
KeyValueView<Long, Long> tbl = kvView();
@@ -267,10 +246,7 @@ public class KeyValueOperationsTest {
assertFalse(tbl.replace(2L, null));
assertNull(tbl.get(2L));
}
-
- /**
- *
- */
+
@Test
public void replaceExact() {
KeyValueView<Long, Long> tbl = kvView();
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/MutableRowTupleAdapterTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/MutableRowTupleAdapterTest.java
index bb69058..a963188 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/MutableRowTupleAdapterTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/MutableRowTupleAdapterTest.java
@@ -575,9 +575,10 @@ public class MutableRowTupleAdapterTest {
}
/**
+ * Returns random BitSet.
+ *
* @param rnd Random generator.
* @param bits Amount of bits in bitset.
- * @return Random BitSet.
*/
private static BitSet randomBitSet(Random rnd, int bits) {
BitSet set = new BitSet();
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/RecordBinaryViewOperationsTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/RecordBinaryViewOperationsTest.java
index 30e21aa..b6a87db 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/RecordBinaryViewOperationsTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/RecordBinaryViewOperationsTest.java
@@ -47,9 +47,6 @@ import org.junit.jupiter.api.function.Executable;
* TODO: IGNITE-14486 Add tests for async operations.
*/
public class RecordBinaryViewOperationsTest {
- /**
- *
- */
@Test
public void insert() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -78,10 +75,7 @@ public class RecordBinaryViewOperationsTest {
assertNull(tbl.get(nonExistedTuple));
}
-
- /**
- *
- */
+
@Test
public void upsert() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -110,10 +104,7 @@ public class RecordBinaryViewOperationsTest {
assertNull(tbl.get(nonExistedTuple));
}
-
- /**
- *
- */
+
@Test
public void getAndUpsert() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -139,10 +130,7 @@ public class RecordBinaryViewOperationsTest {
assertEqualsRows(schema, newTuple, tbl.get(Tuple.create().set("id", 1L)));
}
-
- /**
- *
- */
+
@Test
public void remove() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -167,10 +155,7 @@ public class RecordBinaryViewOperationsTest {
// Delete already deleted keyTuple.
assertFalse(tbl.delete(keyTuple));
}
-
- /**
- *
- */
+
@Test
public void removeExact() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -218,10 +203,7 @@ public class RecordBinaryViewOperationsTest {
assertTrue(tbl.deleteExact(tuple2));
assertNull(tbl.get(keyTuple));
}
-
- /**
- *
- */
+
@Test
public void replace() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -251,10 +233,7 @@ public class RecordBinaryViewOperationsTest {
assertEqualsRows(schema, tuple2, tbl.get(keyTuple));
}
-
- /**
- *
- */
+
@Test
public void replaceExact() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -285,10 +264,7 @@ public class RecordBinaryViewOperationsTest {
assertEqualsRows(schema, tuple2, tbl.get(Tuple.create().set("id", 1L)));
}
-
- /**
- *
- */
+
@Test
public void validateSchema() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -320,10 +296,7 @@ public class RecordBinaryViewOperationsTest {
assertThrowsWithCause(InvalidTypeException.class, () -> tbl.replace(tuple0));
assertThrowsWithCause(InvalidTypeException.class, () -> tbl.replace(tuple1));
}
-
- /**
- *
- */
+
@Test
public void defaultValues() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -417,7 +390,7 @@ public class RecordBinaryViewOperationsTest {
return new TableImpl(new DummyInternalTableImpl(), new DummySchemaManagerImpl(schema), null);
}
- public <T extends Throwable> void assertThrowsWithCause(Class<T> expectedType, Executable executable) {
+ private <T extends Throwable> void assertThrowsWithCause(Class<T> expectedType, Executable executable) {
Throwable ex = assertThrows(IgniteException.class, executable);
while (ex.getCause() != null) {
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/StrictSchemaOperationsTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/StrictSchemaOperationsTest.java
index d22e021..7eb063d 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/StrictSchemaOperationsTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/StrictSchemaOperationsTest.java
@@ -38,9 +38,6 @@ import org.junit.jupiter.api.function.Executable;
* Check data by strict schema.
*/
public class StrictSchemaOperationsTest {
- /**
- *
- */
@Test
public void columnNotExist() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -53,10 +50,7 @@ public class StrictSchemaOperationsTest {
assertThrowsWithCause(SchemaMismatchException.class, () -> recView.insert(Tuple.create().set("id", 0L).set("invalidCol", 0)));
}
-
- /**
- *
- */
+
@Test
public void schemaMismatch() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -84,10 +78,7 @@ public class StrictSchemaOperationsTest {
assertThrowsWithCause(SchemaMismatchException.class, () -> tbl.keyValueView().put(Tuple.create().set("id", 0L).set("affId", 1L),
Tuple.create().set("id", 0L).set("val", 0L)));
}
-
- /**
- *
- */
+
@Test
public void typeMismatch() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -111,10 +102,7 @@ public class StrictSchemaOperationsTest {
assertThrowsWithCause(InvalidTypeException.class,
() -> tbl.insert(Tuple.create().set("id", 0L).set("valBytes", new byte[]{0, 1, 2, 3})));
}
-
- /**
- *
- */
+
@Test
public void stringTypeMatch() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -138,10 +126,7 @@ public class StrictSchemaOperationsTest {
// Check string 3 char length and 9 bytes.
tbl.insert(tuple.set("valString", "我是谁"));
}
-
- /**
- *
- */
+
@Test
public void bytesTypeMatch() {
SchemaDescriptor schema = new SchemaDescriptor(
@@ -170,7 +155,7 @@ public class StrictSchemaOperationsTest {
return new TableImpl(new DummyInternalTableImpl(), new DummySchemaManagerImpl(schema), null);
}
- public <T extends Throwable> void assertThrowsWithCause(Class<T> expectedType, Executable executable) {
+ private <T extends Throwable> void assertThrowsWithCause(Class<T> expectedType, Executable executable) {
Throwable ex = assertThrows(IgniteException.class, executable);
while (ex.getCause() != null) {
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/TxTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/TxTest.java
index f136e7b..52eb9b5 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/TxTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/TxTest.java
@@ -44,7 +44,7 @@ import org.mockito.junit.jupiter.MockitoSettings;
import org.mockito.quality.Strictness;
/**
- *
+ * Test for transactions.
*/
@ExtendWith(MockitoExtension.class)
@MockitoSettings(strictness = Strictness.LENIENT)
@@ -52,30 +52,15 @@ public class TxTest {
/** Accounts table. */
private Table accounts;
- /**
- *
- */
public static final double BALANCE_1 = 500;
- /**
- *
- */
public static final double BALANCE_2 = 500;
- /**
- *
- */
public static final double DELTA = 500;
- /**
- *
- */
@Mock
private IgniteTransactions igniteTransactions;
- /**
- *
- */
@Mock
private Transaction tx;
@@ -198,27 +183,14 @@ public class TxTest {
assertEquals(BALANCE_2 + DELTA, accounts.recordView().get(makeKey(2)).doubleValue("balance"));
}
- /**
- * @param id The id.
- * @return The key tuple.
- */
private Tuple makeKey(long id) {
return Tuple.create().set("accountNumber", id);
}
- /**
- * @param id The id.
- * @param balance The balance.
- * @return The value tuple.
- */
private Tuple makeRecord(long id, double balance) {
return Tuple.create().set("accountNumber", id).set("balance", balance);
}
- /**
- * @param balance The balance.
- * @return The value tuple.
- */
private Tuple makeValue(double balance) {
return Tuple.create().set("balance", balance);
}
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/raft/PartitionCommandListenerTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/raft/PartitionCommandListenerTest.java
index b55c69b..ec20c58 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/raft/PartitionCommandListenerTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/raft/PartitionCommandListenerTest.java
@@ -293,6 +293,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Inserts all rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void insertAll(boolean existed) {
@@ -350,6 +352,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Deletes all rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void deleteAll(boolean existed) {
@@ -385,6 +389,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Reads all rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void readAll(boolean existed) {
@@ -436,6 +442,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Deletes row.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void delete(boolean existed) {
@@ -491,6 +499,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Inserts row.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void insert(boolean existed) {
@@ -506,6 +516,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Deletes exact rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void deleteExactAllValues(boolean existed) {
@@ -543,6 +555,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Gets and replaces rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void getAndReplaceValues(boolean existed) {
@@ -567,6 +581,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Gets an upserts rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void getAndUpsertValues(boolean existed) {
@@ -591,6 +607,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Gets and deletes rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void getAndDeleteValues(boolean existed) {
@@ -616,6 +634,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Puts rows if exists.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void putIfExistValues(boolean existed) {
@@ -633,6 +653,8 @@ public class PartitionCommandListenerTest {
}
/**
+ * Deletes exact rows.
+ *
* @param existed True if rows are existed, false otherwise.
*/
private void deleteExactValues(boolean existed) {
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java b/modules/table/src/test/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java
index 6f69d2f..37c6c3a 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/impl/DummyInternalTableImpl.java
@@ -301,8 +301,9 @@ public class DummyInternalTableImpl implements InternalTable {
}
/**
+ * Returns extracted key.
+ *
* @param row Row.
- * @return Extracted key.
*/
@NotNull
private DummyInternalTableImpl.KeyWrapper extractAndWrapKey(@NotNull BinaryRow row) {
@@ -313,8 +314,9 @@ public class DummyInternalTableImpl implements InternalTable {
}
/**
+ * Returns extracted key.
+ *
* @param row Row.
- * @return Extracted key.
*/
@NotNull
private boolean equalValues(@NotNull BinaryRow row, @NotNull BinaryRow row2) {
diff --git a/modules/table/src/test/java/org/apache/ignite/internal/table/type/NumericTypesSerializerTest.java b/modules/table/src/test/java/org/apache/ignite/internal/table/type/NumericTypesSerializerTest.java
index ca7fe42..70d56f9 100644
--- a/modules/table/src/test/java/org/apache/ignite/internal/table/type/NumericTypesSerializerTest.java
+++ b/modules/table/src/test/java/org/apache/ignite/internal/table/type/NumericTypesSerializerTest.java
@@ -62,7 +62,7 @@ public class NumericTypesSerializerTest {
.getMock();
/**
- * @return List of BigInteger pairs for test.
+ * Returns list of BigInteger pairs for test.
*/
private static List<Pair<BigInteger, BigInteger>> numbers() {
return Arrays.asList(
@@ -77,7 +77,7 @@ public class NumericTypesSerializerTest {
}
/**
- * @return List of string decimal representations for test.
+ * Returns list of string decimal representations for test.
*/
private static String[] stringDecimalRepresentation() {
return new String[]{
@@ -87,7 +87,7 @@ public class NumericTypesSerializerTest {
}
/**
- * @return List of pairs to compare byte representation.
+ * Returns list of pairs to compare byte representation.
*/
private static List<Pair<BigDecimal, BigDecimal>> sameDecimals() {
return Arrays.asList(
@@ -102,16 +102,19 @@ public class NumericTypesSerializerTest {
new Pair<>(new BigDecimal("123.3211"), new BigDecimal("123.321"))
);
}
-
+
+ /**
+ * Before each.
+ */
@BeforeEach
public void setup() {
long seed = System.currentTimeMillis();
rnd = new Random(seed);
}
-
+
/**
- *
+ * Test.
*/
@ParameterizedTest
@MethodSource("numbers")
@@ -133,10 +136,7 @@ public class NumericTypesSerializerTest {
assertEquals(row.numberValue(1), row.numberValue(2));
}
-
- /**
- *
- */
+
@Test
public void testPrecisionRestrictionsForNumbers() {
schema = new SchemaDescriptor(
@@ -158,10 +158,7 @@ public class NumericTypesSerializerTest {
assertThrows(TupleMarshallerException.class, () -> marshaller.marshal(badTup.set("number1", new BigInteger("-111111"))),
"Column's type mismatch");
}
-
- /**
- *
- */
+
@Test
public void testPrecisionRestrictionsForDecimal() {
schema = new SchemaDescriptor(
@@ -193,10 +190,7 @@ public class NumericTypesSerializerTest {
"Failed to set decimal value for column"
);
}
-
- /**
- *
- */
+
@Test
public void testStringDecimalSpecialCase() throws TupleMarshallerException {
schema = new SchemaDescriptor(
@@ -216,9 +210,9 @@ public class NumericTypesSerializerTest {
assertEquals(row.decimalValue(1), BigDecimal.ZERO);
}
-
+
/**
- *
+ * Test.
*/
@ParameterizedTest
@MethodSource("stringDecimalRepresentation")
@@ -241,10 +235,7 @@ public class NumericTypesSerializerTest {
assertEquals(row.decimalValue(1), new BigDecimal(decimalStr).setScale(0, RoundingMode.HALF_UP));
}
-
- /**
- *
- */
+
@Test
public void testDecimalMaxScale() throws TupleMarshallerException {
schema = new SchemaDescriptor(
@@ -265,9 +256,9 @@ public class NumericTypesSerializerTest {
assertEquals(row.decimalValue(1), BigDecimal.valueOf(123, Integer.MAX_VALUE));
}
-
+
/**
- *
+ * Test.
*/
@ParameterizedTest
@MethodSource("sameDecimals")
@@ -304,10 +295,7 @@ public class NumericTypesSerializerTest {
assertArrayEquals(firstRowInBytes, secondRowInBytes);
}
-
- /**
- * @return Tuple.
- */
+
@NotNull
private Tuple createTuple() {
return Tuple.create();
diff --git a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockException.java b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockException.java
index cb8388b..3470589 100644
--- a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockException.java
+++ b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockException.java
@@ -24,6 +24,8 @@ import org.apache.ignite.lang.IgniteInternalCheckedException;
*/
public class LockException extends IgniteInternalCheckedException {
/**
+ * Constructor.
+ *
* @param msg The message.
*/
public LockException(String msg) {
@@ -31,6 +33,8 @@ public class LockException extends IgniteInternalCheckedException {
}
/**
+ * Constructor.
+ *
* @param waiter Conflicting waiter.
*/
public LockException(Waiter waiter) {
diff --git a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockManager.java b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockManager.java
index 2979629..dcbff3c 100644
--- a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockManager.java
+++ b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockManager.java
@@ -25,14 +25,18 @@ import java.util.concurrent.CompletableFuture;
*/
public interface LockManager {
/**
+ * Attempts to acquire a lock for the specified {@code key} in exclusive mode.
+ *
* @param key The key.
* @param timestamp The timestamp.
- * @return The future.
+ * @return The future that will be completed when a lock is successfully acquired.
* @throws LockException When a lock can't be taken due to possible deadlock.
*/
public CompletableFuture<Void> tryAcquire(Object key, Timestamp timestamp) throws LockException;
/**
+ * Attempts to release a lock for the specified {@code key} in exclusive mode.
+ *
* @param key The key.
* @param timestamp The timestamp.
* @throws LockException If the unlock operation is invalid.
@@ -40,14 +44,18 @@ public interface LockManager {
public void tryRelease(Object key, Timestamp timestamp) throws LockException;
/**
+ * Attempts to acquire a lock for the specified {@code key} in shared mode.
+ *
* @param key The key.
* @param timestamp The timestamp.
- * @return The future.
+ * @return The future that will be completed when a lock is successfully acquired.
* @throws LockException When a lock can't be taken due to possible deadlock.
*/
public CompletableFuture<Void> tryAcquireShared(Object key, Timestamp timestamp) throws LockException;
/**
+ * Attempts to release a lock for the specified {@code key} in shared mode.
+ *
* @param key The key.
* @param timestamp The timestamp.
* @throws LockException If the unlock operation is invalid.
@@ -55,12 +63,16 @@ public interface LockManager {
public void tryReleaseShared(Object key, Timestamp timestamp) throws LockException;
/**
+ * Returns a collection of timestamps that is associated with the specified {@code key}.
+ *
* @param key The key.
* @return The waiters queue.
*/
public Collection<Timestamp> queue(Object key);
/**
+ * Returns a waiter associated with the specified {@code key}.
+ *
* @param key The key.
* @param timestamp The timestamp.
* @return The waiter.
diff --git a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Timestamp.java b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Timestamp.java
index 32dd336..5cc081a 100644
--- a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Timestamp.java
+++ b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Timestamp.java
@@ -24,32 +24,22 @@ import org.jetbrains.annotations.NotNull;
* The timestamp.
*/
public class Timestamp implements Comparable<Timestamp> {
- /**
- *
- */
private static long localTime;
- /**
- *
- */
private static long cntr;
- /**
- *
- */
private final long timestamp;
/**
+ * Constructor.
+ *
* @param timestamp The timestamp.
*/
Timestamp(long timestamp) {
this.timestamp = timestamp;
}
- /**
- * @param other Other version.
- * @return Comparison result.
- */
+ /** {@inheritDoc} */
@Override
public int compareTo(@NotNull Timestamp other) {
int ret = Long.compare(timestamp >> 16 << 16, other.timestamp >> 16 << 16);
@@ -57,6 +47,7 @@ public class Timestamp implements Comparable<Timestamp> {
return ret != 0 ? ret : Long.compare(timestamp << 48 >> 48, other.timestamp << 48 >> 48);
}
+ /** {@inheritDoc} */
@Override
public boolean equals(Object o) {
if (!(o instanceof Timestamp)) {
@@ -66,6 +57,7 @@ public class Timestamp implements Comparable<Timestamp> {
return compareTo((Timestamp) o) == 0;
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
return (int) (timestamp ^ (timestamp >>> 32));
diff --git a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Waiter.java b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Waiter.java
index 081f97f..3146f95 100644
--- a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Waiter.java
+++ b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/Waiter.java
@@ -22,12 +22,12 @@ package org.apache.ignite.internal.tx;
*/
public interface Waiter {
/**
- * @return Associated timestamp.
+ * Returns associated timestamp.
*/
Timestamp timestamp();
/**
- * @return {@code True} if the waiter holds the lock.
+ * Returns {@code true} if the waiter holds the lock.
*/
boolean locked();
}
diff --git a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java
index 8a130de..c7cd379 100644
--- a/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java
+++ b/modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java
@@ -38,9 +38,6 @@ import org.jetbrains.annotations.NotNull;
* it's validated against current lock owner: if where is an owner with a higher timestamp lock request is denied.
*/
public class HeapLockManager implements LockManager {
- /**
- *
- */
private ConcurrentHashMap<Object, LockState> locks = new ConcurrentHashMap<>();
/** {@inheritDoc} */
@@ -68,8 +65,9 @@ public class HeapLockManager implements LockManager {
}
/**
+ * Returns the lock state for the key.
+ *
* @param key The key.
- * @return The lock state for the key.
*/
private @NotNull LockState lockState(Object key) {
return locks.computeIfAbsent(key, k -> new LockState());
@@ -81,6 +79,7 @@ public class HeapLockManager implements LockManager {
return lockState(key).queue();
}
+ /** {@inheritDoc} */
@Override
public Waiter waiter(Object key, Timestamp timestamp) {
return lockState(key).waiter(timestamp);
@@ -92,8 +91,10 @@ public class HeapLockManager implements LockManager {
private TreeMap<Timestamp, WaiterImpl> waiters = new TreeMap<>();
/**
+ * Attempts to acquire a lock for the specified {@code key} in exclusive mode.
+ *
* @param timestamp The timestamp.
- * @return The future.
+ * @return The future that will be completed when a lock is successfully acquired.
*/
public CompletableFuture<Void> tryAcquire(Timestamp timestamp) throws LockException {
WaiterImpl w = new WaiterImpl(timestamp, false);
@@ -126,6 +127,8 @@ public class HeapLockManager implements LockManager {
}
/**
+ * Attempts to release a lock for the specified {@code key} in exclusive mode.
+ *
* @param timestamp The timestamp.
*/
public void tryRelease(Timestamp timestamp) throws LockException {
@@ -175,8 +178,10 @@ public class HeapLockManager implements LockManager {
}
/**
+ * Attempts to acquire a lock for the specified {@code key} in shared mode.
+ *
* @param timestamp The timestamp.
- * @return The future.
+ * @return The future that will be completed when a lock is successfully acquired.
*/
public CompletableFuture<Void> tryAcquireShared(Timestamp timestamp) throws LockException {
WaiterImpl waiter = new WaiterImpl(timestamp, true);
@@ -213,6 +218,12 @@ public class HeapLockManager implements LockManager {
return waiter.fut;
}
+ /**
+ * Attempts to release a lock for the specified {@code key} in shared mode.
+ *
+ * @param timestamp The timestamp.
+ * @throws LockException If the unlock operation is invalid.
+ */
public void tryReleaseShared(Timestamp timestamp) throws LockException {
WaiterImpl locked = null;
@@ -248,7 +259,9 @@ public class HeapLockManager implements LockManager {
}
/**
- * @return Waiters queue.
+ * Returns a collection of timestamps that is associated with the specified {@code key}.
+ *
+ * @return The waiters queue.
*/
public Collection<Timestamp> queue() {
synchronized (waiters) {
@@ -257,6 +270,8 @@ public class HeapLockManager implements LockManager {
}
/**
+ * Returns a waiter for the specified {@code key}.
+ *
* @param timestamp The timestamp.
* @return The waiter.
*/
@@ -285,8 +300,10 @@ public class HeapLockManager implements LockManager {
private boolean locked = false;
/**
+ * Constructor.
+ *
* @param timestamp The timestamp.
- * @param forRead {@code True} to request a read lock.
+ * @param forRead {@code true} to request a read lock.
*/
WaiterImpl(Timestamp timestamp, boolean forRead) {
this.fut = new CompletableFuture<>();
@@ -327,7 +344,7 @@ public class HeapLockManager implements LockManager {
}
/**
- * @return {@code True} if is locked for read.
+ * Returns {@code true} if is locked for read.
*/
public boolean isForRead() {
return forRead;
diff --git a/modules/transactions/src/test/java/org/apache/ignite/internal/tx/AbstractLockManagerTest.java b/modules/transactions/src/test/java/org/apache/ignite/internal/tx/AbstractLockManagerTest.java
index 35fafa7..628de0a 100644
--- a/modules/transactions/src/test/java/org/apache/ignite/internal/tx/AbstractLockManagerTest.java
+++ b/modules/transactions/src/test/java/org/apache/ignite/internal/tx/AbstractLockManagerTest.java
@@ -368,6 +368,8 @@ public abstract class AbstractLockManagerTest extends IgniteAbstractTest {
}
/**
+ * Do test single key multithreaded.
+ *
* @param duration The duration.
* @param readLocks Read lock accumulator.
* @param writeLocks Write lock accumulator.
diff --git a/modules/transactions/src/test/java/org/apache/ignite/internal/tx/HeapLockManagerTest.java b/modules/transactions/src/test/java/org/apache/ignite/internal/tx/HeapLockManagerTest.java
index 707575e..aad1bd6 100644
--- a/modules/transactions/src/test/java/org/apache/ignite/internal/tx/HeapLockManagerTest.java
+++ b/modules/transactions/src/test/java/org/apache/ignite/internal/tx/HeapLockManagerTest.java
@@ -20,7 +20,7 @@ package org.apache.ignite.internal.tx;
import org.apache.ignite.internal.tx.impl.HeapLockManager;
/**
- *
+ * Test class for {@link HeapLockManager}.
*/
public class HeapLockManagerTest extends AbstractLockManagerTest {
@Override
diff --git a/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistencePropertiesVaultServiceTest.java b/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistencePropertiesVaultServiceTest.java
index 0c2dc8e..e0ae1c7 100644
--- a/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistencePropertiesVaultServiceTest.java
+++ b/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistencePropertiesVaultServiceTest.java
@@ -42,14 +42,8 @@ import org.junit.jupiter.api.extension.ExtendWith;
*/
@ExtendWith(WorkDirectoryExtension.class)
class ItPersistencePropertiesVaultServiceTest {
- /**
- *
- */
private static final int TIMEOUT_SECONDS = 1;
- /**
- *
- */
@WorkDirectory
private Path vaultDir;
diff --git a/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistentVaultServiceTest.java b/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistentVaultServiceTest.java
index a4ce736..c0f7cf4 100644
--- a/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistentVaultServiceTest.java
+++ b/modules/vault/src/integrationTest/java/org/apache/ignite/internal/vault/persistence/ItPersistentVaultServiceTest.java
@@ -29,9 +29,6 @@ import org.junit.jupiter.api.extension.ExtendWith;
*/
@ExtendWith(WorkDirectoryExtension.class)
class ItPersistentVaultServiceTest extends VaultServiceTest {
- /**
- *
- */
@WorkDirectory
private Path vaultDir;
diff --git a/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultEntry.java b/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultEntry.java
index beb91ee..4615324 100644
--- a/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultEntry.java
+++ b/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultEntry.java
@@ -23,7 +23,9 @@ import org.apache.ignite.lang.ByteArray;
import org.jetbrains.annotations.Nullable;
/**
- * Represents a vault unit as entry with key and value, where
+ * Represents a vault unit as entry with key and value.
+ *
+ * <p>Where:
* <ul>
* <li>key - an unique entry's key. Keys are comparable in lexicographic manner and represented as an
* array of bytes;</li>
diff --git a/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultManager.java b/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultManager.java
index 5d5cd42..91f878d 100644
--- a/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultManager.java
+++ b/modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultManager.java
@@ -33,7 +33,7 @@ public class VaultManager implements IgniteComponent {
/** Special key, which reserved for storing the name of the current node. */
private static final ByteArray NODE_NAME = new ByteArray("node_name");
- /** Instance of vault */
+ /** Instance of vault. */
private final VaultService vaultSvc;
/**
@@ -59,7 +59,7 @@ public class VaultManager implements IgniteComponent {
}
/**
- * See {@link VaultService#get}
+ * See {@link VaultService#get}.
*
* @param key Key. Couldn't be {@code null}.
* @return An entry for the given key. Couldn't be {@code null}. If there is no mapping for the provided {@code key}, then {@code Entry}
@@ -70,7 +70,7 @@ public class VaultManager implements IgniteComponent {
}
/**
- * See {@link VaultService#put}
+ * See {@link VaultService#put}.
*
* @param key Vault key. Couldn't be {@code null}.
* @param val Value. If value is equal to {@code null}, then previous value with key will be deleted if there was any mapping.
@@ -81,7 +81,7 @@ public class VaultManager implements IgniteComponent {
}
/**
- * See {@link VaultService#remove}
+ * See {@link VaultService#remove}.
*
* @param key Vault key. Couldn't be {@code null}.
* @return Future representing pending completion of the operation. Couldn't be {@code null}.
@@ -91,7 +91,7 @@ public class VaultManager implements IgniteComponent {
}
/**
- * See {@link VaultService#range}
+ * See {@link VaultService#range}.
*
* @param fromKey Start key of range (inclusive). Couldn't be {@code null}.
* @param toKey End key of range (exclusive). Could be {@code null}.
@@ -127,7 +127,7 @@ public class VaultManager implements IgniteComponent {
}
/**
- * @return {@code CompletableFuture} which, when complete, returns the node name, if was stored earlier, or {@code null} otherwise.
+ * Returns {@code CompletableFuture} which, when complete, returns the node name, if was stored earlier, or {@code null} otherwise.
*/
public CompletableFuture<String> name() {
return vaultSvc.get(NODE_NAME)
diff --git a/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/PersistentVaultService.java b/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/PersistentVaultService.java
index 5881a24..ff4a28b 100644
--- a/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/PersistentVaultService.java
+++ b/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/PersistentVaultService.java
@@ -53,19 +53,10 @@ public class PersistentVaultService implements VaultService {
RocksDB.loadLibrary();
}
- /**
- *
- */
private final ExecutorService threadPool = Executors.newFixedThreadPool(2);
- /**
- *
- */
private final Options options = new Options();
- /**
- *
- */
private volatile RocksDB db;
/** Base path for RocksDB. */
@@ -196,9 +187,6 @@ public class PersistentVaultService implements VaultService {
*/
@FunctionalInterface
private static interface RocksSupplier<T> {
- /**
- *
- */
T supply() throws RocksDBException;
}
@@ -220,9 +208,6 @@ public class PersistentVaultService implements VaultService {
*/
@FunctionalInterface
private static interface RocksRunnable {
- /**
- *
- */
void run() throws RocksDBException;
}
diff --git a/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/RocksIteratorAdapter.java b/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/RocksIteratorAdapter.java
index 3bf1343..bf2c18d 100644
--- a/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/RocksIteratorAdapter.java
+++ b/modules/vault/src/main/java/org/apache/ignite/internal/vault/persistence/RocksIteratorAdapter.java
@@ -35,7 +35,7 @@ import org.rocksdb.Slice;
*/
class RocksIteratorAdapter implements Cursor<VaultEntry> {
/**
- *
+ * RocksDB iterator.
*/
private final RocksIterator it;
@@ -50,9 +50,11 @@ class RocksIteratorAdapter implements Cursor<VaultEntry> {
private final Slice upperBound;
/**
- * @param it RocksDB iterator
- * @param lowerBound lower iteration bound (included)
- * @param upperBound upper iteration bound (not included)
+ * Constructor.
+ *
+ * @param it RocksDB iterator.
+ * @param lowerBound lower iteration bound (included).
+ * @param upperBound upper iteration bound (not included).
*/
RocksIteratorAdapter(RocksIterator it, Slice lowerBound, Slice upperBound) {
this.it = it;
diff --git a/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultManagerTest.java b/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultManagerTest.java
index 8eb99e2..ab07099 100644
--- a/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultManagerTest.java
+++ b/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultManagerTest.java
@@ -32,18 +32,12 @@ import org.junit.jupiter.api.Test;
* Test suite for the {@link VaultManager}.
*/
public class VaultManagerTest {
- /**
- *
- */
private static final int TIMEOUT_SECONDS = 1;
- /**
- *
- */
private final VaultManager vaultManager = new VaultManager(new InMemoryVaultService());
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {
diff --git a/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultServiceTest.java b/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultServiceTest.java
index 0388c00..b2939bd 100644
--- a/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultServiceTest.java
+++ b/modules/vault/src/test/java/org/apache/ignite/internal/vault/VaultServiceTest.java
@@ -45,16 +45,13 @@ import org.junit.jupiter.api.Test;
* Base class for testing {@link VaultService} implementations.
*/
public abstract class VaultServiceTest {
- /**
- *
- */
private static final int TIMEOUT_SECONDS = 1;
/** Vault. */
private VaultService vaultService;
/**
- *
+ * Before each.
*/
@BeforeEach
public void setUp() throws IOException {
@@ -64,7 +61,7 @@ public abstract class VaultServiceTest {
}
/**
- *
+ * After each.
*/
@AfterEach
void tearDown() throws Exception {