spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy Lu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SPARK-23226) Cannot read CSV file from Windows UNC network path
Date Wed, 09 May 2018 15:04:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-23226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468932#comment-16468932
] 

Jimmy Lu edited comment on SPARK-23226 at 5/9/18 3:03 PM:
----------------------------------------------------------

[~srowen], this was working before 2.1.0, and a valid URI like [file:///windows/unc/path/to/file.csv]
give the another error (Path does not exist: file:/windows/unc/path/to/file.csv).  But the
file DOES exists, Spark (or Hadoop) is stripping the leading slashes from UNC.  It's a legitimate
bug.


was (Author: yuhta):
[~srowen], this was working before 2.1.0, and a valid URI like file:///windows/unc/path/to/file.csv
give the another error.

> Cannot read CSV file from Windows UNC network path
> --------------------------------------------------
>
>                 Key: SPARK-23226
>                 URL: https://issues.apache.org/jira/browse/SPARK-23226
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.0
>         Environment: Windows 10
>            Reporter: Colin Breame
>            Priority: Major
>
> The CSV reader cannot read a file using a Window UNC path.
> {code:java}
> val df = spark.read.csv(raw"""\\\\windows\\unc\\path\\to\\file.csv"""){code}
> Results in:
> {code:java}
> org.apache.spark.sql.AnalysisException: Path does not exist: file:/windows/unc/path/to/file.csv;
> at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$14.apply(DataSource.scala:382)
> at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$14.apply(DataSource.scala:370)
> at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
> at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
> at scala.collection.immutable.List.foreach(List.scala:381)
> at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
> at scala.collection.immutable.List.flatMap(List.scala:344)
> at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:370)
> at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:152)
> at org.apache.spark.sql.DataFrameReader.csv(DataFrameReader.scala:415)
> at org.apache.spark.sql.DataFrameReader.csv(DataFrameReader.scala:352)
> ... 48 elided{code}
> The following also results in the same message:
> {code:java}
> val df = spark.read.csv(raw"""\\\\\\windows\\unc\\path\\to\\file.csv"""){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message