You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/04/19 11:20:44 UTC

[GitHub] [spark] pan3793 opened a new pull request, #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

pan3793 opened a new pull request, #40848:
URL: https://github.com/apache/spark/pull/40848

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Remove `org.apache.spark.sql.hive.HiveShim.ShimFileSinkDesc`, which is used to address serializable issue of `org.apache.hadoop.hive.ql.plan.FileSinkDesc`
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   [HIVE-6171](https://issues.apache.org/jira/browse/HIVE-6171) changed `FileSinkDesc`'s property from `String dirName` to `Path dirName`, and the `Path` is not serializable until [HADOOP-13519](https://issues.apache.org/jira/browse/HADOOP-13519)(fixed in Hadoop 3.0.0).
   
   Since SPARK-42452 removed support for Hadoop2, we can remove this workaround now.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   Pass GA.


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] sunchao commented on pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

Posted by "sunchao (via GitHub)" <gi...@apache.org>.
sunchao commented on PR #40848:
URL: https://github.com/apache/spark/pull/40848#issuecomment-1515104782

   Merged to master, thanks!


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] pan3793 commented on pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #40848:
URL: https://github.com/apache/spark/pull/40848#issuecomment-1558953872

   Tests pass if enable `-Phive`
   
   ```
   build/mvn clean install -DskipTests -Phive
   build/mvn test -pl connector/connect/client/jvm -Dtest=none -DwildcardSuites=org.apache.spark.sql.ClientE2ETestSuite
   ```
   
   Seems reasonable


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] LuciferYang commented on pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40848:
URL: https://github.com/apache/spark/pull/40848#issuecomment-1559065577

   > Tests pass if enable `-Phive`
   > 
   > ```
   > build/mvn clean install -DskipTests -Phive
   > build/mvn test -pl connector/connect/client/jvm -Dtest=none -DwildcardSuites=org.apache.spark.sql.ClientE2ETestSuite
   > ```
   > 
   > Seems reasonable
   
   No, these test can passed without -Phive without 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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] pan3793 commented on pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #40848:
URL: https://github.com/apache/spark/pull/40848#issuecomment-1514575012

   cc @sunchao @LuciferYang 


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] sunchao closed pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

