Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services AWS胶水作业以拼花格式写入s3错误,未找到_Amazon Web Services_Amazon S3_Pyspark_Aws Glue - Fatal编程技术网

Amazon web services AWS胶水作业以拼花格式写入s3错误,未找到

Amazon web services AWS胶水作业以拼花格式写入s3错误,未找到,amazon-web-services,amazon-s3,pyspark,aws-glue,Amazon Web Services,Amazon S3,Pyspark,Aws Glue,我一直在做pyspark的工作,我不断地遇到一个类似的间歇性错误(更像是随机错误): 我甚至没有阅读s3,我实际上在做的是: df.coalesce(100).write.partitionBy(“mth”).mode(“overwrite”).拼花地板(“s3://“+bucket+”/“+path+”/out”) 因此,我更改了coalesce分区,但我不知道还应该做些什么来减轻这个错误并使我的工作更加稳定 用于使用胶水从s3读取文件 datasource0 = glueContext.cr

我一直在做pyspark的工作,我不断地遇到一个类似的间歇性错误(更像是随机错误):

我甚至没有阅读s3,我实际上在做的是:
df.coalesce(100).write.partitionBy(“mth”).mode(“overwrite”).拼花地板(“s3://“+bucket+”/“+path+”/out”)


因此,我更改了
coalesce
分区,但我不知道还应该做些什么来减轻这个错误并使我的工作更加稳定

用于使用胶水从s3读取文件

datasource0 = glueContext.create_dynamic_frame.from_options( connection_type = "s3", connection_options = {"paths": "s3/path"}, format = "json", transformation_ctx = "datasource0")
output = glueContext.write_dynamic_frame.from_options(frame = df, connection_type = "s3", connection_options = {"path": "s3/path"}, format = "parquet", transformation_ctx = "output")
用于使用胶水将文件写入s3

datasource0 = glueContext.create_dynamic_frame.from_options( connection_type = "s3", connection_options = {"paths": "s3/path"}, format = "json", transformation_ctx = "datasource0")
output = glueContext.write_dynamic_frame.from_options(frame = df, connection_type = "s3", connection_options = {"path": "s3/path"}, format = "parquet", transformation_ctx = "output")

用于使用胶水从s3读取文件

datasource0 = glueContext.create_dynamic_frame.from_options( connection_type = "s3", connection_options = {"paths": "s3/path"}, format = "json", transformation_ctx = "datasource0")
output = glueContext.write_dynamic_frame.from_options(frame = df, connection_type = "s3", connection_options = {"path": "s3/path"}, format = "parquet", transformation_ctx = "output")
用于使用胶水将文件写入s3

datasource0 = glueContext.create_dynamic_frame.from_options( connection_type = "s3", connection_options = {"paths": "s3/path"}, format = "json", transformation_ctx = "datasource0")
output = glueContext.write_dynamic_frame.from_options(frame = df, connection_type = "s3", connection_options = {"path": "s3/path"}, format = "parquet", transformation_ctx = "output")

您是否验证了用于写入此存储桶的角色的s3权限?是的,存在访问权限。错误并非总是发生,就像随机的一样,一次它工作并写入输出,有时它会因此错误而失败。最好是使用错误跟踪中的请求Id和扩展请求Id联系AWS支持部门。您是否验证了用于写入此存储桶的角色的s3权限?是的,存在访问权限。错误并非总是发生,就像随机的一样,一次它工作并写入输出,有时它会因此错误而失败。最好是使用错误跟踪中的请求Id和扩展请求Id联系AWS支持人员,以共享这种不同的写入S3的方式,它以前就已经实现了,我不知道这种方式是否能解决我所面临的问题。我必须添加以下代码:
dynamic\u frame\u df=DynamicFrame.fromDF(df,glueContext,“nested”)
这解决了第一次运行,让我再运行几次,我会告诉您这是否完全解决了写入s3的问题。谢谢你,杰!酷,没问题,让它保持上升感谢分享这种不同的方式写入S3,它是以前实现的,我不知道这种方式是否会解决我的问题。我必须添加以下代码:
dynamic\u frame\u df=DynamicFrame.fromDF(df,glueContext,“nested”)
这解决了第一次运行,让我再运行几次,我会告诉您这是否完全解决了写入s3的问题。谢谢你,杰!冷静,没问题,坚持下去