-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-36266][SHUFFLE] Rename classes in shuffle RPC used for block push operations #33340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a033dbf
1052790
994f66e
2c0b5c9
3dff827
c4b655b
0839512
8410b85
a951368
efba5d1
a590947
f1db4dd
1d40d59
9c418f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.spark.network.shuffle; | ||
|
|
||
| import org.apache.spark.network.buffer.ManagedBuffer; | ||
|
|
||
| /** | ||
| * Callback to handle block push success and failure. This interface and | ||
| * {@link BlockFetchingListener} are unified under {@link BlockTransferListener} to allow | ||
| * code reuse for handling block push and fetch retry. | ||
| */ | ||
| public interface BlockPushingListener extends BlockTransferListener { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Are we keeping
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, but
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| /** | ||
| * Called once per successfully pushed block. After this call returns, data will be released | ||
| * automatically. If the data will be passed to another thread, the receiver should retain() | ||
| * and release() the buffer on their own, or copy the data to a new buffer. | ||
| */ | ||
| void onBlockPushSuccess(String blockId, ManagedBuffer data); | ||
|
|
||
| /** | ||
| * Called at least once per block upon failures. | ||
| */ | ||
| void onBlockPushFailure(String blockId, Throwable exception); | ||
|
|
||
| @Override | ||
| default void onBlockTransferSuccess(String blockId, ManagedBuffer data) { | ||
| onBlockPushSuccess(blockId, data); | ||
| } | ||
|
|
||
| @Override | ||
| default void onBlockTransferFailure(String blockId, Throwable exception) { | ||
| onBlockPushFailure(blockId, exception); | ||
| } | ||
|
|
||
| @Override | ||
| default String getTransferType() { | ||
| return "push"; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.spark.network.shuffle; | ||
|
|
||
| import java.util.EventListener; | ||
|
|
||
| import org.apache.spark.network.buffer.ManagedBuffer; | ||
|
|
||
| /** | ||
| * This interface unifies both {@link BlockFetchingListener} and {@link BlockPushingListener} | ||
| * under a single interface to allow code reuse, while also keeping the existing public interface | ||
| * to facilitate backward compatibility. | ||
| */ | ||
| public interface BlockTransferListener extends EventListener { | ||
| /** | ||
| * Called once per successfully transferred block. | ||
| */ | ||
| void onBlockTransferSuccess(String blockId, ManagedBuffer data); | ||
|
|
||
| /** | ||
| * Called at least once per block transfer failures. | ||
| */ | ||
| void onBlockTransferFailure(String blockId, Throwable exception); | ||
|
|
||
| /** | ||
| * Return a string indicating the type of the listener such as fetch, push, or something else | ||
| */ | ||
| String getTransferType(); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.