This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new b86053c430e5 [SPARK-46846][CORE] Make `WorkerResourceInfo` extend 
`Serializable` explicitly
b86053c430e5 is described below

commit b86053c430e5e1411467bdc1f0ddb337ca01649f
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed Jan 24 15:49:23 2024 -0800

    [SPARK-46846][CORE] Make `WorkerResourceInfo` extend `Serializable` 
explicitly
    
    ### What changes were proposed in this pull request?
    
    This PR aims to make `WorkerResourceInfo` extend `Serializable` interface 
explicitly.
    
    - 
https://docs.oracle.com/en/java/javase/17/docs/specs/serialization/serial-arch.html
    > A Serializable class must do the following:
    >   - Implement the `java.io.Serializable` interface
    
    ### Why are the changes needed?
    
    `WorkerInfo` extends `Serializable` and has `WorkerResourceInfo` as data.
    
https://github.com/apache/spark/blob/1f23edfa84aa3318791d5fbbbae22d479a49134a/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala#L49-L58
    
    `WorkerInfo` itself has no data field, but inherits `ResourceAllocator` 
which has data.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #44873 from dongjoon-hyun/SPARK-46846.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala 
b/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala
index bdc9e9c6106c..a20adcbddc24 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala
@@ -25,7 +25,7 @@ import org.apache.spark.rpc.RpcEndpointRef
 import org.apache.spark.util.Utils
 
 private[spark] case class WorkerResourceInfo(name: String, addresses: 
Seq[String])
-  extends ResourceAllocator {
+  extends Serializable with ResourceAllocator {
 
   override protected def resourceName = this.name
   override protected def resourceAddresses = this.addresses


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to