[
https://issues.apache.org/jira/browse/SPARK-54547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
duanshilong updated SPARK-54547:
--------------------------------
Description:
Rename hostPort to host because executorIdToHost stores only the hostname (or
IP), not the host:port combination. This improves code clarity and prevents
potential misuse.
{code:scala}
// TaskSchedulerImpl.resourceOffers
executorIdToHost(o.executorId) = o.host
{code}
so, when we get host from executorIdToHost, we should us host instead of
hostPort.
{code:scala}
// TaskSchedulerImpl.executorLost
val hostPort = executorIdToHost(executorId)
{code}
was:
Rename hostPort to host because executorIdToHost stores only the hostname (or
IP), not the host:port combination. This improves code clarity and prevents
potential misuse.
{code:scala}
executorIdToHost(o.executorId) = o.host
{code}
so, when we get host from executorIdToHost, we should us host instead of
hostPort.
{code:scala}
val hostPort = executorIdToHost(executorId)
{code}
> Use port instead of hostPort
> ----------------------------
>
> Key: SPARK-54547
> URL: https://issues.apache.org/jira/browse/SPARK-54547
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 4.0.0
> Reporter: duanshilong
> Priority: Major
>
> Rename hostPort to host because executorIdToHost stores only the hostname (or
> IP), not the host:port combination. This improves code clarity and prevents
> potential misuse.
> {code:scala}
> // TaskSchedulerImpl.resourceOffers
> executorIdToHost(o.executorId) = o.host
> {code}
> so, when we get host from executorIdToHost, we should us host instead of
> hostPort.
> {code:scala}
> // TaskSchedulerImpl.executorLost
> val hostPort = executorIdToHost(executorId)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]