[
https://issues.apache.org/jira/browse/GRIFFIN-269?focusedWorklogId=283992&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-283992
]
ASF GitHub Bot logged work on GRIFFIN-269:
------------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jul/19 03:09
Start Date: 29/Jul/19 03:09
Worklog Time Spent: 10m
Work Description: ahutsunshine commented on pull request #514:
[GRIFFIN-269] Griffin submit job to livy server with Kerberos Authentication
URL: https://github.com/apache/griffin/pull/514#discussion_r308042738
##########
File path:
service/src/main/java/org/apache/griffin/core/job/LivyTaskSubmitHelper.java
##########
@@ -216,8 +222,105 @@ public void decreaseCurTaskNum(Long scheduleId) {
private Map<String, Object> getResultByLivyId(Object livyBatchesId,
TypeReference<HashMap<String, Object>> type)
throws IOException {
Map<String, Object> resultMap = new HashedMap();
- String newResult = restTemplate.getForObject(uri + "/" +
livyBatchesId, String.class);
- return newResult == null ? resultMap : toEntity(newResult, type);
+ String livyUri = uri + "/" + livyBatchesId;
+ String result = getFromLivy(livyUri);
+ logger.info(result);
+ return result == null ? resultMap : toEntity(result, type);
+ }
+
+ public String postToLivy(String uri) {
+ logger.info("Post To Livy URI is: " + uri);
+ String needKerberos = env.getProperty("livy.need.kerberos");
+ logger.info("Need Kerberos:" + needKerberos);
+
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_JSON);
+ headers.set(REQUEST_BY_HEADER,"admin");
+
+ if (needKerberos == null || needKerberos.isEmpty()) {
+ logger.error("The property \"livy.need.kerberos\" is empty");
+ return null;
+ }
+
Review comment:
If livy.need.kerberos is empty, I think users may not need Kerberos. In
other words, it's the same as `livy.need.kerberos = false`.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 283992)
Time Spent: 1h 10m (was: 1h)
> Griffin submit job to livy with Kerberos Authentication
> -------------------------------------------------------
>
> Key: GRIFFIN-269
> URL: https://issues.apache.org/jira/browse/GRIFFIN-269
> Project: Griffin
> Issue Type: Improvement
> Reporter: Eric Wang
> Priority: Critical
> Fix For: 0.6.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> In production environment, livy server is usually authenticated by Kerberos.
> Currently Apache Griffin doesn't support submit spark job with Kerberos Auth.
> We need add this feature if using Apache Griffin in such environment.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)