Skip to content

Commit 08448a5

Browse files
committed
Fix gradle failures
Signed-off-by: Ashish Singh <ssashish@amazon.com>
1 parent 49941fd commit 08448a5

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

server/src/main/java/org/opensearch/index/remote/RemoteStoreDataEnums.java

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
*/
2121
public class RemoteStoreDataEnums {
2222

23+
/**
24+
* Categories of the data in Remote store.
25+
*/
2326
public enum DataCategory {
2427
SEGMENTS("segments", Set.of(DataType.values())),
2528
TRANSLOG("translog", Set.of(DATA, METADATA));
@@ -41,6 +44,9 @@ public String getName() {
4144
}
4245
}
4346

47+
/**
48+
* Types of data in remote store.
49+
*/
4450
public enum DataType {
4551
DATA("data"),
4652
METADATA("metadata"),

server/src/test/java/org/opensearch/index/remote/RemoteStorePathTypeTests.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public void testGeneratePathForFixedType() {
6464
String basePath = getPath(pathList) + indexUUID + SEPARATOR + shardId + SEPARATOR;
6565
// Translog Data
6666
BlobPath result = FIXED.path(blobPath, indexUUID, shardId, dataCategory, dataType);
67-
assertEquals(basePath + dataCategory + SEPARATOR + dataType + SEPARATOR, result.buildAsString());
67+
assertEquals(basePath + dataCategory.getName() + SEPARATOR + dataType.getName() + SEPARATOR, result.buildAsString());
6868

6969
// Translog Metadata
7070
dataType = METADATA;
7171
result = FIXED.path(blobPath, indexUUID, shardId, dataCategory, dataType);
72-
assertEquals(basePath + dataCategory + SEPARATOR + dataType + SEPARATOR, result.buildAsString());
72+
assertEquals(basePath + dataCategory.getName() + SEPARATOR + dataType.getName() + SEPARATOR, result.buildAsString());
7373

7474
// Translog Lock files - This is a negative case where the assertion will trip.
7575
BlobPath finalBlobPath = blobPath;
@@ -79,17 +79,17 @@ public void testGeneratePathForFixedType() {
7979
dataCategory = SEGMENTS;
8080
dataType = DATA;
8181
result = FIXED.path(blobPath, indexUUID, shardId, dataCategory, dataType);
82-
assertEquals(basePath + dataCategory + SEPARATOR + dataType + SEPARATOR, result.buildAsString());
82+
assertEquals(basePath + dataCategory.getName() + SEPARATOR + dataType.getName() + SEPARATOR, result.buildAsString());
8383

8484
// Segment Metadata
8585
dataType = METADATA;
8686
result = FIXED.path(blobPath, indexUUID, shardId, dataCategory, dataType);
87-
assertEquals(basePath + dataCategory + SEPARATOR + dataType + SEPARATOR, result.buildAsString());
87+
assertEquals(basePath + dataCategory.getName() + SEPARATOR + dataType.getName() + SEPARATOR, result.buildAsString());
8888

8989
// Segment Metadata
9090
dataType = LOCK_FILES;
9191
result = FIXED.path(blobPath, indexUUID, shardId, dataCategory, dataType);
92-
assertEquals(basePath + dataCategory + SEPARATOR + dataType + SEPARATOR, result.buildAsString());
92+
assertEquals(basePath + dataCategory.getName() + SEPARATOR + dataType.getName() + SEPARATOR, result.buildAsString());
9393
}
9494

9595
private List<String> getPathList() {

0 commit comments

Comments
 (0)