-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Download logs API is no longer the same in cp4d 3.5 version. Need to rewrite the API with new API's and steps.
Here are some steps:
https://rtpdoc01.rtp.raleigh.ibm.com:9443/kc/SSQNUZ_3.5.0_test/wsj/spark/spark-access-driver-logs.html
1.Get the name of the deployment space.
From the Navigation menu on the {site.data.keyword.datalong}} web user interface, click Services > Instances, find the instance and click it to view the instance details.
Make a note of the deployment space name.
2.Export the following values. The job ID is included in your job POST response.
export CLOUDPAKFORDATA_URL=<CloudPakforData_URL>
export SPACE_NAME=<space_name>
export JOBID=<job_id>
3.Get the access token for the service instance. See Generating an access token.
4.Export the access token in a variable:
export TOKEN=<ACCESS_TOKEN>
5.Run the following:
SPACE_ID=$(curl -k -X GET https://$CLOUDPAKFORDATA_URL/v2/spaces?name=$SPACE_NAME -H 'content-type:application/json' -H "Authorization: Bearer $TOKEN" | python3 -c "import json, sys; print(json.load(sys.stdin)['resources'][0]['metadata']['id'])")
curl -ivk https://$CLOUDPAKFORDATA_URL/v2/asset_files/runtimes%2Fspark%2F$JOBID%2Flogs%2Fspark-driver-$JOBID-stdout?space_id=$SPACE_ID -H "accept: application/json" -H "Authorization: Bearer $TOKEN"
Metadata
Metadata
Assignees
Labels
No labels