AWS EMR依赖项

时间:2019-04-03 15:53:26

标签: scala amazon-emr

我正在尝试将"End-to-End Amazon EMR Java Source Code Sample"中的Java代码转换为Scala。我正在使用SBT进行依赖性管理。这是我目前在// https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk libraryDependencies += "com.amazonaws" % "aws-java-sdk" % "1.2.1" // https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl // https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-core libraryDependencies += "com.amazonaws" % "aws-java-sdk-core" % "1.9.17" // https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-emr libraryDependencies += "com.amazonaws" % "aws-java-sdk-emr" % "1.9.0" 中的相关依赖项:

import com.amazonaws.auth.AWSStaticCredentialsProvider

第一个无法编译的导入是:

sbt compile

此导入我缺少什么SBT依赖项?

这是[info] Compiling 1 Scala source to /Users/paulreiners/dev/tv-datascience-aws/target/scala-2.11/classes ... [error] /Users/paulreiners/dev/tv-datascience-aws/src/main/scala/Main.scala:3:8: object AWSStaticCredentialsProvider is not a member of package com.amazonaws.auth [error] import com.amazonaws.auth.AWSStaticCredentialsProvider [error] ^ [error] /Users/paulreiners/dev/tv-datascience-aws/src/main/scala/Main.scala:6:8: object AmazonElasticMapReduceClientBuilder is not a member of package com.amazonaws.services.elasticmapreduce [error] import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceClientBuilder [error] ^ [error] /Users/paulreiners/dev/tv-datascience-aws/src/main/scala/Main.scala:18:15: not found: value AmazonElasticMapReduceClientBuilder [error] val emr = AmazonElasticMapReduceClientBuilder.defaultClient() [error] ^ [error] three errors found [error] (Compile / compileIncremental) Compilation failed 中的错误。

default

1 个答案:

答案 0 :(得分:1)

您需要更新的aws-java-sdk版本:

// https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk
libraryDependencies += "com.amazonaws" % "aws-java-sdk" % "1.11.531"