Review Board 1.7.22


HIVE-5519

Review Request #14916 - Created Oct. 24, 2013 and updated

Hari Sankar Sivarama Subramaniyan
HIVE-5519
Reviewers
hive
daijy, ekoifman, thejas
hive
Added 2 additional parameters :
1. numrecords = number of records the user wants to retrieve based on timestamp ordering
2. starttime = start time prefix 
Added e2e test and tested with curl.
http://svn.apache.org/repos/asf/hive/trunk/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf
Revision 1536446 New Change
[20] 149 lines
[+20]
150
     'url' => ':TEMPLETON_URL:/templeton/v1/queue?user.name=:UNAME_OTHER:',
150
     'url' => ':TEMPLETON_URL:/templeton/v1/queue?user.name=:UNAME_OTHER:',
151
     'format_header' => 'Content-Type: application/json',
151
     'format_header' => 'Content-Type: application/json',
152
     'json_path' => {'$[-1:]' => 'job_.*'},
152
     'json_path' => {'$[-1:]' => 'job_.*'},
153
     'status_code' => 200,
153
     'status_code' => 200,
154
    },
154
    },

    
   
155
    {

    
   
156
     # GET jobs?user.name=UNAME_OTHER&fields=*, get all the details of the oldest 2 jobs whose

    
   
157
     # id is greater than job_0

    
   
158
     'num' => 9,

    
   
159
     'depends_on' => 'JOBS_1,JOBS_2,JOBS_3',

    
   
160
     'method' => 'GET',

    
   
161
     'url' => ':TEMPLETON_URL:/templeton/v1/jobs?user.name=:UNAME_OTHER:&fields=*&numrecords=2&jobid=job_0',

    
   
162
     'format_header' => 'Content-Type: application/json',

    
   
163
     'json_path' => {'$[-1:].id' => 'job_.*',

    
   
164
                     '$[-1:].detail.status.jobId' => 'job_.*',

    
   
165
                     '$[-1:].detail.status.runState' => '\\d+',

    
   
166
                     '$[-1:].detail.status.jobId' => 'job_.*',

    
   
167
                     '$[-1:].detail.status.jobComplete' => 'true',

    
   
168
                     '$[-1:].detail.profile.user' => ':UNAME_OTHER:',

    
   
169
                     '$[-1:].detail.profile.jobFile' => '^.+$',

    
   
170
                     '$[-1:].detail.profile.url' => '^.+$',

    
   
171
                     '$[-1:].detail.profile.queueName' => '^.+$',

    
   
172
                     '$[-1:].detail.profile.jobID.id' => '\\d+',

    
   
173
                     '$[-1:].detail.profile.jobID.jtIdentifier' => '\\d+',

    
   
174
                     '$[-1:].detail.profile.jobId' => 'job_.*',

    
   
175
                     '$[-1:].detail.id' => 'job_.*',

    
   
176
                     '$[-1:].detail.parentId' => 'job_.*',

    
   
177
                     '$[-1:].detail.percentComplete' => '100%',

    
   
178
                     '$[-1:].detail.exitValue' => '0',

    
   
179
                     '$[-1:].detail.user' => ':UNAME_OTHER:',

    
   
180
                     '$[-1:].detail.callback' => '^.+$',

    
   
181
                     '$[-1:].detail.completed' => 'done',

    
   
182
                    },

    
   
183
     'status_code' => 200,

    
   
184
    },
155

    
   
185

   
156
   ]
186
   ]
157
  }
187
  }
158
 ]
188
 ]
159
}
189
}
160
;
190
;
http://svn.apache.org/repos/asf/hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java
Revision 1536446 New Change
 
  1. http://svn.apache.org/repos/asf/hive/trunk/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf: Loading...
  2. http://svn.apache.org/repos/asf/hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java: Loading...