Skip to content

Commit 48ef756

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 22cc67c commit 48ef756

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpDownloader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ void updateDatabases() throws IOException {
148148
);
149149
return;
150150
}
151-
var blockException = clusterState.blocks().indexBlockedException(projectId, ClusterBlockLevel.WRITE,
152-
geoipIndex.getWriteIndex().getName());
151+
var blockException = clusterState.blocks()
152+
.indexBlockedException(projectId, ClusterBlockLevel.WRITE, geoipIndex.getWriteIndex().getName());
153153
if (blockException != null) {
154154
logger.debug(
155155
"Not updating geoip database because there is a write block on the " + geoipIndex.getWriteIndex().getName() + " index",

modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/DatabaseNodeServiceTests.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,11 @@ static ClusterState createClusterState(PersistentTasksCustomMetadata tasksCustom
378378
return createClusterState(Metadata.DEFAULT_PROJECT_ID, tasksCustomMetadata, noStartedShards);
379379
}
380380

381-
static ClusterState createClusterState(ProjectId projectId, PersistentTasksCustomMetadata tasksCustomMetadata,
382-
boolean noStartedShards) {
381+
static ClusterState createClusterState(
382+
ProjectId projectId,
383+
PersistentTasksCustomMetadata tasksCustomMetadata,
384+
boolean noStartedShards
385+
) {
383386
boolean aliasGeoipDatabase = randomBoolean();
384387
String indexName = aliasGeoipDatabase
385388
? GeoIpDownloader.DATABASES_INDEX + "-" + randomAlphaOfLength(5)
@@ -411,7 +414,8 @@ static ClusterState createClusterState(ProjectId projectId, PersistentTasksCusto
411414
.add(
412415
IndexRoutingTable.builder(index)
413416
.addIndexShard(IndexShardRoutingTable.builder(new ShardId(index, 0)).addShard(shardRouting))
414-
).build()
417+
)
418+
.build()
415419
)
416420
.build();
417421
}

modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,11 @@ public void testUpdateDatabasesWriteBlock() throws IOException {
596596
* Here we make sure that we bail out before making an httpClient request if there is write block on the .geoip_databases index
597597
*/
598598
ClusterState state = createClusterState(projectId, new PersistentTasksCustomMetadata(1L, Map.of()));
599-
var geoIpIndex = state.getMetadata().getProject(projectId).getIndicesLookup().get(GeoIpDownloader.DATABASES_INDEX).getWriteIndex()
599+
var geoIpIndex = state.getMetadata()
600+
.getProject(projectId)
601+
.getIndicesLookup()
602+
.get(GeoIpDownloader.DATABASES_INDEX)
603+
.getWriteIndex()
600604
.getName();
601605
state = ClusterState.builder(state)
602606
.blocks(new ClusterBlocks.Builder().addIndexBlock(projectId, geoIpIndex, IndexMetadata.INDEX_READ_ONLY_ALLOW_DELETE_BLOCK))

0 commit comments

Comments
 (0)