An error occurred (InvocationDoesNotExist) when calling the GetCommandInvocation operation: : InvocationDoesNotExist
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 137, in lambda_handler
InstanceId=instance
File "/var/runtime/botocore/client.py", line 314, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/var/runtime/botocore/client.py", line 612, in _make_api_call
raise error_class(parsed_response, operation_name)
InvocationDoesNotExist: An error occurred (InvocationDoesNotExist) when calling the GetCommandInvocation operation:
以上是代码。问题出在get_command_invocation中,它没有作为varibale传递,而是作为字符串传递并且在错误下面传播
csvRDD.map(rec => {
val i = rec.split(',');
(i(0).toString, i(1).toString, i(2).toString, i(3).toString, i(4).toInt)
}).toDF("businessline","jobtitle","year","month","actual").registerTempTable("input")
val resDF = sqlContext.sql("Select year, month, avg(actual) as avgactual from input group by year, month")
resDF.write.parquet("/user/path/solution1")
但如果我单独打印command_id和实例,他们实际上是打印实际的id。
解决方案是什么?
答案 0 :(得分:0)
我发现解决方案只是将sleep / wait设置为代码。 time.sleep(10)进入代码解决了问题