Github user xuspi commented on a diff in the pull request:

    https://github.com/apache/incubator-griffin/pull/409#discussion_r214942983
  
    --- Diff: 
service/src/main/java/org/apache/griffin/core/job/SparkSubmitJob.java ---
    @@ -113,8 +117,13 @@ private void 
updateJobInstanceState(JobExecutionContext context) throws
         private String post2Livy() {
             String result = null;
             try {
    -            result = restTemplate.postForObject(livyUri, livyConfMap,
    -                    String.class);
    +            HttpHeaders headers = new HttpHeaders();
    +            headers.setContentType(MediaType.APPLICATION_JSON);
    +            headers.set("X-Requested-By","admin");
    --- End diff --
    
    Could you use a constant for the "X-Requested-By"?
      public static final String REQUEST_BY_HEADER = "X-Requested-By";


---

Reply via email to