forked from chutium/spark-appliance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
190 lines (190 loc) · 5.06 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
swagger: '2.0'
info:
title: Spark appliance
version: "0.1"
consumes:
- text/plain
produces:
- text/plain
paths:
/:
get:
summary: Check for authorization
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.get_dummy
responses:
200:
description: It's working
401:
description: Unauthorized
/.well-known/schema-discovery:
get:
summary: Endpoint for TWINTIP
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.get_twintip
responses:
200:
description: It's working
401:
description: Unauthorized
/get_master_uri:
get:
summary: Get URI of Spark masters
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.get_master_uri
responses:
200:
description: Return Master URI
404:
description: Master not found
/get_master_ip:
get:
summary: Get IP of current alive Spark master
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.get_master_ip
responses:
200:
description: Return Master IP
404:
description: Master not found
/get_thrift_server_uri:
get:
summary: Get URI of Spark thrift server
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.get_thrift_server_uri
responses:
200:
description: Return Thrift Server URI
404:
description: Thrift server not running
/send_query:
post:
summary: Send SQL query to Spark thrift server
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.send_query
parameters:
- file:
name: file
description: query file
in: body
type: string
required: true
- hive_vars:
name: hive_vars
description: whitespace-separated list of --hivevar parameters
in: formData
type: string
required: false
- hive_confs:
name: hive_confs
description: whitespace-separated list of --hiveconf parameters
in: formData
type: string
required: false
- username:
name: username
description: username to login
in: formData
type: string
required: false
- password:
name: password
description: password to login
in: formData
type: string
required: false
responses:
200:
description: Successful
500:
description: Failed to send query
/submit_application:
post:
summary: Submit Spark JAR or Python application
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.submit_application
parameters:
- file:
name: file
description: application file
in: formData
type: string
required: true
- main_class:
name: main_class
description: main class of JAR application
in: formData
type: string
required: false
- job_args:
name: job_args
description: Arguments (whitespace-separated) for Spark App Jar or Python script
in: formData
type: string
required: false
- job_settings:
name: job_settings
description: Spark settings (whitespace-separated) for Spark App Jar or Python script
in: formData
type: string
required: false
responses:
200:
description: Successful
500:
description: Failed to submit application
/get_job_status/{job_id}:
get:
summary: Get status of a submitted Spark application or Spark SQL query
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.get_job_status
parameters:
- job_id:
name: job_id
description: ID of Spark application or Spark SQL query
in: path
type: string
required: true
responses:
200:
description: Still running
201:
description: Finished
404:
description: ID not found
500:
description: Failed
/get_job_output/{job_id}:
get:
summary: Get outputs of a submitted Spark application or Spark SQL query
security:
- oauth2: ["{{oauth2_scope}}"]
operationId: webapp.get_job_output
parameters:
- job_id:
name: job_id
description: ID of Spark application or Spark SQL query
in: path
type: string
required: true
responses:
200:
description: Successful
404:
description: ID not found
securityDefinitions:
oauth2:
type: oauth2
flow: implicit
authorizationUrl: "{{ auth_url if auth_url }}"
x-tokenInfoUrl: "{{ tokeninfo_url if tokeninfo_url }}"
scopes:
"{{oauth2_scope}}": OAuth2 scope to access the WebApp