Fix line length for `node` and remove suppresion (#37454)
Relates #34884
This commit is contained in:
parent
a2a40c50a0
commit
63793499bd
|
@ -48,7 +48,6 @@
|
||||||
|
|
||||||
<!-- Hopefully temporary suppression of LineLength on files that don't pass it. We should remove these when we the
|
<!-- Hopefully temporary suppression of LineLength on files that don't pass it. We should remove these when we the
|
||||||
files start to pass. -->
|
files start to pass. -->
|
||||||
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]node[/\\]Node.java" checks="LineLength" />
|
|
||||||
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]aliases[/\\]IndexAliasesIT.java" checks="LineLength" />
|
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]aliases[/\\]IndexAliasesIT.java" checks="LineLength" />
|
||||||
|
|
||||||
<!-- Gradle requires inputs to be seriablizable -->
|
<!-- Gradle requires inputs to be seriablizable -->
|
||||||
|
|
|
@ -300,7 +300,8 @@ public class Node implements Closeable {
|
||||||
environment.configFile(), Arrays.toString(environment.dataFiles()), environment.logsFile(), environment.pluginsFile());
|
environment.configFile(), Arrays.toString(environment.dataFiles()), environment.logsFile(), environment.pluginsFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.pluginsService = new PluginsService(tmpSettings, environment.configFile(), environment.modulesFile(), environment.pluginsFile(), classpathPlugins);
|
this.pluginsService = new PluginsService(tmpSettings, environment.configFile(), environment.modulesFile(),
|
||||||
|
environment.pluginsFile(), classpathPlugins);
|
||||||
this.settings = pluginsService.updatedSettings();
|
this.settings = pluginsService.updatedSettings();
|
||||||
localNodeFactory = new LocalNodeFactory(settings, nodeEnvironment.nodeId());
|
localNodeFactory = new LocalNodeFactory(settings, nodeEnvironment.nodeId());
|
||||||
|
|
||||||
|
@ -669,10 +670,8 @@ public class Node implements Closeable {
|
||||||
onDiskMetadata = MetaData.EMPTY_META_DATA;
|
onDiskMetadata = MetaData.EMPTY_META_DATA;
|
||||||
}
|
}
|
||||||
assert onDiskMetadata != null : "metadata is null but shouldn't"; // this is never null
|
assert onDiskMetadata != null : "metadata is null but shouldn't"; // this is never null
|
||||||
validateNodeBeforeAcceptingRequests(new BootstrapContext(environment, onDiskMetadata), transportService.boundAddress(), pluginsService
|
validateNodeBeforeAcceptingRequests(new BootstrapContext(environment, onDiskMetadata), transportService.boundAddress(),
|
||||||
.filterPlugins(Plugin
|
pluginsService.filterPlugins(Plugin.class).stream()
|
||||||
.class)
|
|
||||||
.stream()
|
|
||||||
.flatMap(p -> p.getBootstrapChecks().stream()).collect(Collectors.toList()));
|
.flatMap(p -> p.getBootstrapChecks().stream()).collect(Collectors.toList()));
|
||||||
|
|
||||||
clusterService.addStateApplier(transportService.getTaskManager());
|
clusterService.addStateApplier(transportService.getTaskManager());
|
||||||
|
@ -767,8 +766,9 @@ public class Node implements Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// During concurrent close() calls we want to make sure that all of them return after the node has completed it's shutdown cycle.
|
// During concurrent close() calls we want to make sure that all of them return after the node has completed it's shutdown cycle.
|
||||||
// If not, the hook that is added in Bootstrap#setup() will be useless: close() might not be executed, in case another (for example api) call
|
// If not, the hook that is added in Bootstrap#setup() will be useless:
|
||||||
// to close() has already set some lifecycles to stopped. In this case the process will be terminated even if the first call to close() has not finished yet.
|
// close() might not be executed, in case another (for example api) call to close() has already set some lifecycles to stopped.
|
||||||
|
// In this case the process will be terminated even if the first call to close() has not finished yet.
|
||||||
@Override
|
@Override
|
||||||
public synchronized void close() throws IOException {
|
public synchronized void close() throws IOException {
|
||||||
if (lifecycle.started()) {
|
if (lifecycle.started()) {
|
||||||
|
|
Loading…
Reference in New Issue