Skip to content

Commit

Permalink
Remove redundant stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie Guo committed Aug 17, 2023
1 parent 90af4af commit a6b696c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public interface NamedBlobDb extends Closeable {
*/
CompletableFuture<NamedBlobRecord> get(String accountName, String containerName, String blobName, GetOption option);


/**
* Look up a {@link NamedBlobRecord} by name.
* @param accountName the name of the account.
Expand Down
5 changes: 0 additions & 5 deletions ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,6 @@ public static final class InternalKeys {
* The version for the NamedBlob record in MySQL DB
*/
public static final String NAMED_BLOB_VERSION = KEY_PREFIX + "named-blob-version";

/**
* The blob id for the NamedBlob record in MySQL DB.
*/
public static final String NAMED_BLOB_MAPPED_ID = KEY_PREFIX + "named-blob-mapped-id";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.github.ambry.utils.Utils.*;


/**
* Factory that instantiates an {@link IdConverter} implementation for the frontend.
Expand Down Expand Up @@ -184,7 +182,7 @@ private CompletionStage<String> convertId(String input, RestRequest restRequest,
NamedBlobRecord record = new NamedBlobRecord(namedBlobPath.getAccountName(), namedBlobPath.getContainerName(),
namedBlobPath.getBlobName(), blobId, expirationTimeMs);
NamedBlobState state = NamedBlobState.READY;
if (properties.getTimeToLiveInSeconds() == Infinite_Time) {
if (properties.getTimeToLiveInSeconds() == Utils.Infinite_Time) {
// Set named blob state as 'IN_PROGRESS', will set the state to be 'READY' in the ttlUpdate success callback: routerTtlUpdateCallback
state = NamedBlobState.IN_PROGRESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,6 @@ public CompletableFuture<PutResult> ttlUpdate(NamedBlobRecord record, NamedBlobS
return executeTransactionAsync(record.getAccountName(), record.getContainerName(), true,
(accountId, containerId, connection) -> {
long startTime = this.time.milliseconds();
// Do upsert when it's using new table and 'x-ambry-named-upsert' header is not set to false (default is true)
logger.trace("NamedBlobPutInfo: accountId='{}', containerId='{}', blobName='{}'", accountId, containerId,
record.getBlobName());
//for ttl update, get the blob id first before insert a new record.
Expand Down

0 comments on commit a6b696c

Please sign in to comment.