Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Mar 19, 2024

What changes were proposed in this pull request?

This PR aims to upgrade to Apache Hadoop 3.4.0 for Apache Spark 4.0.0.

Why are the changes needed?

To bring the new features like the following

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.

@github-actions github-actions bot added the BUILD label Mar 19, 2024
@dongjoon-hyun
Copy link
Member Author

Hi, @LuciferYang . I tried to search your previous PR , but couldn't find it. So, I recreated with your coauthor ship here.

If you want to re-open your PR, please let me know, @LuciferYang .

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Mar 19, 2024

BTW, I'll add the following based on the failed module, if needed.

    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcpkix-jdk18on</artifactId>
      <version>${bouncycastle.version}</version>
      <scope>test</scope>
    </dependency>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
What a big jar...:)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.... surprising

@LuciferYang
Copy link
Contributor

Hi, @LuciferYang . I tried to search your previous PR , but couldn't find it. So, I recreated with your coauthor ship here.

If you want to re-open your PR, please let me know, @LuciferYang .

Thanks @dongjoon-hyun ~ Let's use this one ~

@dongjoon-hyun
Copy link
Member Author

Got it. Thank you, @LuciferYang .

Copy link
Contributor

@LuciferYang LuciferYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM (pending test)

@dongjoon-hyun
Copy link
Member Author

@dongjoon-hyun dongjoon-hyun marked this pull request as ready for review March 20, 2024 14:55
@github-actions github-actions bot added the YARN label Mar 20, 2024

