Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
c8657b8
IGNITE-22550 Get rid of RocksDbProfileConfigurationSchema#numShardBit…
tkalkirill Jun 20, 2024
75400bb
IGNITE-22231 Implement zone based replicas start on the zone creation…
kgusakov Jun 20, 2024
73d3bb8
Bump com.netflix.nebula.ospackage from 11.9.0 to 11.9.1 (#3840)
dependabot[bot] Jun 21, 2024
9f6d69f
IGNITE-22462 Add planner test to verify type coercion for set operat…
ygerzhedovich Jun 21, 2024
b02d6de
IGNITE-22551 Remove ReuseListImpl class (#3963)
sashapolo Jun 21, 2024
d34486b
IGNITE-21661 Add test that reset partition can use data from a node o…
ibessonov Jun 21, 2024
2df3f3f
IGNITE-22520 Use IndexMeta when building the index (#3946)
tkalkirill Jun 21, 2024
dd5fe83
IGNITE-22552 Add sync methods to IgniteCatalog (#3962)
Pochatkin Jun 21, 2024
d5adf9e
IGNITE-22385 Make rest and cli api to declarative style (#3968)
Phillippko Jun 21, 2024
c662935
IGNITE-22441 Add parameter object to Data Streamer (#3971)
ptupitsyn Jun 21, 2024
79aad62
IGNITE-22430 Rename JobStatus to JobState and vice versa (#3942)
valepakh Jun 21, 2024
f98f98e
IGNITE-22467 Add getAssignments method to the PlacementDriver (#3947)
sanpwc Jun 21, 2024
914f942
IGNITE-22436 Add tests for rebalance triggers (#3965)
alievmirza Jun 24, 2024
d9d9d4a
IGNITE-19383 Add git last commit hash to version (#3925)
Pochatkin Jun 24, 2024
7f719f0
IGNITE-22548 Publish Javadocs as jar (#3959)
Artyeshi Jun 24, 2024
66a3d69
IGNITE-22558 Optimize sending to yourself in DefaultMessagingService …
tkalkirill Jun 24, 2024
6969d1a
IGNITE-22544 Benchmark and optimize raft commands serialization. (#3975)
ibessonov Jun 24, 2024
014734d
IGNITE-22410 Implement rebalance triggers for zone based partitions
alievmirza Jun 24, 2024
af9f165
Bump com.github.spotbugs from 6.0.17 to 6.0.18 (#3978)
dependabot[bot] Jun 25, 2024
5342b43
IGNITE-22422 C++ Fix compute_test.all_arg_types flakiness (#3981)
isapego Jun 25, 2024
4206daa
IGNITE-22270 MarshallerException uses INTERNAL_ERR code (#3948)
AMashenkov Jun 25, 2024
daaddbc
IGNITE-22410 add some assertions to tests
alievmirza Jun 25, 2024
f6bc76c
IGNITE-22351 Add Doxyfile to C++ project (#3980)
isapego Jun 25, 2024
79f6cfc
IGNITE-17059 Java thin: Implement batch SQL API for java thin client …
xtern Jun 25, 2024
732cfdd
IGNITE-22466 Sql. Support mapping to non-primary replicas (#3972)
korlov42 Jun 25, 2024
c8685ff
IGNITE-22269 Introduce new err code NULLABLE_VALUE_ERR (#3983)
sk0x50 Jun 25, 2024
525c3ee
IGNITE-22554 Rename nonStableNodeAssignments and simplify code (#3969)
sashapolo Jun 26, 2024
3095905
IGNITE-22262 Sql. Fixed API usage example (SqlApiExample) (#3961)
xtern Jun 26, 2024
da7a116
IGNITE-22582 Clarify KeyValueView#getAll javadoc about non-existing k…
tmgodinho Jun 26, 2024
c8bd755
IGNITE-22463 Improve CLI error message when executing commands on uni…
myskov Jun 26, 2024
9d7bc87
IGNITE-22561 Get rid of ByteString in messages (#3987)
tkalkirill Jun 26, 2024
1783a4a
IGNITE-22541 Fix bool handling in C++ binary_tuple_builder (#3984)
arcolight Jun 26, 2024
4607d46
Merge remote-tracking branch 'apache-ignite-3/main' into ignite-22410
alievmirza Jun 26, 2024
de847a9
IGNITE-22589 Rename StopNodeOrHaltFailureHandlerConfigurationSchema.t…
sk0x50 Jun 26, 2024
9b42e3e
IGNITE-22073 Sql. Add processing of the provided query timeout (#3953)
lowka Jun 26, 2024
aab9667
IGNITE-22589 Fix FailureProcessor initialization (#3994)
sk0x50 Jun 26, 2024
6e7f25d
IGNITE-22569 Java thin: fix SqlBatchException propagation (#3982)
ptupitsyn Jun 27, 2024
055b61f
IGNITE-22539 .NET: Add JobTarget (#3993)
ptupitsyn Jun 27, 2024
351c235
IGNITE-22540 .NET: Add ReceiverDescriptor to Data Streamer (#3996)
ptupitsyn Jun 27, 2024
bd01805
IGNITE-22574 Ignite CLI: Allow to pass multiple files with cluster co…
nva Jun 27, 2024
f32aaca
IGNITE-22532 Fix --metastorage-group option description (#3992)
valepakh Jun 27, 2024
43260e7
IGNITE-22533 Extra error when trying to run non-existant sql file (#3…
valepakh Jun 27, 2024
9841802
IGNITE-22224 Rework embedded mode API (#3908)
valepakh Jun 27, 2024
879936c
IGNITE-22460 Rename libignite-client.so to libignite3-client.so (#3998)
isapego Jun 27, 2024
b2695de
IGNITE-22525 .NET: Rename JobStatus to JobState and vice versa (#3999)
ptupitsyn Jun 27, 2024
154d928
IGNITE-22594 Fix compilation (#4000)
valepakh Jun 27, 2024
4ada038
IGNITE-22583 Get rid of byte[] in messages (#3990)
tkalkirill Jun 27, 2024
7bfa2a0
IGNITE-20503 Sql. Support big clusters by mapping service (#3966)
AMashenkov Jun 27, 2024
9a428ca
IGNITE-22566 Add C++ docs generation to gradle (#4001)
isapego Jun 27, 2024
15962dc
IGNITE-22410 add some assertions to tests
alievmirza Jun 27, 2024
bfe47ea
Merge remote-tracking branch 'apache-ignite-3/main' into ignite-22410
alievmirza Jun 27, 2024
488b5b0
IGNITE-22410 remove redundant line
alievmirza Jun 27, 2024
a67bb2f
IGNITE-22410 add todo
alievmirza Jun 27, 2024
e1ea069
IGNITE-22410 review fixes
alievmirza Jul 2, 2024
f06f807
IGNITE-22410 increase timeouts for tests assertions
alievmirza Jul 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 42 additions & 0 deletions buildscripts/generate-version-file.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

def createVersionFile = tasks.register('createVersionFile') {
onlyIf {
project.hasProperty("lastCommitHash")
}

def versionFileName = "ignite.version.full"
def versionFile = file("$buildDir/$versionFileName")

if (versionFile.exists()) {
versionFile.delete()
}

doLast {
def versionProp = project.property("lastCommitHash")

versionFile << project.version + "-sha1:" + versionProp
}

outputs.file versionFile
}

// make processResources depends on createExtraFilesIndex task
processResources {
from createVersionFile
}
1 change: 1 addition & 0 deletions buildscripts/java-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}

test {
Expand Down
1 change: 1 addition & 0 deletions buildscripts/sql-parser-generator.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ extractParserTemplate.dependsOn copyFmppResources
generateFmppSources.dependsOn extractParserTemplate
javaccTemplate.dependsOn generateFmppSources
compileJava.dependsOn javaccTemplate
javadocJar.dependsOn compileJava

idea.module {
sourceDirs += file("${buildDir}/generated-sources/javacc")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Below is the list of properties for link:https://rocksdb.org/[RocksDB,window=_bl
|size| `256 * 1024 * 1024` | Size of the offheap cache.
|writeBufferSize | `64 * 1024 * 1024` | Size of the write buffer.
|cache| `lru` | The type of the cache to use. Currently only lru is supported. Using `clock` cache is not recommended.
|numShardBits| `-1` | The number of parts the cache is sharded to.
|flushDelayMillis |100| The delay before handling RocksDB flush events.
|===

Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/ignite-cli-tool.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ These commands let you manage your cluster.
[cols="1,1,3",opts="header", stripes=none]
|===
| Command| Parameters | Description
| `cluster init` | `[--cmg-node] [--meta-storage-node] <clusterName> or < --url> <cluster-config> or < --config-file>`| Initializes a cluster.
| `cluster init` | `[--cmg-node] [--meta-storage-node] <clusterName> or < --url> <cluster-config> or < --config-files>`| Initializes a cluster.
| `cluster status` | `[--url]` | Displays the detailed status of the specified cluster.
| `cluster topology physical` | `[--plain] [--url]` | Shows physical topology of the specified cluster.
| `cluster topology logical` | `[--plain] [--url]` | Shows logical topology of the specified cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgnitionManager;
import org.apache.ignite.IgniteServer;
import org.apache.ignite.InitParameters;
import org.apache.ignite.internal.app.IgniteImpl;
import org.apache.ignite.internal.testframework.IgniteAbstractTest;
import org.apache.ignite.internal.testframework.WorkDirectoryExtension;
import org.junit.jupiter.api.AfterEach;
Expand All @@ -45,40 +42,35 @@ public abstract class AbstractExamplesTest extends IgniteAbstractTest {
/** Empty argument to invoke an example. */
protected static final String[] EMPTY_ARGS = new String[0];

/** Started ignite instance. */
protected IgniteImpl ignite;
/** Started embedded node. */
private IgniteServer node;

/**
* Starts a node.
*/
@BeforeEach
public void startNode() throws Exception {
CompletableFuture<Ignite> igniteFuture = IgnitionManager.start(
node = IgniteServer.start(
TEST_NODE_NAME,
configFile(),
workDir
);

InitParameters initParameters = InitParameters.builder()
.destinationNodeName(TEST_NODE_NAME)
.metaStorageNodeNames(List.of(TEST_NODE_NAME))
.metaStorageNodeNames(TEST_NODE_NAME)
.clusterName("cluster")
.build();

IgnitionManager.init(initParameters);

assertThat(igniteFuture, willCompleteSuccessfully());

// We can call without a timeout, since the future is guaranteed to be completed above.
ignite = (IgniteImpl) igniteFuture.join();
CompletableFuture<Void> initFuture = node.initClusterAsync(initParameters);
assertThat(initFuture, willCompleteSuccessfully());
}

/**
* Stops the node.
*/
@AfterEach
public void stopNode() {
IgnitionManager.stop(TEST_NODE_NAME);
node.shutdown();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.apache.ignite.example.AbstractExamplesTest;
import org.apache.ignite.example.sql.jdbc.SqlJdbcExample;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
Expand Down Expand Up @@ -58,7 +57,6 @@ public void testSqlJdbcExample() throws Exception {
*
* @throws Exception If failed.
*/
@Disabled("https://issues.apache.org/jira/browse/IGNITE-17059")
@Test
public void testSqlApiExample() throws Exception {
assertConsoleOutputContains(SqlApiExample::main, EMPTY_ARGS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import org.apache.ignite.sql.Statement;
import org.apache.ignite.sql.async.AsyncResultSet;
import org.apache.ignite.table.mapper.Mapper;
import org.apache.ignite.tx.Transaction;
import org.apache.ignite.tx.TransactionOptions;

/**
* Examples of using SQL API.
Expand Down Expand Up @@ -57,64 +59,86 @@ public static void main(String[] args) throws Exception {
//
//--------------------------------------------------------------------------------------

client.sql().execute(
null,
client.sql().executeScript(
"CREATE TABLE CITIES ("
+ "ID INT PRIMARY KEY,"
+ "NAME VARCHAR)"
).close(); // Ignore result.
+ "NAME VARCHAR);"

client.sql().execute(
null,
"CREATE TABLE ACCOUNTS ("
+ "CREATE TABLE ACCOUNTS ("
+ " ACCOUNT_ID INT PRIMARY KEY,"
+ " CITY_ID INT,"
+ " FIRST_NAME VARCHAR,"
+ " LAST_NAME VARCHAR,"
+ " BALANCE DOUBLE)"
).close();
);

//--------------------------------------------------------------------------------------
//
// Populating 'CITIES' table.
// Starting transaction.
//
//--------------------------------------------------------------------------------------

System.out.println("\nPopulating 'CITIES' table...");

try (Statement stmt = client.sql().createStatement("INSERT INTO CITIES (ID, NAME) VALUES (?, ?)")) {
long rowsAdded = 0;

try (ResultSet rs = client.sql().execute(null, stmt, 1, "Forest Hill")) {
rowsAdded += rs.affectedRows();
}
try (ResultSet rs = client.sql().execute(null, stmt, 2, "Denver")) {
rowsAdded += rs.affectedRows();
}
try (ResultSet rs = client.sql().execute(null, stmt, 3, "St. Petersburg")) {
rowsAdded += rs.affectedRows();
}
System.out.println("\nStarting read-write transaction...");

System.out.println("\nAdded cities: " + rowsAdded);
}
Transaction tx = client.transactions().begin(new TransactionOptions().readOnly(false));

//--------------------------------------------------------------------------------------
//
// Populating 'ACCOUNTS' table.
// Populating 'CITIES' table.
//
//--------------------------------------------------------------------------------------

System.out.println("\nPopulating 'ACCOUNTS' table...");
try {
System.out.println("\nPopulating 'CITIES' table...");

long rowsAdded = Arrays.stream(client.sql().executeBatch(null,
"INSERT INTO ACCOUNTS (ACCOUNT_ID, CITY_ID, FIRST_NAME, LAST_NAME, BALANCE) values (?, ?, ?, ?, ?)",
BatchedArguments.of(1, 1, "John", "Doe", 1000.0d)
.add(2, 1, "Jane", "Roe", 2000.0d)
.add(3, 1, "Mary", "Major", 1500.0d)
.add(4, 1, "Richard", "Miles", 1450.0d)))
.sum();
try (Statement stmt = client.sql().createStatement("INSERT INTO CITIES (ID, NAME) VALUES (?, ?)")) {
long rowsAdded = 0;

System.out.println("\nAdded accounts: " + rowsAdded);
try (ResultSet<?> rs = client.sql().execute(tx, stmt, 1, "Forest Hill")) {
rowsAdded += rs.affectedRows();
}
try (ResultSet<?> rs = client.sql().execute(tx, stmt, 2, "Denver")) {
rowsAdded += rs.affectedRows();
}
try (ResultSet<?> rs = client.sql().execute(tx, stmt, 3, "St. Petersburg")) {
rowsAdded += rs.affectedRows();
}

System.out.println("\nAdded cities: " + rowsAdded);
}

//--------------------------------------------------------------------------------------
//
// Populating 'ACCOUNTS' table.
//
//--------------------------------------------------------------------------------------

System.out.println("\nPopulating 'ACCOUNTS' table...");

long rowsAdded = Arrays.stream(client.sql().executeBatch(tx,
"INSERT INTO ACCOUNTS (ACCOUNT_ID, CITY_ID, FIRST_NAME, LAST_NAME, BALANCE) values (?, ?, ?, ?, ?)",
BatchedArguments.of(1, 1, "John", "Doe", 1000.0d)
.add(2, 1, "Jane", "Roe", 2000.0d)
.add(3, 2, "Mary", "Major", 1500.0d)
.add(4, 3, "Richard", "Miles", 1450.0d)))
.sum();

System.out.println("\nAdded accounts: " + rowsAdded);

//--------------------------------------------------------------------------------------
//
// Committing transaction.
//
//--------------------------------------------------------------------------------------

System.out.println("\nCommitting transaction...");

tx.commit();
} catch (Exception e) {
tx.rollback();

throw e;
}

//--------------------------------------------------------------------------------------
//
Expand All @@ -131,9 +155,9 @@ public static void main(String[] args) throws Exception {
SqlRow row = rs.next();

System.out.println(" "
+ row.stringValue(0) + ", "
+ row.stringValue(1) + ", "
+ row.stringValue(2) + ", "
+ row.stringValue(3));
+ row.stringValue(2));
}
}

Expand Down Expand Up @@ -199,8 +223,10 @@ public static void main(String[] args) throws Exception {

System.out.println("\nDropping the tables...");

client.sql().execute(null, "DROP TABLE ACCOUNTS").close();
client.sql().execute(null, "DROP TABLE CITIES").close();
client.sql().executeScript(
"DROP TABLE ACCOUNTS;"
+ "DROP TABLE CITIES"
);
}
}

Expand All @@ -216,9 +242,9 @@ private static CompletionStage<Void> fetchAllRowsInto(AsyncResultSet<SqlRow> res
//
for (var row : resultSet.currentPage()) {
System.out.println(" "
+ row.stringValue(0) + ", "
+ row.stringValue(1) + ", "
+ row.stringValue(2) + ", "
+ row.stringValue(3));
+ row.stringValue(2));
}

//
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ openapiGenerator = "org.openapi.generator:7.6.0"
javacc = "com.intershop.gradle.javacc:4.1.3"
shadow = "io.github.goooler.shadow:8.1.7"
cmake = "net.freudasoft.gradle-cmake-plugin:0.0.4"
nebula = "com.netflix.nebula.ospackage:11.9.0"
nebula = "com.netflix.nebula.ospackage:11.9.1"
docker = "com.palantir.docker:0.36.0"
checksum = "org.gradle.crypto.checksum:1.4.0"
setupbuilder = "de.inetsoftware.setupbuilder:7.2.21"
aggregateJavadoc = "io.freefair.aggregate-javadoc:6.6.3"
ideaext = "org.jetbrains.gradle.plugin.idea-ext:1.1.8"
spotbugs = "com.github.spotbugs:6.0.17"
spotbugs = "com.github.spotbugs:6.0.18"


[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,26 @@ public String toString() {
return S.toString(this);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}

Assignments that = (Assignments) o;
return force == that.force && nodes.equals(that.nodes);
}

@Override
public int hashCode() {
int result = nodes.hashCode();
result = 31 * result + Boolean.hashCode(force);
return result;
}

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

package org.apache.ignite.internal.affinity;

import java.io.Serializable;
import java.util.Set;

/**
* Set of nodes along with associated token that is guaranteed to be changed if the set was changed.
*/
public interface TokenizedAssignments extends Serializable {
/** Returns a set of nodes, represented by this assignments instance. */
Set<Assignment> nodes();

/** Returns a token associated with given assignments that is guaranteed to be changed if assignments were changed. */
long token();
}
Loading