aurora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Farner <wfar...@apache.org>
Subject Re: Aurora Thrift Client in JAVA
Date Wed, 02 Sep 2015 16:08:14 GMT
Our thrift API has three layers: AuroraAdmin [1], AuroraSchedulerManager
[2], and ReadOnlyScheduler [3].  Thrift combines these through extension.
If you look at the generated java code, you will see:

./gradlew compileJava
$ grep -R 'public interface'
./api/dist/thrift/gen-java/org/apache/aurora/gen/
./api/dist/thrift/gen-java/org/apache/aurora/gen/AuroraAdmin.java:  public
interface Iface extends AuroraSchedulerManager.Iface {
./api/dist/thrift/gen-java/org/apache/aurora/gen/AuroraAdmin.java:  public
interface AsyncIface extends AuroraSchedulerManager .AsyncIface {
./api/dist/thrift/gen-java/org/apache/aurora/gen/ReadOnlyScheduler.java:
public interface Iface {
./api/dist/thrift/gen-java/org/apache/aurora/gen/ReadOnlyScheduler.java:
public interface AsyncIface {
./api/dist/thrift/gen-java/org/apache/aurora/gen/AuroraSchedulerManager.java:
public interface Iface extends ReadOnlyScheduler.Iface {
./api/dist/thrift/gen-java/org/apache/aurora/gen/AuroraSchedulerManager.java:
public interface AsyncIface extends ReadOnlyScheduler .AsyncIface {

These are the interfaces you will use to interact with Aurora.  If you are
unfamiliar with thrift, i suggest you go through their tutorial [4].  For
user-level operations like managing jobs, you will find methods in
AuroraSchedulerManager:

createJob [5]
killTasks [6]
getTasksStatus [7]

Our client is written in python, so the code will not translate directly to
java, but might serve as a guide [8].


[1]
https://github.com/apache/aurora/blob/506d0cdbcb558fe43cab60ced8b613cfddc54b7f/api/src/main/thrift/org/apache/aurora/gen/api.thrift#L1131-L1189
[2]
https://github.com/apache/aurora/blob/506d0cdbcb558fe43cab60ced8b613cfddc54b7f/api/src/main/thrift/org/apache/aurora/gen/api.thrift#L1005-L1102
[3]
https://github.com/apache/aurora/blob/506d0cdbcb558fe43cab60ced8b613cfddc54b7f/api/src/main/thrift/org/apache/aurora/gen/api.thrift#L955-L1000
[4] https://thrift.apache.org/tutorial/java
[5]
https://github.com/apache/aurora/blob/506d0cdbcb558fe43cab60ced8b613cfddc54b7f/api/src/main/thrift/org/apache/aurora/gen/api.thrift#L1006-L1010
[6]
https://github.com/apache/aurora/blob/506d0cdbcb558fe43cab60ced8b613cfddc54b7f/api/src/main/thrift/org/apache/aurora/gen/api.thrift#L1034-L1035
[7]
https://github.com/apache/aurora/blob/506d0cdbcb558fe43cab60ced8b613cfddc54b7f/api/src/main/thrift/org/apache/aurora/gen/api.thrift#L962-L963
[8]
https://github.com/apache/aurora/blob/506d0cdbcb558fe43cab60ced8b613cfddc54b7f/src/main/python/apache/aurora/client/api/__init__.py


On Tue, Sep 1, 2015 at 11:07 PM, abhishek jain <intelccdodemo@gmail.com>
wrote:

>  Hi,
>  I am trying to figure out how to create, delete, getstatus of job using
> thrift API ? I am looking at AuroraAdmin class.
>
> Is there any example how should i create configuration for that ? or i can
> follow any test suit in Aurora source code?
>
> Thanks
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message