【发布时间】:2017-11-10 05:51:12
【问题描述】:
无法弄清楚从哪里开始排除故障,为什么从 spark/scala 分区到 hdfs 的简单写入 parquet 将需要几秒钟,而当我写入 s3 时需要几分钟。
def saveDF(df: org.apache.spark.sql.DataFrame) : Unit = {
df.write
.mode("overwrite")
.option("compression", "snappy")
.partitionBy("col")
// .parquet(s"hdfs://localhost:9000/${fileout}") // this is a few seconds
.parquet(s"s3a://${s3bucket}/${s3folder}/${fileout}") // this is a few minutes
}
【问题讨论】:
标签: apache-spark amazon-s3 hdfs