Skip to content

Commit

Permalink
removing unused members
Browse files Browse the repository at this point in the history
Signed-off-by: Sooraj Sinha <soosinha@amazon.com>
  • Loading branch information
soosinha committed Jun 7, 2024
1 parent ba069ec commit c492b18
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public class RemoteClusterMetadataManifest extends AbstractRemoteWritableBlobEnt

public static final String METADATA_MANIFEST_NAME_FORMAT = "%s";
public static final int MANIFEST_CURRENT_CODEC_VERSION = ClusterMetadataManifest.CODEC_V3;
public static final String COMMITTED = "C";
public static final String PUBLISHED = "P";

/**
* Manifest format compatible with older codec v0, where codec version was missing.
Expand Down Expand Up @@ -93,11 +95,10 @@ public String generateBlobFileName() {
MANIFEST,
RemoteStoreUtils.invertLong(clusterMetadataManifest.getClusterTerm()),
RemoteStoreUtils.invertLong(clusterMetadataManifest.getStateVersion()),
(clusterMetadataManifest.isCommitted() ? "C" : "P"), // C for committed and P for published
(clusterMetadataManifest.isCommitted() ? COMMITTED : PUBLISHED),
RemoteStoreUtils.invertLong(System.currentTimeMillis()),
String.valueOf(clusterMetadataManifest.getCodecVersion()) // Keep the codec version at last place only, during read we reads
// last place to
// determine codec version.
String.valueOf(clusterMetadataManifest.getCodecVersion())
// Keep the codec version at last place only, during we read last place to determine codec version.
);
this.blobFileName = blobFileName;
return blobFileName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ public class RemoteGlobalMetadata extends AbstractRemoteWritableBlobEntity<Metad
Metadata::fromXContent
);

private Metadata metadata;
private final String blobName;

public RemoteGlobalMetadata(
final String blobName,
final String clusterUUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void testGetUploadedMetadata() throws IOException {
try (InputStream inputStream = remoteObjectForUpload.serialize()) {
remoteObjectForUpload.setFullBlobName(new BlobPath().add(TEST_BLOB_PATH));
UploadedMetadata uploadedMetadata = remoteObjectForUpload.getUploadedMetadata();
assertThat(uploadedMetadata.getUploadedFilename(), is(remoteObjectForUpload.getFullBlobName()));
assertThat(uploadedMetadata.getUploadedFilename(), is(remoteObjectForUpload.getBlobFileName()));
}
}

Expand Down

0 comments on commit c492b18

Please sign in to comment.