Thank you for the insights. I was able to get the JobConfiguration Thrift object by querying an existing Job and using that for future API calls that require it.
From: Joshua Cohen [mailto:[email protected]] Sent: Monday, January 30, 2017 11:23 AM To: [email protected] Subject: Re: Thrift API - start/stop process There's nothing in Java to serve as an example of parsing the configuration from a .aurora file and converting it to a JobConfiguration thrift struct. This would be pretty difficult to do generically given that the config files themselves are essentially executable Python code. There is code in the Aurora client that you can use as an example, it's not super easy to follow, but it starts here: https://github.com/apache/aurora/blob/master/src/main/python/apache/aurora/config/__init__.py#L112-L118. Once the config file has been read and processed, however, it does what you're getting at above. That is to say, it manually constructs the necessary thrift objects from the config (see: https://github.com/apache/aurora/blob/master/src/main/python/apache/aurora/config/thrift.py). If you need the full benefits of Aurora's configuration DSL, I'd recommend just using the Aurora client directly. If you don't, it shouldn't be too hard to manually create the necessary thrift objects to send to the API in the language of your choice. On Mon, Jan 30, 2017 at 10:50 AM, Periquet, Arnel <[email protected]<mailto:[email protected]>> wrote: Hi, I have a question on the Thrift API usage. I am somewhat new to Aurora, but have configured the hello world example which I am using to explore the Thrift API. I have a working Java client that is able to invoke various thrift APIs on the hello world VM created by the example. My question is this. How do I create a JobConfiguration object for use with the createJob API. Response<http://192.168.33.7:8081/apiclient/api.html#Struct_Response> createJob(JobConfiguration<http://192.168.33.7:8081/apiclient/api.html#Struct_JobConfiguration> description) For example, is there a way to load to the configuration from my .aurora configuration? Or, is the only way to compose the TaskConfiguration as an object programmatically that corresponds to the .aurora API? If you can refer me to an example that works with hello_world example, that would be great. Thanks, Arnel --- Arnel I. Periquet Senior Developer, Sabre [email protected]<mailto:[email protected]>