test("running Spark in yarn-cluster mode displays driver log links") {
// TODO(SPARK-47491): Re-enable `driver log links` test in YarnClusterSuite
ignore("running Spark in yarn-cluster mode displays driver log links") {
Copy link
Member Author

@dongjoon-hyun dongjoon-hyun Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll handle this later in SPARK-47491 because YARN-only test PR doesn't cause a full GitHub Action. It's more easier to fix it. Currently, this PR causes the full CI builds and it makes the investigation difficult.

@dongjoon-hyun
Copy link
Member Author

At the previous commit (https://github.com/dongjoon-hyun/spark/runs/22865082407), we already passed all tests except one YARN failure. And, the failed test case is ignored here. Let me merge this to move forward.

Thank you, @LuciferYang and @yaooqinn .

dongjoon-hyun added a commit that referenced this pull request Mar 28, 2024
### What changes were proposed in this pull request?

This PR aims to ban `AWS SKD for Java v1`. We migrated to v2 via the following.
- #45583
- #43510

### Why are the changes needed?

To ensure the migration to AWS SDK for Java v2 because of the following the end of support schedule. `v2` is strongly recommended since July.
- https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-java-v1-x-on-december-31-2025/
> AWS SDK for Java v1.x will enter maintenance mode on July 31, 2024, and reach end-of-support on December 31, 2025.

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

No, this PR only prevents mixing this old dependency in the future.

### How was this patch tested?

Pass the CIs.

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

No.

Closes #45759 from dongjoon-hyun/SPARK-47632.

Authored-by: Dongjoon Hyun <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@LuciferYang
Copy link
Contributor

Sorry to disturb everyone, but when I execute OrcEncryptionSuite on my M2 Max, I find that there are some differences when using Hadoop 3.4.0 and Hadoop 3.3.4.

build/sbt clean "sql/testOnly org.apache.spark.sql.execution.datasources.orc.OrcEncryptionSuite"

  • branch-3.5(with hadoop 3.3.4)
[info] OrcEncryptionSuite:
14:44:11.580 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
[info] - Write and read an encrypted file (1 second, 921 milliseconds)
[info] - Write and read an encrypted table (374 milliseconds)
[info] - SPARK-35325: Write and read encrypted nested columns (358 milliseconds)
[info] - SPARK-35992: Write and read fully-encrypted columns with default masking (570 milliseconds)
14:44:15.461 WARN org.apache.spark.sql.execution.datasources.orc.OrcEncryptionSuite: 

[info] Run completed in 4 seconds, 694 milliseconds.
[info] Total number of tests run: 4
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
  • master(with hadoop 3.4.0)
[info] OrcEncryptionSuite:
14:49:15.267 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14:49:17.636 WARN org.apache.hadoop.crypto.OpensslCipher: Failed to load OpenSSL Cipher.
java.lang.UnsatisfiedLinkError: 'boolean org.apache.hadoop.util.NativeCodeLoader.buildSupportsOpenssl()'
	at org.apache.hadoop.util.NativeCodeLoader.buildSupportsOpenssl(Native Method)
	at org.apache.hadoop.crypto.OpensslCipher.<clinit>(OpensslCipher.java:86)
	at org.apache.hadoop.crypto.OpensslAesCtrCryptoCodec.<init>(OpensslAesCtrCryptoCodec.java:36)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[info] - Write and read an encrypted file (2 seconds, 343 milliseconds)
[info] - Write and read an encrypted table (405 milliseconds)
[info] - SPARK-35325: Write and read encrypted nested columns (308 milliseconds)
[info] - SPARK-35992: Write and read fully-encrypted columns with default masking (555 milliseconds)
14:49:19.493 WARN org.apache.spark.sql.execution.datasources.orc.OrcEncryptionSuite: 

[info] Run completed in 5 seconds, 84 milliseconds.
[info] Total number of tests run: 4
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

When using Hadoop 3.4.0, although there were no test failures, an UnsatisfiedLinkError was thrown. Is this expected, or do I need to configure additional dependencies? This issue should only occur on Apple Silicon chips now. @dongjoon-hyun @steveloughran

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Jul 30, 2024

To @LuciferYang , have you try other combination like branch-3.4 + Hadoop 3.4 or master + 3.3.4? It seems that you are reporting only the difference on branches which could be a result of many other stuffs like ORC version difference or installed ssl versions.

I find that there are some differences when using Hadoop 3.4.0 and Hadoop 3.3.4.

In other words, I'm wondering if you are reporting that the result before this commit and after this commit, @LuciferYang . For your claim, could you share us that result?

@dongjoon-hyun dongjoon-hyun deleted the SPARK-45393 branch July 30, 2024 04:05
@LuciferYang
Copy link
Contributor

LuciferYang commented Jul 30, 2024

@dongjoon-hyun Test on master:

before this commit:

git reset --hard a34c8ceb19bd1c1548a60bb144d1c587a2861cd8 // [SPARK-47462][SQL] Align mappings of other unsigned numeric types with TINYINT in MySQLDialect
build/sbt clean "sql/testOnly org.apache.spark.sql.execution.datasources.orc.OrcEncryptionSuite"

result:

[info] OrcEncryptionSuite:
12:47:33.148 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
[info] - Write and read an encrypted file (2 seconds, 117 milliseconds)
[info] - Write and read an encrypted table (375 milliseconds)
[info] - SPARK-35325: Write and read encrypted nested columns (275 milliseconds)
[info] - SPARK-35992: Write and read fully-encrypted columns with default masking (517 milliseconds)
12:47:37.058 WARN org.apache.spark.sql.execution.datasources.orc.OrcEncryptionSuite: 

===== POSSIBLE THREAD LEAK IN SUITE o.a.s.sql.execution.datasources.orc.OrcEncryptionSuite, threads: ForkJoinPool.commonPool-worker-4 (daemon=true), rpc-boss-3-1 (daemon=true), Thread-17 (daemon=true), ForkJoinPool.commonPool-worker-2 (daemon=true), shuffle-boss-6-1 (daemon=true), ForkJoinPool.commonPool-worker-1 (daemon=true), Thread-18 (daemon=true), ForkJoinPool.commonPool-worker-3 (daemon=true) =====
[info] Run completed in 4 seconds, 760 milliseconds.
[info] Total number of tests run: 4
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

after this commit:

git reset --hard 49b4c3bc9c09325de941dfaf41e4fd3a4a4c345f // [SPARK-45393][BUILD] Upgrade Hadoop to 3.4.0
build/sbt clean "sql/testOnly org.apache.spark.sql.execution.datasources.orc.OrcEncryptionSuite"

result:

[info] OrcEncryptionSuite:
12:42:55.441 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
12:42:57.950 WARN org.apache.hadoop.crypto.OpensslCipher: Failed to load OpenSSL Cipher.
java.lang.UnsatisfiedLinkError: 'boolean org.apache.hadoop.util.NativeCodeLoader.buildSupportsOpenssl()'
	at org.apache.hadoop.util.NativeCodeLoader.buildSupportsOpenssl(Native Method)
	at org.apache.hadoop.crypto.OpensslCipher.<clinit>(OpensslCipher.java:86)
	at org.apache.hadoop.crypto.OpensslAesCtrCryptoCodec.<init>(OpensslAesCtrCryptoCodec.java:36)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[info] - Write and read an encrypted file (2 seconds, 486 milliseconds)
[info] - Write and read an encrypted table (402 milliseconds)
[info] - SPARK-35325: Write and read encrypted nested columns (299 milliseconds)
[info] - SPARK-35992: Write and read fully-encrypted columns with default masking (623 milliseconds)
12:42:59.856 WARN org.apache.spark.sql.execution.datasources.orc.OrcEncryptionSuite: 

===== POSSIBLE THREAD LEAK IN SUITE o.a.s.sql.execution.datasources.orc.OrcEncryptionSuite, threads: rpc-boss-3-1 (daemon=true), Thread-17 (daemon=true), ForkJoinPool.commonPool-worker-2 (daemon=true), shuffle-boss-6-1 (daemon=true), ForkJoinPool.commonPool-worker-1 (daemon=true), Thread-18 (daemon=true), ForkJoinPool.commonPool-worker-3 (daemon=true) =====
[info] Run completed in 5 seconds, 291 milliseconds.
[info] Total number of tests run: 4
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

screenshot of git log:

image

@dongjoon-hyun
Copy link
Member Author

Ack. Thank you for sharing. Let me take a look at that as a independent JIRA issue because it's Mac only issue, @LuciferYang .

@dongjoon-hyun
Copy link
Member Author

SPARK-49055 is filed, @LuciferYang .

@LuciferYang
Copy link
Contributor

Ack. Thank you for sharing. Let me take a look at that as a independent JIRA issue because it's Mac only issue, @LuciferYang .

@dongjoon-hyun I apologize for providing misleading information. I just reviewed the recent GA test logs and I found that this is not a Mac Only issue:

image

@dongjoon-hyun
Copy link
Member Author

To @LuciferYang , according to the Hadoop code, HADOOP-17982 seems to change the log level only at Hadoop 3.4.0.

https://github.com/apache/hadoop/pull/3599/files

@dongjoon-hyun
Copy link
Member Author

There is no functional change in Hadoop code since last 10 year except the above log level change. Given that, we can ignore the warning message. WDYT, @LuciferYang ?

@LuciferYang
Copy link
Contributor

@dongjoon-hyun Thank you for your explanation, agree with you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants