spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo Vanzin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-24746) AWS S3 301 Moved Permanently error message even after setting fs.s3a.endpoint for bucket in Mumbai region.
Date Wed, 31 Oct 2018 16:53:00 GMT

     [ https://issues.apache.org/jira/browse/SPARK-24746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcelo Vanzin resolved SPARK-24746.
------------------------------------
    Resolution: Information Provided

In general, please use the mailing list for questions.

But Steve seems to have given you some pointers already.

> AWS S3 301 Moved Permanently error message even after setting fs.s3a.endpoint for bucket
in Mumbai region.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-24746
>                 URL: https://issues.apache.org/jira/browse/SPARK-24746
>             Project: Spark
>          Issue Type: Question
>          Components: Kubernetes, PySpark
>    Affects Versions: 2.3.1
>            Reporter: Kushagra Singh
>            Priority: Major
>
> I am trying to write parquet data to a S3 bucket in ap-south-1(Mumbai) region but keep
getting 301 errors even though I have specified the correct region.
> {code}
> sc._jsc.hadoopConfiguration().set("fs.s3a.endpoint", "s3.ap-south-1.amazonaws.com")
> log.write.mode("overwrite").parquet("s3a://bucket/logs")
> {code}
> s3a related config in spark-defaults:
> {code:java}
> spark.hadoop.fs.s3a.impl        org.apache.hadoop.fs.s3a.S3AFileSystem
> spark.hadoop.validateOutputSpecs false
> spark.executor.extraJavaOptions -Dcom.amazonaws.services.s3.enableV4=true
> spark.driver.extraJavaOptions -Dcom.amazonaws.services.s3.enableV4=true
> spark.hadoop.fs.s3a.connection.maximum 100
> {code}
> Using _spark 2.3.1_ and _hadoop 2.7_ with _aws-java-sdk-1.7.4_ and _hadoop-aws-2.7.3_
> Stacktrace:
> {code:java}
> py4j.protocol.Py4JJavaError: An error occurred while calling o71.parquet.
> : org.apache.spark.SparkException: Job aborted.
> 	at org.apache.spark.sql.execution.datasources.FileFormatWriter$.write(FileFormatWriter.scala:224)
> 	at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand.run(InsertIntoHadoopFsRelationCommand.scala:154)
> 	at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult$lzycompute(commands.scala:104)
> 	at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult(commands.scala:102)
> 	at org.apache.spark.sql.execution.command.DataWritingCommandExec.doExecute(commands.scala:122)
> 	at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:131)
> 	at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:127)
> 	at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:155)
> 	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
> 	at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:152)
> 	at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:127)
> 	at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:80)
> 	at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:80)
> 	at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:654)
> 	at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:654)
> 	at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:77)
> 	at org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:654)
> 	at org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:273)
> 	at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:267)
> 	at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:225)
> 	at org.apache.spark.sql.DataFrameWriter.parquet(DataFrameWriter.scala:547)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
> 	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
> 	at py4j.Gateway.invoke(Gateway.java:282)
> 	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
> 	at py4j.commands.CallCommand.execute(CallCommand.java:79)
> 	at py4j.GatewayConnection.run(GatewayConnection.java:238)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: Status Code: 301, AWS Service:
Amazon S3, AWS Request ID: 0A48F0A6FD8AC8B5, AWS Error Code: null, AWS Error Message: Moved
Permanently, S3 Extended Request ID: lPmrY0rkTFpMASMjvFaDTbCPfTgX+PatF25gmvaSrNjCaJk/ljuA/TwyY2d4M/FNT1kiW6z6d5E=
> 	at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:798)
> 	at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:421)
> 	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:232)
> 	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3528)
> 	at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:976)
> 	at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:956)
> 	at org.apache.hadoop.fs.s3a.S3AFileSystem.getFileStatus(S3AFileSystem.java:892)
> 	at org.apache.hadoop.fs.s3a.S3AFileSystem.listStatus(S3AFileSystem.java:734)
> 	at org.apache.hadoop.fs.Globber.listStatus(Globber.java:69)
> 	at org.apache.hadoop.fs.Globber.glob(Globber.java:217)
> 	at org.apache.hadoop.fs.FileSystem.globStatus(FileSystem.java:1676)
> 	at org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:259)
> 	at org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:229)
> 	at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:315)
> 	at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:200)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.api.python.PythonRDD.getPartitions(PythonRDD.scala:54)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.ShuffleDependency.<init>(Dependency.scala:91)
> 	at org.apache.spark.rdd.ShuffledRDD.getDependencies(ShuffledRDD.scala:87)
> 	at org.apache.spark.rdd.RDD$$anonfun$dependencies$2.apply(RDD.scala:240)
> 	at org.apache.spark.rdd.RDD$$anonfun$dependencies$2.apply(RDD.scala:238)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.dependencies(RDD.scala:238)
> 	at org.apache.spark.rdd.ShuffledRDD.getPreferredLocations(ShuffledRDD.scala:98)
> 	at org.apache.spark.rdd.RDD$$anonfun$preferredLocations$2.apply(RDD.scala:275)
> 	at org.apache.spark.rdd.RDD$$anonfun$preferredLocations$2.apply(RDD.scala:275)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.preferredLocations(RDD.scala:274)
> 	at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$getPreferredLocsInternal(DAGScheduler.scala:1718)
> 	at org.apache.spark.scheduler.DAGScheduler.getPreferredLocs(DAGScheduler.scala:1692)
> 	at org.apache.spark.SparkContext.getPreferredLocs(SparkContext.scala:1783)
> 	at org.apache.spark.rdd.DefaultPartitionCoalescer.currPrefLocs(CoalescedRDD.scala:178)
> 	at org.apache.spark.rdd.DefaultPartitionCoalescer$PartitionLocations$$anonfun$getAllPrefLocs$2.apply(CoalescedRDD.scala:196)
> 	at org.apache.spark.rdd.DefaultPartitionCoalescer$PartitionLocations$$anonfun$getAllPrefLocs$2.apply(CoalescedRDD.scala:195)
> 	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
> 	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
> 	at org.apache.spark.rdd.DefaultPartitionCoalescer$PartitionLocations.getAllPrefLocs(CoalescedRDD.scala:195)
> 	at org.apache.spark.rdd.DefaultPartitionCoalescer$PartitionLocations.<init>(CoalescedRDD.scala:188)
> 	at org.apache.spark.rdd.DefaultPartitionCoalescer.coalesce(CoalescedRDD.scala:391)
> 	at org.apache.spark.rdd.CoalescedRDD.getPartitions(CoalescedRDD.scala:91)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.api.python.PythonRDD.getPartitions(PythonRDD.scala:54)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:253)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:251)
> 	at scala.Option.getOrElse(Option.scala:121)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:251)
> 	at org.apache.spark.sql.execution.datasources.FileFormatWriter$.write(FileFormatWriter.scala:193)
> 	... 31 more
> {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