You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/09 16:22:38 UTC

[GitHub] [spark] zsxwing opened a new pull request #29059: [SPARK-32256][SQL]Force to initialize Hadoop VersionInfo in HiveExternalCatalog

zsxwing opened a new pull request #29059:
URL: https://github.com/apache/spark/pull/29059


   ### What changes were proposed in this pull request?
   
   Force to initialize Hadoop VersionInfo in HiveExternalCatalog to make sure Hive can get the Hadoop version when using the isolated classloader.
   
   ### Why are the changes needed?
   
   This is a regression in Spark 3.0.0 because we switched the default Hive execution version from 1.2.1 to 2.3.7.
   
   Spark allows the user to set `spark.sql.hive.metastore.jars` to specify jars to access Hive Metastore. These jars are loaded by the isolated classloader. Because we also share Hadoop classes with the isolated classloader, the user doesn't need to add Hadoop jars to `spark.sql.hive.metastore.jars`, which means when we are using the isolated classloader, hadoop-common jar is not available in this case. If Hadoop VersionInfo is not initialized before we switch to the isolated classloader, and we try to initialize it using the isolated classloader (the current thread context classloader), it will fail and report `Unknown` which causes Hive to throw the following exception:
   
   ```
   08:49:33.242 ERROR org.apache.hadoop.hive.shims.ShimLoader: Error loading shims
   java.lang.RuntimeException: Illegal Hadoop Version: Unknown (expected A.B.* format)
   	at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion(ShimLoader.java:147)
   	at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:122)
   	at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:88)
   	at org.apache.hadoop.hive.metastore.ObjectStore.getDataSourceProps(ObjectStore.java:377)
   	at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:268)
   	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
   	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
   	at org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:58)
   	at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
   	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:517)
   	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:482)
   	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:544)
   	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:370)
   	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:78)
   	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:84)
   	at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5762)
   	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:219)
   	at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:67)
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
   	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1548)
   	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:86)
   	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:132)
   	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)
   	at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3080)
   	at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3108)
   	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:543)
   	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:511)
   	at org.apache.spark.sql.hive.client.HiveClientImpl.newState(HiveClientImpl.scala:175)
   	at org.apache.spark.sql.hive.client.HiveClientImpl.<init>(HiveClientImpl.scala:128)
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
   	at org.apache.spark.sql.hive.client.IsolatedClientLoader.createClient(IsolatedClientLoader.scala:301)
   	at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.scala:431)
   	at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.scala:324)
   	at org.apache.spark.sql.hive.HiveExternalCatalog.client$lzycompute(HiveExternalCatalog.scala:72)
   	at org.apache.spark.sql.hive.HiveExternalCatalog.client(HiveExternalCatalog.scala:71)
   ```
   
   Technically, This is indeed an issue of Hadoop VersionInfo which has been fixed: https://issues.apache.org/jira/browse/HADOOP-14067. But since we are still supporting old Hadoop versions, we should fix it.
   
   Why this issue starts to happen in Spark 3.0.0?
   
   In Spark 2.4.x, we use Hive 1.2.1 by default. It will trigger `VersionInfo` initialization in the static codes of `Hive` class. This will happen when we load `HiveClientImpl` class because `HiveClientImpl.clent` method refers to `Hive` class. At this moment, the thread context classloader is not using the isolcated classloader, so it can access hadoop-common jar on the classpath and initialize it correctly.
   
   In Spark 3.0.0, we use Hive 2.3.7. The static codes of `Hive` class are not accessing `VersionInfo` because of the change in https://issues.apache.org/jira/browse/HIVE-11657. Instead, accessing `VersionInfo` happens when creating a `Hive` object (See the above stack trace). This happens here https://github.com/apache/spark/blob/v3.0.0/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala#L260. But we switch to the isolated classloader before calling `HiveClientImpl.client` (See https://github.com/apache/spark/blob/v3.0.0/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala#L283). This is exactly what I mentioned above: `If Hadoop VersionInfo is not initialized before we switch to the isolated classloader, and we try to initialize it using the isolated classloader (the current thread context classloader), it will fail`
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   The new regression test added in this PR.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656525528






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656441762


   **[Test build #125518 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125518/testReport)** for PR 29059 at commit [`074db15`](https://github.com/apache/spark/commit/074db15d5193e495afe3bfb27f8a0c220652f38f).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656520188


   **[Test build #125558 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125558/testReport)** for PR 29059 at commit [`8f94ed6`](https://github.com/apache/spark/commit/8f94ed688ac39a761e043192b07821b2ff15a48d).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656380016






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656375151


   **[Test build #125510 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125510/testReport)** for PR 29059 at commit [`074db15`](https://github.com/apache/spark/commit/074db15d5193e495afe3bfb27f8a0c220652f38f).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zsxwing commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
zsxwing commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656498285


   Although the temp ivy directory adds 1 minute to the test on my laptop, I think it should be okay since SBT tests run in parallel. It would be pretty complicated to coordinate two tests in different JVMs and that's not worth for a one-line fix.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656499210






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656377731






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656380016






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656377731






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656375950


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/125510/
   Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656498937


   **[Test build #125558 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125558/testReport)** for PR 29059 at commit [`8f94ed6`](https://github.com/apache/spark/commit/8f94ed688ac39a761e043192b07821b2ff15a48d).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656498937


   **[Test build #125558 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125558/testReport)** for PR 29059 at commit [`8f94ed6`](https://github.com/apache/spark/commit/8f94ed688ac39a761e043192b07821b2ff15a48d).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656525528






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656527853


   **[Test build #125573 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125573/testReport)** for PR 29059 at commit [`8f94ed6`](https://github.com/apache/spark/commit/8f94ed688ac39a761e043192b07821b2ff15a48d).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656377532


   Retest this please.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656286733


   **[Test build #125510 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125510/testReport)** for PR 29059 at commit [`074db15`](https://github.com/apache/spark/commit/074db15d5193e495afe3bfb27f8a0c220652f38f).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656527853


   **[Test build #125573 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125573/testReport)** for PR 29059 at commit [`8f94ed6`](https://github.com/apache/spark/commit/8f94ed688ac39a761e043192b07821b2ff15a48d).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zsxwing commented on a change in pull request #29059: [SPARK-32256][SQL]Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
zsxwing commented on a change in pull request #29059:
URL: https://github.com/apache/spark/pull/29059#discussion_r452358594



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HadoopVersionInfoSuite.scala
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.sql.hive.client
+
+import java.io.File
+import java.net.URLClassLoader
+
+import org.apache.hadoop.conf.Configuration
+
+import org.apache.spark.{SparkConf, SparkFunSuite}
+import org.apache.spark.sql.hive.{HiveExternalCatalog, HiveUtils}
+
+/**
+ * This test suite requires a clean JVM because it's testing the initialization of static codes in
+ * `org.apache.hadoop.util.VersionInfo`.
+ */
+class HadoopVersionInfoSuite extends SparkFunSuite {
+  override protected val enableAutoThreadAudit = false
+
+  test("SPARK-32256: Hadoop VersionInfo should be preloaded") {
+    val hadoopConf = new Configuration()
+    hadoopConf.set("test", "success")
+    hadoopConf.set("datanucleus.schema.autoCreateAll", "true")
+    hadoopConf.set("hive.metastore.schema.verification", "false")
+
+    // Download jars for Hive 2.0
+    val client = IsolatedClientLoader.forVersion(
+      hiveMetastoreVersion = "2.0",
+      hadoopVersion = "2.7.4",
+      sparkConf = new SparkConf(),
+      hadoopConf = hadoopConf,
+      config = HiveClientBuilder.buildConf(Map.empty),
+      ivyPath = HiveClientBuilder.ivyPath,
+      sharesHadoopClasses = true)
+    val jars = client.classLoader.getParent.asInstanceOf[URLClassLoader].getURLs
+      .map(u => new File(u.toURI))
+      // Drop all Hadoop jars to use the existing Hadoop jars on the classpath

Review comment:
       Yep




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656442683


   Merged build finished. Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656635852


   **[Test build #125573 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125573/testReport)** for PR 29059 at commit [`8f94ed6`](https://github.com/apache/spark/commit/8f94ed688ac39a761e043192b07821b2ff15a48d).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656521779






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656284526


   Retest this please.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656375944


   Merged build finished. Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656442686


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/125518/
   Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656644231


   Merged to master and branch-3.0.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656499210






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zsxwing commented on a change in pull request #29059: [SPARK-32256][SQL]Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
zsxwing commented on a change in pull request #29059:
URL: https://github.com/apache/spark/pull/29059#discussion_r452360066



##########
File path: project/SparkBuild.scala
##########
@@ -476,6 +476,7 @@ object SparkParallelTestGrouping {
     "org.apache.spark.ml.classification.LogisticRegressionSuite",
     "org.apache.spark.ml.classification.LinearSVCSuite",
     "org.apache.spark.sql.SQLQueryTestSuite",
+    "org.apache.spark.sql.hive.client.HadoopVersionInfoSuite",

Review comment:
       This is fine. The test is not failing in maven build. In the maven build, it will still pass but won't be able to catch the issue.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656286733


   **[Test build #125510 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125510/testReport)** for PR 29059 at commit [`074db15`](https://github.com/apache/spark/commit/074db15d5193e495afe3bfb27f8a0c220652f38f).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656224434






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656524998


   retest this please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656375944






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon closed pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29059:
URL: https://github.com/apache/spark/pull/29059


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zsxwing commented on a change in pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
zsxwing commented on a change in pull request #29059:
URL: https://github.com/apache/spark/pull/29059#discussion_r452595141



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HadoopVersionInfoSuite.scala
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.sql.hive.client
+
+import java.io.File
+import java.net.URLClassLoader
+
+import org.apache.hadoop.conf.Configuration
+
+import org.apache.spark.{SparkConf, SparkFunSuite}
+import org.apache.spark.sql.hive.{HiveExternalCatalog, HiveUtils}
+
+/**
+ * This test suite requires a clean JVM because it's testing the initialization of static codes in
+ * `org.apache.hadoop.util.VersionInfo`.
+ */
+class HadoopVersionInfoSuite extends SparkFunSuite {
+  override protected val enableAutoThreadAudit = false
+
+  test("SPARK-32256: Hadoop VersionInfo should be preloaded") {
+    val hadoopConf = new Configuration()
+    hadoopConf.set("test", "success")
+    hadoopConf.set("datanucleus.schema.autoCreateAll", "true")
+    hadoopConf.set("hive.metastore.schema.verification", "false")
+
+    // Download jars for Hive 2.0
+    val client = IsolatedClientLoader.forVersion(
+      hiveMetastoreVersion = "2.0",
+      hadoopVersion = "2.7.4",
+      sparkConf = new SparkConf(),
+      hadoopConf = hadoopConf,
+      config = HiveClientBuilder.buildConf(Map.empty),
+      ivyPath = HiveClientBuilder.ivyPath,

Review comment:
       Just realized this will use the same ivy path as `HiveExternalCatalogVersionsSuite` on Jenkins.
   ```
   2020-07-09 17:21:08.423 - stdout> py4j.protocol.Py4JJavaError: An error occurred while calling o29.sql.
   2020-07-09 17:21:08.423 - stdout> : java.lang.NullPointerException
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:462)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1.doLoadClass(IsolatedClientLoader.scala:216)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1.loadClass(IsolatedClientLoader.scala:210)
   2020-07-09 17:21:08.423 - stdout> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
   2020-07-09 17:21:08.423 - stdout> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.client.IsolatedClientLoader.createClient(IsolatedClientLoader.scala:262)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.scala:385)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.scala:287)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.HiveExternalCatalog.client$lzycompute(HiveExternalCatalog.scala:66)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.HiveExternalCatalog.client(HiveExternalCatalog.scala:65)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply$mcZ$sp(HiveExternalCatalog.scala:195)
   2020-07-09 17:21:08.423 - stdout> 	at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:97)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveExternalCatalog.databaseExists(HiveExternalCatalog.scala:194)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.internal.SharedState.externalCatalog$lzycompute(SharedState.scala:114)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.internal.SharedState.externalCatalog(SharedState.scala:102)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveSessionStateBuilder.externalCatalog(HiveSessionStateBuilder.scala:39)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveSessionStateBuilder.catalog$lzycompute(HiveSessionStateBuilder.scala:54)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveSessionStateBuilder.catalog(HiveSessionStateBuilder.scala:52)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveSessionStateBuilder$$anon$1.<init>(HiveSessionStateBuilder.scala:69)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.hive.HiveSessionStateBuilder.analyzer(HiveSessionStateBuilder.scala:69)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.internal.BaseSessionStateBuilder$$anonfun$build$2.apply(BaseSessionStateBuilder.scala:293)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.internal.BaseSessionStateBuilder$$anonfun$build$2.apply(BaseSessionStateBuilder.scala:293)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.internal.SessionState.analyzer$lzycompute(SessionState.scala:79)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.internal.SessionState.analyzer(SessionState.scala:79)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.execution.QueryExecution.analyzed$lzycompute(QueryExecution.scala:57)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.execution.QueryExecution.analyzed(QueryExecution.scala:55)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:47)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:74)
   2020-07-09 17:21:08.424 - stdout> 	at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:642)
   2020-07-09 17:21:08.424 - stdout> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   2020-07-09 17:21:08.424 - stdout> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   2020-07-09 17:21:08.424 - stdout> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   2020-07-09 17:21:08.424 - stdout> 	at java.lang.reflect.Method.invoke(Method.java:498)
   2020-07-09 17:21:08.424 - stdout> 	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
   2020-07-09 17:21:08.424 - stdout> 	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
   2020-07-09 17:21:08.424 - stdout> 	at py4j.Gateway.invoke(Gateway.java:282)
   2020-07-09 17:21:08.424 - stdout> 	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
   2020-07-09 17:21:08.424 - stdout> 	at py4j.commands.CallCommand.execute(CallCommand.java:79)
   2020-07-09 17:21:08.424 - stdout> 	at py4j.GatewayConnection.run(GatewayConnection.java:238)
   2020-07-09 17:21:08.424 - stdout> 	at java.lang.Thread.run(Thread.java:748)
   ```
   Let me use a temp directory instead and see how long it will take if we don't share the same ivy path.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656379902


   **[Test build #125518 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125518/testReport)** for PR 29059 at commit [`074db15`](https://github.com/apache/spark/commit/074db15d5193e495afe3bfb27f8a0c220652f38f).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656521779


   Merged build finished. Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656442683






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656287131






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL]Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656224434






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656637125






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656637125






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656379902


   **[Test build #125518 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125518/testReport)** for PR 29059 at commit [`074db15`](https://github.com/apache/spark/commit/074db15d5193e495afe3bfb27f8a0c220652f38f).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29059: [SPARK-32256][SQL]Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29059:
URL: https://github.com/apache/spark/pull/29059#discussion_r452374622



##########
File path: project/SparkBuild.scala
##########
@@ -476,6 +476,7 @@ object SparkParallelTestGrouping {
     "org.apache.spark.ml.classification.LogisticRegressionSuite",
     "org.apache.spark.ml.classification.LinearSVCSuite",
     "org.apache.spark.sql.SQLQueryTestSuite",
+    "org.apache.spark.sql.hive.client.HadoopVersionInfoSuite",

Review comment:
       ah i see




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29059: [SPARK-32256][SQL]Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29059:
URL: https://github.com/apache/spark/pull/29059#discussion_r452359263



##########
File path: project/SparkBuild.scala
##########
@@ -476,6 +476,7 @@ object SparkParallelTestGrouping {
     "org.apache.spark.ml.classification.LogisticRegressionSuite",
     "org.apache.spark.ml.classification.LinearSVCSuite",
     "org.apache.spark.sql.SQLQueryTestSuite",
+    "org.apache.spark.sql.hive.client.HadoopVersionInfoSuite",

Review comment:
       AFAIK this only works for SBT. Maybe we need to disable the test by default to avoid breaking the maven build.
   
   cc @gengliangwang 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656521788


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/125558/
   Test FAILed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29059: [SPARK-32256][SQL][test-hadoop2.7] Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29059:
URL: https://github.com/apache/spark/pull/29059#issuecomment-656287131






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #29059: [SPARK-32256][SQL]Force to initialize Hadoop VersionInfo in HiveExternalCatalog

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29059:
URL: https://github.com/apache/spark/pull/29059#discussion_r452351545



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HadoopVersionInfoSuite.scala
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.sql.hive.client
+
+import java.io.File
+import java.net.URLClassLoader
+
+import org.apache.hadoop.conf.Configuration
+
+import org.apache.spark.{SparkConf, SparkFunSuite}
+import org.apache.spark.sql.hive.{HiveExternalCatalog, HiveUtils}
+
+/**
+ * This test suite requires a clean JVM because it's testing the initialization of static codes in
+ * `org.apache.hadoop.util.VersionInfo`.
+ */
+class HadoopVersionInfoSuite extends SparkFunSuite {
+  override protected val enableAutoThreadAudit = false
+
+  test("SPARK-32256: Hadoop VersionInfo should be preloaded") {
+    val hadoopConf = new Configuration()
+    hadoopConf.set("test", "success")
+    hadoopConf.set("datanucleus.schema.autoCreateAll", "true")
+    hadoopConf.set("hive.metastore.schema.verification", "false")
+
+    // Download jars for Hive 2.0
+    val client = IsolatedClientLoader.forVersion(
+      hiveMetastoreVersion = "2.0",
+      hadoopVersion = "2.7.4",
+      sparkConf = new SparkConf(),
+      hadoopConf = hadoopConf,
+      config = HiveClientBuilder.buildConf(Map.empty),
+      ivyPath = HiveClientBuilder.ivyPath,
+      sharesHadoopClasses = true)
+    val jars = client.classLoader.getParent.asInstanceOf[URLClassLoader].getURLs
+      .map(u => new File(u.toURI))
+      // Drop all Hadoop jars to use the existing Hadoop jars on the classpath

Review comment:
       Thank you for making this test case, @zsxwing . So, does this artificial dropping mimic the situation?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org