Skip to content

Commit

Permalink
[hotfix][runtime] Remove unneeded requestTaskManagerFileUploadByName (a…
Browse files Browse the repository at this point in the history
…pache#24386)

ResourceManagerGateway is internal class, so the deprecated method can be removed directly.
  • Loading branch information
1996fanrui authored Mar 1, 2024
1 parent f523b9d commit f88f750
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -810,13 +810,6 @@ public CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByType(
}
}

@Override
public CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByName(
ResourceID taskManagerId, String fileName, Time timeout) {
return requestTaskManagerFileUploadByNameAndType(
taskManagerId, fileName, FileType.LOG, Duration.ofMillis(timeout.toMilliseconds()));
}

@Override
public CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByNameAndType(
ResourceID taskManagerId, String fileName, FileType fileType, Duration timeout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,6 @@ CompletableFuture<TaskManagerInfoWithSlots> requestTaskManagerDetailsInfo(
CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByType(
ResourceID taskManagerId, FileType fileType, @RpcTimeout Time timeout);

/**
* Request the file upload from the given {@link TaskExecutor} to the cluster's {@link
* BlobServer}. The corresponding {@link TransientBlobKey} is returned. To support different
* type file upload with name, using {@link
* ResourceManager#requestTaskManagerFileUploadByNameAndType} as instead.
*
* @param taskManagerId identifying the {@link TaskExecutor} to upload the specified file
* @param fileName name of the file to upload
* @param timeout for the asynchronous operation
* @return Future which is completed with the {@link TransientBlobKey} after uploading the file
* to the {@link BlobServer}.
* @deprecated use {@link #requestTaskManagerFileUploadByNameAndType(ResourceID, String,
* FileType, Duration)} as instead.
*/
@Deprecated
CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByName(
ResourceID taskManagerId, String fileName, @RpcTimeout Time timeout);

/**
* Request the file upload from the given {@link TaskExecutor} to the cluster's {@link
* BlobServer}. The corresponding {@link TransientBlobKey} is returned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ public class TestingResourceManagerGateway implements ResourceManagerGateway {
private volatile Function<Tuple2<ResourceID, FileType>, CompletableFuture<TransientBlobKey>>
requestTaskManagerFileUploadByTypeFunction;

private volatile Function<Tuple2<ResourceID, String>, CompletableFuture<TransientBlobKey>>
requestTaskManagerFileUploadByNameFunction;

private volatile Function<
Tuple3<ResourceID, String, FileType>, CompletableFuture<TransientBlobKey>>
requestTaskManagerFileUploadByNameAndTypeFunction;
Expand Down Expand Up @@ -192,13 +189,6 @@ public void setRequestTaskManagerFileUploadByTypeFunction(
requestTaskManagerFileUploadByTypeFunction;
}

public void setRequestTaskManagerFileUploadByNameFunction(
Function<Tuple2<ResourceID, String>, CompletableFuture<TransientBlobKey>>
requestTaskManagerFileUploadByNameFunction) {
this.requestTaskManagerFileUploadByNameFunction =
requestTaskManagerFileUploadByNameFunction;
}

public void setRequestTaskManagerFileUploadByNameAndTypeFunction(
Function<Tuple3<ResourceID, String, FileType>, CompletableFuture<TransientBlobKey>>
requestTaskManagerFileUploadByNameAndTypeFunction) {
Expand Down Expand Up @@ -458,19 +448,6 @@ public CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByType(
}
}

@Override
public CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByName(
ResourceID taskManagerId, String fileName, Time timeout) {
final Function<Tuple2<ResourceID, String>, CompletableFuture<TransientBlobKey>> function =
requestTaskManagerFileUploadByNameFunction;

if (function != null) {
return function.apply(Tuple2.of(taskManagerId, fileName));
} else {
return CompletableFuture.completedFuture(new TransientBlobKey());
}
}

@Override
public CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByNameAndType(
ResourceID taskManagerId, String fileName, FileType fileType, Duration timeout) {
Expand Down

0 comments on commit f88f750

Please sign in to comment.