Skip to content

IGNITE-28731 Create cluster auto activation plugin - #355

Open
DenisPolo wants to merge 5 commits into
apache:masterfrom
DenisPolo:ignite-28731
Open

IGNITE-28731 Create cluster auto activation plugin#355
DenisPolo wants to merge 5 commits into
apache:masterfrom
DenisPolo:ignite-28731

Conversation

@DenisPolo

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread .gigaide/gigaide.properties Outdated
@DenisPolo
DenisPolo force-pushed the ignite-28731 branch 2 times, most recently from e1ba8c9 to 426bd4b Compare June 24, 2026 08:09
Comment thread modules/auto-activation-ext/README.md
Comment thread modules/auto-activation-ext/pom.xml Outdated
Comment thread modules/auto-activation-ext/README.md Outdated

@chesnokoff chesnokoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many tests repeat the same node startup sequence and cluster state checks. Can we extract common helper methods for starting configured nodes and checking the expected state? This would make the individual test scenarios shorter and easier to understand

Comment on lines +44 to +57
@Override public boolean apply(Collection<ClusterNode> nodes) {
Set<String> missingNodes = new HashSet<>(requiredNodes);

for (ClusterNode node : nodes) {
String nodeConsistentId = node.consistentId().toString();

missingNodes.remove(nodeConsistentId);

if (missingNodes.isEmpty())
break;
}

return missingNodes.isEmpty();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Override public boolean apply(Collection<ClusterNode> nodes) {
Set<String> missingNodes = new HashSet<>(requiredNodes);
for (ClusterNode node : nodes) {
String nodeConsistentId = node.consistentId().toString();
missingNodes.remove(nodeConsistentId);
if (missingNodes.isEmpty())
break;
}
return missingNodes.isEmpty();
}
@Override public boolean apply(Collection<ClusterNode> nodes) {
Set<String> missingNodes = new HashSet<>(requiredNodes);
for (ClusterNode node : nodes) {
String nodeConsistentId = node.consistentId().toString();
missingNodes.remove(nodeConsistentId);
if (missingNodes.isEmpty())
return true;
}
return false;
}

Comment on lines +52 to +65
@Override public boolean apply(Collection<ClusterNode> nodes) {
Set<String> missingNodes = new HashSet<>(requiredValues);

for (ClusterNode node : nodes) {
String attrVal = node.attribute(attrName);

missingNodes.remove(attrVal);

if (missingNodes.isEmpty())
break;
}

return missingNodes.isEmpty();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Override public boolean apply(Collection<ClusterNode> nodes) {
Set<String> missingNodes = new HashSet<>(requiredValues);
for (ClusterNode node : nodes) {
String attrVal = node.attribute(attrName);
missingNodes.remove(attrVal);
if (missingNodes.isEmpty())
break;
}
return missingNodes.isEmpty();
}
@Override public boolean apply(Collection<ClusterNode> nodes) {
Set<String> missingNodes = new HashSet<>(requiredValues);
for (ClusterNode node : nodes) {
String attrVal = node.attribute(attrName);
missingNodes.remove(attrVal);
if (missingNodes.isEmpty())
return true;
}
return false;
}


/** {@inheritDoc} */
@Override public void onIgniteStart() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

}

/** @return IgniteConfiguration from XML. */
private IgniteConfiguration getConfigurationFromXml(String xmlPath) throws Exception {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From IDEA: Exception 'java.lang.Exception' is never thrown in the method

PluginProvider<?> autoActivationProvider = new AutoActivationPluginProvider(
new ActivateByConsistentID(Set.of(NODE_0, NODE_1))
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove nl

PluginProvider<?> autoActivationProvider = new AutoActivationPluginProvider(
new ActivateByConsistentID(Set.of(NODE_2))
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove nl

PluginProvider<?> autoActivationProvider = new AutoActivationPluginProvider(
new ActivateByConsistentID(Set.of(NODE_2))
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove nl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for other methods: remove empty lines as first lines in method bodies

Comment on lines +139 to +140
private CacheConfiguration getCacheConfiguration() {
return new CacheConfiguration<>()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private CacheConfiguration getCacheConfiguration() {
return new CacheConfiguration<>()
private CacheConfiguration<String, Integer> getCacheConfiguration() {
return new CacheConfiguration<String, Integer>()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's avoid raw usage of type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants