Skip to content

Conversation

@aihex
Copy link

@aihex aihex commented Apr 20, 2015

This will make the “fold” function consistent with the "fold" in rdd.scala and other "aggregate" functions where “acc” goes first. Otherwise, users have to write a lambda function like “lambda x, y: op(y, x)” if they want to use “zeroValue” to change the result type.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@srowen
Copy link
Member

srowen commented Apr 20, 2015

I think that's right that it would be more consistent, in that this is how the Scala function that's ultimately called for RDD.fold looks:

  def foldLeft[B](z: B)(op: (B, A) => B): B = {
    var result = z
    this.seq foreach (x => result = op(result, x))
    result
  }

Elements are passed as the second arguments. The operation is commutative but it matters here since the operation is only supposed to modify the first arg.

Why does this affect your ability to make a differently typed result? You need aggregate for that anyway I thought.

CC @JoshRosen as initial author

@aihex
Copy link
Author

aihex commented Apr 20, 2015

@JoshRosen

I just follow the example of NAStatCounter in the book of "Advanced Analysis with Spark". NAStatCounter is supposed to get stats of a dataset where some missing values exist.

Instead of using scala the same as the book, I use python to reimplement that. My code follows.

class NAStatCounter(object):

    def __init__(self):
        self.stats = StatCounter()
        self.missing = 0

    def add(self, x):
        if not x:
            self.missing += 1
        elif isinstance(x, NAStatCounter):
            self.stats.mergeStats(x.stats)
            self.missing += x.missing
        else:
            self.stats.merge(float(str(x)))
        return self

    def __str__(self):
        return 'stats: ' + str(self.stats) + ' missing: ' + str(self.missing)

    def __repr__(self):
        return self.__str__()

Here I make up a dummy dataset and the do the stats.

rdd = sc.parallelize(['1,,2', ',3,1', '1,2,'])
na_stat = rdd.map(lambda x: x.split(','))
z = [NAStatCounter for i in xrange(3)]
op = lambda x, y: map(lambda a: a[0].add(a[1]), zip(x, y))
result = na_stat.fold(z, op)

Then I get the error like "'str' object has no attribute 'add'" because it has op('1', NAStatCounter()) in the "fold" implementation. In the specified lambda function, it becomes '1'.add(NAStatCounter()). However, it's expected to be NAStatCounter().add('1').

As you mentioned, only the first argument can be modified and I guess it should be the provided "zeroValue" and the element are the second argument which is not allowed to be changed.

Intuitively, users specify the "zeroValue" as "x" and elements as "y" in the lambda function. To correct that, I have to change op to

op = lambda x, y: map(lambda a: a[0].add(a[1]), zip(y, x))

That's kind of anti-intuitive and inconsistant with its counterpart in scala just as the example in "Advanced Analysis with Spark".

@JoshRosen
Copy link
Contributor

I agree that swapping the order of the function arguments makes more sense, but at this point I wonder whether it's safe to change this. The old code has been around since Spark 0.7 or something and it's possible that someone could be relying on the existing confusing behavior. Maybe we should just point out this inconsistency in the docs.

@srowen
Copy link
Member

srowen commented Apr 20, 2015

This feels like it should be tracked as a JIRA, even if one targeted at version 2+ only to actually change.

@aihex
Copy link
Author

aihex commented Apr 20, 2015

Thanks for replying. I guess it might be better to remain it unchanged and point it out at docs. I will be trying to do the modification at the doc.

aihex pushed a commit to aihex/spark that referenced this pull request Apr 20, 2015
According to the discussion in apache#5587, it’s necessary to point out the
lambda function in “fold” needs to take the opposite order.
@aihex aihex force-pushed the master branch 2 times, most recently from ae08714 to 555731d Compare April 21, 2015 20:58
@aihex aihex closed this Apr 22, 2015
roczei added a commit to roczei/spark that referenced this pull request Aug 14, 2024
What changes were proposed in this pull request?

This PR aims to upgrade okio from 1.15.0 to 1.17.6.

Why are the changes needed?

Okio 1.15.0 is vulnerable due to CVE-2023-3635, details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

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.
yaooqinn pushed a commit that referenced this pull request Aug 15, 2024
### What changes were proposed in this pull request?

