Skip to content

Commit df2aa33

Browse files
author
Shubh Sahu
committed
Spotless apply
Signed-off-by: Shubh Sahu <shubhvs@amazon.com>
1 parent da459ae commit df2aa33

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

server/src/internalClusterTest/java/org/opensearch/remotemigration/ResizeIndexMigrationTestCase.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ public void testFailResizeIndexWhileDocRepToRemoteStoreMigration() throws Except
115115
);
116116
assertEquals(
117117
ex.getMessage(),
118-
"Index " + resizeType +" is not allowed as remote migration mode is mixed"
119-
+ " and index is remote store disabled"
118+
"Index " + resizeType + " is not allowed as remote migration mode is mixed" + " and index is remote store disabled"
120119
);
121120
}
122121

@@ -203,8 +202,7 @@ public void testFailResizeIndexWhileRemoteStoreToDocRepMigration() throws Except
203202
);
204203
assertEquals(
205204
ex.getMessage(),
206-
"Index " + resizeType +" is not allowed as remote migration mode is mixed"
207-
+ " and index is remote store enabled"
205+
"Index " + resizeType + " is not allowed as remote migration mode is mixed" + " and index is remote store enabled"
208206
);
209207
}
210208
}

server/src/main/java/org/opensearch/action/admin/indices/shrink/TransportResizeAction.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,13 @@ private static void validateRemoteMigrationModeSettings(
397397
if (compatibilityMode == CompatibilityMode.MIXED) {
398398
boolean isRemoteStoreEnabled = sourceIndexMetadata.getSettings().getAsBoolean(SETTING_REMOTE_STORE_ENABLED, false);
399399
Direction migrationDirection = clusterSettings.get(RemoteStoreNodeService.MIGRATION_DIRECTION_SETTING);
400-
boolean invalidConfiguration = (migrationDirection == Direction.REMOTE_STORE && isRemoteStoreEnabled == false)
400+
boolean invalidConfiguration = (migrationDirection == Direction.REMOTE_STORE && isRemoteStoreEnabled == false)
401401
|| (migrationDirection == Direction.DOCREP && isRemoteStoreEnabled);
402402
if (invalidConfiguration) {
403403
throw new IllegalStateException(
404-
"Index " + type +" is not allowed as remote migration mode is mixed"
404+
"Index "
405+
+ type
406+
+ " is not allowed as remote migration mode is mixed"
405407
+ " and index is remote store "
406408
+ (isRemoteStoreEnabled ? "enabled" : "disabled")
407409
);

server/src/test/java/org/opensearch/action/admin/indices/shrink/TransportResizeActionTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,9 @@ public void testResizeFailuresDuringMigration() {
683683
);
684684
assertEquals(
685685
ise.getMessage(),
686-
"Index " + resizeType +" is not allowed as remote migration mode is mixed"
686+
"Index "
687+
+ resizeType
688+
+ " is not allowed as remote migration mode is mixed"
687689
+ " and index is remote store "
688690
+ (isRemoteStoreEnabled ? "enabled" : "disabled")
689691
);

0 commit comments

Comments
 (0)