[ 
https://issues.apache.org/jira/browse/HCATALOG-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13671673#comment-13671673
 ] 

Gautam Kowshik commented on HCATALOG-647:
-----------------------------------------

The TempletonControllerJob Watcher thread reads from the subprocess' 
stdout/stderr, But it flushes this data at the end of the loop which forces the 
user to wait till the controller job is done to actually see the log 

{code}

                while ((line = reader.readLine()) != null) {
                    writer.println(line);
                    JobState state = null;
                    try {
                        String percent = 
TempletonUtils.extractPercentComplete(line);
                        String childid = TempletonUtils.extractChildJobId(line);

                        if (percent != null || childid != null) {
                            state = new JobState(jobid.toString(), conf);
                            state.setPercentComplete(percent);
                            state.setChildId(childid);
                        }
                    } catch (IOException e) {
                        System.err.println("templeton: state error: " + e);
                    } finally {
                        if (state != null) {
                            try {
                                state.close();
                            } catch (IOException e) {
                            }
                        }
                    }
                }
                writer.flush();
{code}
                
> Webhcat resource /templeton/v1/status doesn't track Hive job progress
> ---------------------------------------------------------------------
>
>                 Key: HCATALOG-647
>                 URL: https://issues.apache.org/jira/browse/HCATALOG-647
>             Project: HCatalog
>          Issue Type: Bug
>          Components: webhcat-svr
>    Affects Versions: 0.5
>            Reporter: Gautam Kowshik
>            Priority: Minor
>
> Problem: Unable to track Hive job progress through webhcat.
> Cause:
> TempletonUtils has code to parse PIG and JAR child jobid and percentage 
> progress but none for Hive jobs. extractPercentComplete() and 
> extractChildJobId() are supposed to do this parsing. 
> Effect: 
> /templeton/v1/queue/$job_id?user.name=$user returns no job progress info. The 
> jobid param in the json result that's supposed to contain the child hive 
> jobid contains the templetoncontrollerjob id instead leaving the parent jobid 
> null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to