0
我試圖從日食用下面的代碼運行EMR集羣:AWS服務角色
RunJobFlowRequest runFlowRequest = new RunJobFlowRequest()
.withName("ExtractCollocations" + UUID.randomUUID())
.withInstances(instances)
.withSteps(countStepConfig1, countStepConfig2, countStepConfig3, countStepConfig4)
.withLogUri("s3n://"+ Bucket_name + "/logs/")
.withServiceRole("EMR_DefaultRole")
.withJobFlowRole("EMR_EC2_DefaultRole");
,並得到錯誤:
Exception in thread "main" java.lang.NoSuchMethodError: com.amazonaws.services.elasticmapreduce.model.RunJobFlowRequest.withServiceRole(Ljava/lang/String;)Lcom/amazonaws/services/elasticmapreduce/model/RunJobFlowRequest;
at LocalApp.runCluster(LocalApp.java:213)
at LocalApp.main(LocalApp.java:52)
如果我刪除行 「withServiceRole(」 EMR_DefaultRole 「)」它要求服務角色
您使用的是什麼版本的AWS SDK? –
版本1.11.98 –