Posted by "sunchao (via GitHub)" <gi...@apache.org>.
sunchao closed pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc
URL: https://github.com/apache/spark/pull/40848


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] LuciferYang commented on pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40848:
URL: https://github.com/apache/spark/pull/40848#issuecomment-1559067577

   The error stack in server side as follows:
   
   ```
   java.util.ServiceConfigurationError: org.apache.spark.sql.sources.DataSourceRegister: Provider org.apache.spark.sql.hive.execution.HiveFileFormat could not be instantiated
   	at java.util.ServiceLoader.fail(ServiceLoader.java:232)
   	at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
   	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
   	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
   	at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
   	at scala.collection.convert.Wrappers$JIteratorWrapper.next(Wrappers.scala:46)
   	at scala.collection.Iterator.foreach(Iterator.scala:943)
   	at scala.collection.Iterator.foreach$(Iterator.scala:943)
   	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
   	at scala.collection.IterableLike.foreach(IterableLike.scala:74)
   	at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
   	at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
   	at scala.collection.TraversableLike.filterImpl(TraversableLike.scala:303)
   	at scala.collection.TraversableLike.filterImpl$(TraversableLike.scala:297)
   	at scala.collection.AbstractTraversable.filterImpl(Traversable.scala:108)
   	at scala.collection.TraversableLike.filter(TraversableLike.scala:395)
   	at scala.collection.TraversableLike.filter$(TraversableLike.scala:395)
   	at scala.collection.AbstractTraversable.filter(Traversable.scala:108)
   	at org.apache.spark.sql.execution.datasources.DataSource$.lookupDataSource(DataSource.scala:629)
   	at org.apache.spark.sql.execution.datasources.DataSource$.lookupDataSourceV2(DataSource.scala:697)
   	at org.apache.spark.sql.DataFrameWriter.lookupV2Provider(DataFrameWriter.scala:860)
   	at org.apache.spark.sql.DataFrameWriter.saveInternal(DataFrameWriter.scala:256)
   	at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:239)
   	at org.apache.spark.sql.connect.planner.SparkConnectPlanner.handleWriteOperation(SparkConnectPlanner.scala:2321)
   	at org.apache.spark.sql.connect.planner.SparkConnectPlanner.process(SparkConnectPlanner.scala:2091)
   	at org.apache.spark.sql.connect.service.SparkConnectStreamHandler.handleCommand(SparkConnectStreamHandler.scala:120)
   	at org.apache.spark.sql.connect.service.SparkConnectStreamHandler.$anonfun$handle$2(SparkConnectStreamHandler.scala:86)
   	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
   	at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:825)
   	at org.apache.spark.sql.connect.service.SparkConnectStreamHandler.$anonfun$handle$1(SparkConnectStreamHandler.scala:53)
   	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
   	at org.apache.spark.util.Utils$.withContextClassLoader(Utils.scala:209)
   	at org.apache.spark.sql.connect.artifact.SparkConnectArtifactManager$.withArtifactClassLoader(SparkConnectArtifactManager.scala:178)
   	at org.apache.spark.sql.connect.service.SparkConnectStreamHandler.handle(SparkConnectStreamHandler.scala:48)
   	at org.apache.spark.sql.connect.service.SparkConnectService.executePlan(SparkConnectService.scala:166)
   	at org.apache.spark.connect.proto.SparkConnectServiceGrpc$MethodHandlers.invoke(SparkConnectServiceGrpc.java:611)
   	at org.sparkproject.connect.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:182)
   	at org.sparkproject.connect.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:352)
   	at org.sparkproject.connect.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:866)
   	at org.sparkproject.connect.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   	at org.sparkproject.connect.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/ql/plan/FileSinkDesc
   	at java.lang.Class.getDeclaredConstructors0(Native Method)
   	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
   	at java.lang.Class.getConstructor0(Class.java:3075)
   	at java.lang.Class.newInstance(Class.java:412)
   	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
   	... 41 more
   Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.ql.plan.FileSinkDesc
   	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
   	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
   	... 46 more
   ```


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] LuciferYang commented on pull request #40848: [SPARK-43186][SQL][HIVE] Remove workaround for FileSinkDesc

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40848:
URL: https://github.com/apache/spark/pull/40848#issuecomment-1558856186

   @pan3793 I found an interesting thing, after this one merged, when I run the following commands:
   
   ```
   build/mvn clean install -DskipTests
   build/mvn test -pl connector/connect/client/jvm -Dtest=none -DwildcardSuites=org.apache.spark.sql.ClientE2ETestSuite
   ```
   
   there are 4 test failed as following:
   
   ```
   - read and write *** FAILED ***
     io.grpc.StatusRuntimeException: INTERNAL: org.apache.spark.sql.sources.DataSourceRegister: Provider org.apache.spark.sql.hive.execution.HiveFileFormat could not be instantiated
     at io.grpc.Status.asRuntimeException(Status.java:535)
     at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:660)
     at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
     at scala.collection.Iterator.foreach(Iterator.scala:943)
     at scala.collection.Iterator.foreach$(Iterator.scala:943)
     at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
     at org.apache.spark.sql.SparkSession.execute(SparkSession.scala:458)
     at org.apache.spark.sql.DataFrameWriter.executeWriteOperation(DataFrameWriter.scala:257)
     at org.apache.spark.sql.DataFrameWriter.saveInternal(DataFrameWriter.scala:221)
     at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:210)
     ...
   - textFile *** FAILED ***
     io.grpc.StatusRuntimeException: INTERNAL: org.apache.spark.sql.sources.DataSourceRegister: Provider org.apache.spark.sql.hive.execution.HiveFileFormat could not be instantiated
     at io.grpc.Status.asRuntimeException(Status.java:535)
     at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:660)
     at org.apache.spark.sql.connect.client.SparkResult.org$apache$spark$sql$connect$client$SparkResult$$processResponses(SparkResult.scala:62)
     at org.apache.spark.sql.connect.client.SparkResult.length(SparkResult.scala:114)
     at org.apache.spark.sql.connect.client.SparkResult.toArray(SparkResult.scala:131)
     at org.apache.spark.sql.Dataset.$anonfun$collect$1(Dataset.scala:2688)
     at org.apache.spark.sql.Dataset.withResult(Dataset.scala:3128)
     at org.apache.spark.sql.Dataset.collect(Dataset.scala:2687)
     at org.apache.spark.sql.ClientE2ETestSuite.$anonfun$new$12(ClientE2ETestSuite.scala:169)
     at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
     ...
   - write table *** FAILED ***
     io.grpc.StatusRuntimeException: INTERNAL: org.apache.spark.sql.sources.DataSourceRegister: Provider org.apache.spark.sql.hive.execution.HiveFileFormat could not be instantiated
     at io.grpc.Status.asRuntimeException(Status.java:535)
     at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:660)
     at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
     at scala.collection.Iterator.toStream(Iterator.scala:1417)
     at scala.collection.Iterator.toStream$(Iterator.scala:1416)
     at scala.collection.AbstractIterator.toStream(Iterator.scala:1431)
     at scala.collection.TraversableOnce.toSeq(TraversableOnce.scala:354)
     at scala.collection.TraversableOnce.toSeq$(TraversableOnce.scala:354)
     at scala.collection.AbstractIterator.toSeq(Iterator.scala:1431)
     at org.apache.spark.sql.SparkSession.execute(SparkSession.scala:471)
     ...
   - write without table or path *** FAILED ***
     io.grpc.StatusRuntimeException: INTERNAL: org.apache.spark.sql.sources.DataSourceRegister: Provider org.apache.spark.sql.hive.execution.HiveFileFormat could not be instantiated
     at io.grpc.Status.asRuntimeException(Status.java:535)
     at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:660)
     at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
     at scala.collection.Iterator.toStream(Iterator.scala:1417)
     at scala.collection.Iterator.toStream$(Iterator.scala:1416)
     at scala.collection.AbstractIterator.toStream(Iterator.scala:1431)
     at scala.collection.TraversableOnce.toSeq(TraversableOnce.scala:354)
     at scala.collection.TraversableOnce.toSeq$(TraversableOnce.scala:354)
     at scala.collection.AbstractIterator.toSeq(Iterator.scala:1431)
     at org.apache.spark.sql.SparkSession.execute(SparkSession.scala:471)
     ...
   ```
   
   but  if I revert this one, the the failure will disappear. `CatalogSuite` and `StreamingQuerySuite` also has some problems.Already created [SPARK-43647](https://issues.apache.org/jira/browse/SPARK-43647) to tracking this, Do you have time to investigate togethe?
   
    


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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