Closed styshoo closed 6 years ago
@RequestLine("POST /v2/apps?force=true") @Headers(HeaderUtils.MARATHON_API_SOURCE_HEADER) App createApp(App app) throws MarathonException;** 建议写成这样!
force default: false boolean Only one deployment can be applied to one application at the same time. If the existing deployment should be canceled by this change, you can set force=true. Caution: setting force=true will cancel the current deployment. This paramter should be used only, if the current deployment is unsuccessful! 这是marathon API的解释,你试试看看可以不
I use "mesosphere.marathon.client.Marathon.createApp(this.app)" to create an application, it occurs following error if I create many applications at the same time.
mesosphere.marathon.client.MarathonException: Conflict (http status: 409) at mesosphere.marathon.client.MarathonClient$MarathonErrorDecoder.decode(MarathonClient.java:30) at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:134) at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76) at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103) at com.sun.proxy.$Proxy83.createApp(Unknown Source)