Skip to content

feat: add spark history server api #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 61 additions & 1 deletion examples/test_ibm_analytics_engine_api_v3_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def test_set_instance_home_example(self):

instance_home_response = ibm_analytics_engine_api_service.set_instance_home(
instance_id='e64c907a-e82f-46fd-addc-ccfafbd28b09',
new_hmac_access_key='b9****************************4b',
new_hmac_secret_key='fa********************************************8a'
).get_result()

print(json.dumps(instance_home_response, indent=2))
Expand Down Expand Up @@ -258,7 +260,7 @@ def test_create_application_example(self):
arguments=['/opt/ibm/spark/examples/src/main/resources/people.txt'],
runtime={
'spark_version': '3.3'
}
}
)
application_response = ibm_analytics_engine_api_service.create_application(
instance_id='e64c907a-e82f-46fd-addc-ccfafbd28b09',
Expand Down Expand Up @@ -455,6 +457,64 @@ def test_get_logging_configuration_example(self):
except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_start_spark_history_server_example(self):
"""
start_spark_history_server request example
"""
try:
print('\nstart_spark_history_server() result:')
# begin-start_spark_history_server

spark_history_server_response = ibm_analytics_engine_api_service.start_spark_history_server(
instance_id='e64c907a-e82f-46fd-addc-ccfafbd28b09'
).get_result()

print(json.dumps(spark_history_server_response, indent=2))

# end-start_spark_history_server

except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_get_spark_history_server_example(self):
"""
get_spark_history_server request example
"""
try:
print('\nget_spark_history_server() result:')
# begin-get_spark_history_server

spark_history_server_response = ibm_analytics_engine_api_service.get_spark_history_server(
instance_id='e64c907a-e82f-46fd-addc-ccfafbd28b09'
).get_result()

print(json.dumps(spark_history_server_response, indent=2))

# end-get_spark_history_server

except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_stop_spark_history_server_example(self):
"""
stop_spark_history_server request example
"""
try:
# begin-stop_spark_history_server

response = ibm_analytics_engine_api_service.stop_spark_history_server(
instance_id='e64c907a-e82f-46fd-addc-ccfafbd28b09'
)

# end-stop_spark_history_server
print('\nstop_spark_history_server() response status code: ', response.get_status_code())

except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_delete_application_example(self):
"""
Expand Down
Loading