You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2019/03/27 17:37:00 UTC
[GitHub] [knox] allaparthi92 commented on issue #79: JKG KERNEL_USERNAME
should be added when not present
allaparthi92 commented on issue #79: JKG KERNEL_USERNAME should be added when not present
URL: https://github.com/apache/knox/pull/79#issuecomment-477271854
```
Test 1 - user1 sends KERNEL_USERNAME=user2
curl -i -k -X POST -H "Authorization: $TOKEN" -H 'Content-Type: application/json' $JEG_URL/api/kernels -d '{"name" : "spark_python_yarn_cluster", "env": { "KERNEL_USERNAME": "user2" , "KERNEL_EXTRA_SPARK_OPTS" : "--archives hdfs:///user/dsxhi/environments/x86_glibc2_17.tar.gz --conf spark.yarn.appMasterEnv.PYSPARK_PYTHON=x86_glibc2_17.tar.gz/x86_glibc2_17/bin/python2.7 --conf spark.executor.memory=2g"} }'
HTTP/1.1 201 Created
Date: Wed, 27 Mar 2019 03:52:22 GMT
Server: TornadoServer/5.1.1
Location: /api/kernels/bddd7d0c-1b76-4425-8c92-10d6a17fcca3
Date: Wed, 27 Mar 2019 03:52:22 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 180
{"connections": 0, "last_activity": "2019-03-27T03:52:35.467814Z", "execution_state": "starting", "id": "bddd7d0c-1b76-4425-8c92-10d6a17fcca3", "name": "spark_python_yarn_cluster"}
19/03/26 20:52:29 INFO Client:
client token: N/A
diagnostics: [Tue Mar 26 20:52:29 -0700 2019] Scheduler has assigned a container for AM, waiting for AM container to be launched
ApplicationMaster host: N/A
ApplicationMaster RPC port: -1
queue: default
start time: 1553658748834
final status: UNDEFINED
tracking URL: http://shad1.fyre.ibm.com:8088/proxy/application_1553550168370_0051/
user: user1
Test 2 : Empty TOKEN
curl -i -k -X POST -H "Authorization: $TOKEN1" -H 'Content-Type: application/json' $JEG_URL/api/kernels -d '{"name" : "spark_python_yarn_cluster", "env": { "KERNEL_USERNAME": "user1" , "KERNEL_EXTRA_SPARK_OPTS" : "--archives hdfs:///user/dsxhi/environments/x86_glibc2_17.tar.gz --conf spark.yarn.appMasterEnv.PYSPARK_PYTHON=x86_glibc2_17.tar.gz/x86_glibc2_17/bin/python2.7 --conf spark.executor.memory=2g"} }'
HTTP/1.1 401 Unauthorized
Date: Wed, 27 Mar 2019 03:55:28 GMT
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 334
Server: Jetty(9.2.22.v20170606)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 401 Unauthorized</title>
</head>
<body><h2>HTTP ERROR 401</h2>
<p>Problem accessing /gateway/jalv-wsl123-master-1/jkg/api/kernels. Reason:
<pre> Unauthorized</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
</body>
</html>
Test 3: - user1 sends KERNEL_USERNAME is user1
curl -i -k -X POST -H "Authorization: $TOKEN" -H 'Content-Type: application/json' $JEG_URL/api/kernels -d '{"name" : "spark_python_yarn_cluster", "env": { "KERNEL_USERNAME": "user1" , "KERNEL_EXTRA_SPARK_OPTS" : "--archives hdfs:///user/dsxhi/environments/x86_glibc2_17.tar.gz --conf spark.yarn.appMasterEnv.PYSPARK_PYTHON=x86_glibc2_17.tar.gz/x86_glibc2_17/bin/python2.7 --conf spark.driver.memory=2g --conf spark.executor.memory=1g"} }'
HTTP/1.1 201 Created
Date: Wed, 27 Mar 2019 04:06:46 GMT
Server: TornadoServer/5.1.1
Location: /api/kernels/11e2099c-1838-44f9-a8fd-de3734e27c74
Date: Wed, 27 Mar 2019 04:06:46 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 180
{"connections": 0, "last_activity": "2019-03-27T04:07:00.196847Z", "execution_state": "starting", "id": "11e2099c-1838-44f9-a8fd-de3734e27c74", "name": "spark_python_yarn_cluster"}
19/03/26 21:06:53 INFO Client:
client token: N/A
diagnostics: [Tue Mar 26 21:06:53 -0700 2019] Application is Activated, waiting for resources to be assigned for AM. Details : AM Partition = <DEFAULT_PARTITION> ; Partition Resource = <memory:27136, vCores:18> ; Queue's Absolute capacity = 100.0 % ; Queue's Absolute used capacity = 33.962265 % ; Queue's Absolute max capacity = 100.0 % ;
ApplicationMaster host: N/A
ApplicationMaster RPC port: -1
queue: default
start time: 1553659612969
final status: UNDEFINED
tracking URL: http://shad1.fyre.ibm.com:8088/proxy/application_1553550168370_0055/
user: user1
Test 4: - user1 sends KERNEL_USERNAME is empty
curl -i -k -X POST -H "Authorization: $TOKEN" -H 'Content-Type: application/json' $JEG_URL/api/kernels -d '{"name" : "spark_python_yarn_cluster", "env": { "KERNEL_EXTRA_SPARK_OPTS" : "--archives hdfs:///user/dsxhi/environments/x86_glibc2_17.tar.gz --conf spark.yarn.appMasterEnv.PYSPARK_PYTHON=x86_glibc2_17.tar.gz/x86_glibc2_17/bin/python2.7 --conf spark.driver.memory=2g --conf spark.executor.memory=1g"} }'
HTTP/1.1 201 Created
Date: Wed, 27 Mar 2019 04:08:01 GMT
Server: TornadoServer/5.1.1
Location: /api/kernels/5a043b45-c94e-40f2-9930-0ca48f3cd4cb
Date: Wed, 27 Mar 2019 04:08:01 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 180
{"connections": 0, "last_activity": "2019-03-27T04:08:15.195738Z", "execution_state": "starting", "id": "5a043b45-c94e-40f2-9930-0ca48f3cd4cb", "name": "spark_python_yarn_cluster"}
19/03/26 21:08:08 INFO Client:
client token: N/A
diagnostics: [Tue Mar 26 21:08:07 -0700 2019] Application is Activated, waiting for resources to be assigned for AM. Details : AM Partition = <DEFAULT_PARTITION> ; Partition Resource = <memory:27136, vCores:18> ; Queue's Absolute capacity = 100.0 % ; Queue's Absolute used capacity = 56.60377 % ; Queue's Absolute max capacity = 100.0 % ;
ApplicationMaster host: N/A
ApplicationMaster RPC port: -1
queue: default
start time: 1553659687854
final status: UNDEFINED
tracking URL: http://shad1.fyre.ibm.com:8088/proxy/application_1553550168370_0056/
user: user1
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services