我已经尝试过Apache Spark (Structured Streaming) 中给出的建议:S3 Checkpoint support
我仍然面临这个问题。以下是我得到的错误
17/07/06 17:04:56 WARN FileSystem: "s3n" is a deprecated filesystem
name. Use "hdfs://s3n/" instead.
Exception in thread "main" java.lang.IllegalArgumentException:
java.net.UnknownHostException: s3n
我有这样的东西作为我的代码的一部分
SparkSession spark = SparkSession
.builder()
.master("local[*]")
.config("spark.hadoop.fs.defaultFS","s3")
.config("spark.hadoop.fs.s3.impl", "org.apache.hadoop.fs.s3native.NativeS3FileSystem")
.config("spark.hadoop.fs.s3n.awsAccessKeyId","<my-key>")
.config("spark.hadoop.fs.s3n.awsSecretAccessKey","<my-secret-key>")
.appName("My Spark App")
.getOrCreate();
然后像这样使用检查点目录:
StreamingQuery line = topicValue.writeStream()
.option("checkpointLocation","s3n://<my-bucket>/checkpointLocation/")
任何帮助表示赞赏。提前致谢!