This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

### Why are the changes needed?

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 #5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 #5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

### 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 #47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
roczei added a commit to roczei/spark that referenced this pull request Aug 15, 2024
Backport apache#47758 to 3.5

This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)
roczei added a commit to roczei/spark that referenced this pull request Aug 15, 2024
Backport apache#47758 to 3.4

This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)
yaooqinn pushed a commit that referenced this pull request Aug 16, 2024
Backport #47758 to 3.5

### What changes were proposed in this pull request?

This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

### Why are the changes needed?

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 #5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 #5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227 https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

### 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 #47769 from roczei/roczei/SPARK-45590-branch-3.5.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
yaooqinn pushed a commit that referenced this pull request Aug 16, 2024
Backport #47758 to 3.4

### What changes were proposed in this pull request?

This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

### Why are the changes needed?

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 #5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 #5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227 https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

### 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 #47770 from roczei/SPARK-45590-branch-3.4.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
prabhjyotsingh pushed a commit to acceldata-io/spark3 that referenced this pull request Feb 7, 2025
This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)
prabhjyotsingh added a commit to acceldata-io/spark3 that referenced this pull request Feb 7, 2025
…t in spark (#66)

* ODP-3237: Fix compile

* [SPARK-44537][BUILD] Upgrade kubernetes-client to 6.8.0

The pr aims to upgrade kubernetes-client from 6.7.2 to 6.8.0.

- The newest version brings some bug fixed & improvment, eg:
Fix fabric8io/kubernetes-client#5221: Empty kube config file causes NPE
Fix fabric8io/kubernetes-client#5281: Ensure the KubernetesCrudDispatcher's backing map is accessed w/lock
Fix fabric8io/kubernetes-client#5298: Prevent requests needing authentication from causing a 403 response
Fix fabric8io/kubernetes-client#5233: Generalized SchemaSwap to allow for cycle expansion
Fix fabric8io/kubernetes-client#5262: all built-in collections will omit empty in their serialized form.

- The full release notes:
https://github.com/fabric8io/kubernetes-client/releases/

No.

Pass GA.

Closes apache#42142 from panbingkun/SPARK-44537.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 6b6216c)

* [SPARK-44821][BUILD][K8S] Upgrade `kubernetes-client` to 6.8.1

### What changes were proposed in this pull request?

This PR aims to upgrade kubernetes-client to 6.8.1

### Why are the changes needed?

To bring two additional bug fixes.
- https://github.com/fabric8io/kubernetes-client/releases/tag/v6.8.1

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs.

Closes apache#42505 from dongjoon-hyun/SPARK-44821.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit e25a654)

* [SPARK-45465][BUILD][K8S] Upgrade `kubernetes-client` to 6.9.0 for K8s 1.28

This PR aims to upgrade `kubernetes-client` to 6.9.0 for K8s 1.28.

`kubernetes-client` 6.9.0 includes new features and bug fixes on top of K8s 1.23 model.
- https://github.com/fabric8io/kubernetes-client/releases/tag/v6.9.0
- fabric8io/kubernetes-client#5401

No.

Pass the CIs.

No.

Closes apache#43284 from dongjoon-hyun/SPARK-45465.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 89acebb)

* [SPARK-45728][BUILD][K8S] Upgrade `kubernetes-client` to 6.9.1

### What changes were proposed in this pull request?

This PR aims to upgrade `kubernetes-client` to 6.9.1.

### Why are the changes needed?

This will bring us the following bug fixes including the CRD generator fix.
- https://github.com/fabric8io/kubernetes-client/releases/tag/v6.9.1
  - Fix fabric8io/kubernetes-client#5501: (crd-generator) Fix fallback value of Default annotation in presence of multiple accessors

### 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 apache#43589 from dongjoon-hyun/SPARK-45728.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 311602a)

* [SPARK-46662][K8S][BUILD] Upgrade `kubernetes-client` to 6.10.0

Upgrade `kubernetes-client` from 6.9.1 to 6.10.0
[Release notes 6.10.0](https://github.com/fabric8io/kubernetes-client/releases/tag/v6.10.0)
[Release notes 6.9.2](https://github.com/fabric8io/kubernetes-client/releases/tag/v6.9.2)

[Updated okio to version 1.17.6 to avoid CVE-2023-3635](fabric8io/kubernetes-client#5587)
[Upgrade Kubernetes Model to Kubernetes v1.29.0](fabric8io/kubernetes-client#5686)

No.

Pass GA

No.

Closes apache#44672 from bjornjorgensen/kubclient6.10.

Authored-by: Bjørn Jørgensen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit dcfd37c)

* [SPARK-47550][K8S][BUILD] Update `kubernetes-client` to 6.11.0

### What changes were proposed in this pull request?
Update `kubernetes-client` from 6.10.0 to 6.11.0

### Why are the changes needed?

[Release notes for 6.11.0](https://github.com/fabric8io/kubernetes-client/releases/tag/v6.11.0)

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#45707 from bjornjorgensen/kub-client6.11.0.

Authored-by: Bjørn Jørgensen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 7b9b3cb)

* [SPARK-47860][BUILD][K8S] Upgrade `kubernetes-client` to 6.12.0

### What changes were proposed in this pull request?

This PR aims to upgrade `kubernetes-client` to 6.12.0.

### Why are the changes needed?

To bring the latest bug fixes.
- https://github.com/fabric8io/kubernetes-client/releases/tag/v6.12.0

### 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 apache#46066 from dongjoon-hyun/SPARK-47860.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit becbca6)

* [SPARK-47915][BUILD][K8S] Upgrade `kubernetes-client` to 6.12.1

### What changes were proposed in this pull request?
Upgrade `kubernetes-client` from 6.12.0 to 6.12.1

### Why are the changes needed?
[Release notes](https://github.com/fabric8io/kubernetes-client/releases/tag/v6.12.1)

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#46137 from bjornjorgensen/kub-client6.12.1.

Authored-by: Bjørn Jørgensen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 8aa8ad6)

* [SPARK-48514][BUILD][K8S] Upgrade `kubernetes-client` to 6.13.0

### What changes were proposed in this pull request?
Upgrade kubernetes-client from 6.12.1 to 6.13.0

### Why are the changes needed?
Upgrade Fabric8 Kubernetes Model to Kubernetes v1.30.0
[Release log 6.13.0](https://github.com/fabric8io/kubernetes-client/releases/tag/v6.13.0)

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#46854 from bjornjorgensen/kubclient6.13.0.

Authored-by: Bjørn Jørgensen <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 6475ddf)

* [SPARK-48801][BUILD][K8S] Upgrade `kubernetes-client` to 6.13.1

### What changes were proposed in this pull request?
The pr aims to upgrade `kubernetes-client` from `6.13.0` to `6.13.1`.

### Why are the changes needed?
- The full release notes: https://github.com/fabric8io/kubernetes-client/releases/tag/v6.13.1
- The newest version fixed some bug, eg:
  Fix fabric8io/kubernetes-client#6059: Swallow rejected execution from internal usage of the informer executor
  Fix fabric8io/kubernetes-client#6068: KubernetesMockServer provides incomplete Configuration while creating test Config for KubernetesClient
  Fix fabric8io/kubernetes-client#6085: model getters have same annotations as fields (breaks native)

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#47206 from panbingkun/SPARK-48801.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 5b00786)

* [SPARK-49196][BUILD] Upgrade `kubernetes-client` to 6.13.2

### What changes were proposed in this pull request?
The pr aims to upgrade `kubernetes-client` from `6.13.1` to `6.13.2`.

### Why are the changes needed?
- The full release notes: https://github.com/fabric8io/kubernetes-client/releases/tag/v6.13.2
- The newest version fixed some bug, eg:
  Fix fabric8io/kubernetes-client#6066: Added support for missing v1.APIVersions in KubernetesClient
  Fix fabric8io/kubernetes-client#6110: VolumeSource (and other file mode fields) in Octal are correctly interpreted
  Fix fabric8io/kubernetes-client#6137: ConfigBuilder.withAutoConfigure is not working

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#47703 from panbingkun/SPARK-49196.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit d09e1c5)

* [SPARK-45590][BUILD] Upgrade okio to 1.17.6 from 1.15.0

This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)

* [SPARK-49255][BUILD][K8S] Upgrade `kubernetes-client` to 6.13.3

### What changes were proposed in this pull request?

This PR aims to upgrade `kubernetes-client` to 6.13.3.

### Why are the changes needed?

Unfortunately, there is an important bug fix after we upgraded to 6.13.2. This PR aims to bring the fix.
- https://github.com/fabric8io/kubernetes-client/releases/tag/v6.13.3
  - fabric8io/kubernetes-client#6249
  - fabric8io/kubernetes-client@1a66228

### 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 apache#47782 from dongjoon-hyun/SPARK-49255.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 7a670d7)

* [SPARK-49800][BUILD][K8S] Upgrade `kubernetes-client` to 6.13.4

### What changes were proposed in this pull request?
Upgrade `kubernetes-client` from 6.13.3 to 6.13.4

### Why are the changes needed?
New version that have 5 fixes
[Release log 6.13.4](https://github.com/fabric8io/kubernetes-client/releases/tag/v6.13.4)

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#48268 from bjornjorgensen/k8sclient6.13.4.

Authored-by: Bjørn Jørgensen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 54e62a1)

* [SPARK-50493][SPARK-37687][BUILD] Migrate kubernetes-client from `6.x` to `7.x`

The pr aims to migrate kubernetes-client from `6.x` to `7.x`, includes:
- upgrade `kubernetes-client` from `6.13.2` to `7.0.1`.
- switch default `HttpClient` implementation from `OkHttp` to `Vert.x`.

- The full release notes:
  https://github.com/fabric8io/kubernetes-client/releases/tag/v7.0.1
  https://github.com/fabric8io/kubernetes-client/releases/tag/v7.0.0
- [Vert.x as default HttpClient implementation](https://github.com/fabric8io/kubernetes-client/blob/v7.0.0/doc/MIGRATION-v7.md#vertx-as-default-httpclient-implementation-)

No.

Pass GA.

No.

Closes apache#49159 from panbingkun/k8s_client_7_vert_x.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit dccb129)

---------

Co-authored-by: panbingkun <[email protected]>
Co-authored-by: Dongjoon Hyun <[email protected]>
Co-authored-by: Dongjoon Hyun <[email protected]>
Co-authored-by: Bjørn Jørgensen <[email protected]>
Co-authored-by: panbingkun <[email protected]>
Co-authored-by: Gabor Roczei <[email protected]>
Co-authored-by: panbingkun <[email protected]>
prabhjyotsingh pushed a commit to acceldata-io/spark3 that referenced this pull request Feb 7, 2025
This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)
prabhjyotsingh pushed a commit to acceldata-io/spark3 that referenced this pull request Feb 7, 2025
This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)
prabhjyotsingh pushed a commit to acceldata-io/spark3 that referenced this pull request Feb 7, 2025
This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)
(cherry picked from commit 6616025)
shubhluck pushed a commit to acceldata-io/spark3 that referenced this pull request May 16, 2025
This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227
https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47758 from roczei/SPARK-45590.

Authored-by: Gabor Roczei <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit c8cf394)
(cherry picked from commit 6616025)
turboFei pushed a commit to turboFei/spark that referenced this pull request Nov 6, 2025
)

Backport apache#47758 to 3.5

This PR aims to upgrade `okio` from 1.15.0 to 1.17.6.

Okio 1.15.0 is vulnerable due to CVE-2023-3635,  details: https://nvd.nist.gov/vuln/detail/CVE-2023-3635

Previous attempts to fix this security issue:

Update okio to version 1.17.6 apache#5587: fabric8io/kubernetes-client#5587
Followup to Update okio to version 1.17.6 apache#5935: fabric8io/kubernetes-client#5935

Unfortunately it is still using 1.15.0:

https://github.com/apache/spark/blob/v4.0.0-preview1/dev/deps/spark-deps-hadoop-3-hive-2.3#L227 https://github.com/apache/spark/blob/v3.5.2/dev/deps/spark-deps-hadoop-3-hive-2.3#L210

No.

Pass the CIs.

No.

Closes apache#47769 from roczei/roczei/SPARK-45590-branch-3.5.

Authored-by: Gabor Roczei <[email protected]>

Signed-off-by: Kent Yao <[email protected]>
Co-authored-by: Gabor Roczei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants