Skip to content

Commit

Permalink
Remove redudentent methods
Browse files Browse the repository at this point in the history
Signed-off-by: bansvaru <[email protected]>
  • Loading branch information
linuxpi committed Aug 10, 2023
1 parent a499ad0 commit 77cac81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private BlobContainer getMarkerBlobContainer(String clusterUUID, String clusterN
}

public ClusterMetadataMarker getLatestClusterMetadataMarker(String clusterUUID, String clusterState) {
String latestMarkerFileName = getLatestMarkerFileName();
String latestMarkerFileName = getLatestMarkerFileName(clusterUUID, clusterState);
return fetchRemoteClusterMetadataMarker(latestMarkerFileName, clusterUUID, clusterState);
}

Expand All @@ -179,9 +179,9 @@ public ClusterMetadataMarker fetchRemoteClusterMetadataMarker(String filename, S
return null;
}

public String getLatestMarkerFileName() {
public String getLatestMarkerFileName(String clusterUUID, String clusterState) {
try {
List<BlobMetadata> markerFilesMetadata = blobStoreRepository.listBlobsByPrefixInSortedOrder(
List<BlobMetadata> markerFilesMetadata = getMarkerBlobContainer(clusterUUID, clusterState).listBlobsByPrefixInSortedOrder(
"marker",
1,
BlobContainer.BlobNameSortOrder.LEXICOGRAPHIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3419,16 +3419,4 @@ private static final class ShardSnapshotMetaDeleteResult {
this.blobsToDelete = blobsToDelete;
}
}

public List<BlobMetadata> listBlobsByPrefixInSortedOrder(
String blobNamePrefix,
int limit,
BlobContainer.BlobNameSortOrder blobNameSortOrder
) throws IOException {
return blobContainer().listBlobsByPrefixInSortedOrder(blobNamePrefix, limit, blobNameSortOrder);
}

public ClusterMetadataMarker readClusterMetadata(String filename) throws IOException {
return CLUSTER_METADATA_MARKER_FORMAT.read(blobContainer(), filename, namedXContentRegistry);
}
}

0 comments on commit 77cac81

Please sign in to comment.