How to split IQueryResult to multiple ArrayList?
Hi,
I am using java client to generate report based on work items. i have retrieved more than fifty thousands of work items from RTC using getResolvedExpressionResults function, then i have make some calculation to generate the report. But i have some issues on this: 1. queryClient returns the total results with in ten to twenty seconds, But when we loop over the results its taken too much time. Ex. only 200 to 400 records looped per minute. 2. How to split IQueryResult into multiple ArrayList. 3. Is there any some other way to process the the IQueryResult . i am using the following code to process over IQueryResult : while (results.hasNext(null)) { result = results.next(null); workItem = result.getItem(); } its only executes 200 to 400 records / minute. Please given me any alternative solution or code to solve this? Thanks in Advance, Pugazh S |
3 answers
Ralph Schoon (63.5k●3●36●46)
| answered Oct 05 '12, 5:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Oct 05 '12, 5:25 a.m.
Hi Pugazh,
I deleted the duplicate. You can bump questions just adding a comment. The reason why you did not get an asnswer, I guess is, because no one is aware of a better way. At least I am not. I have not done measurements with my machine and can't tell you an average. Thanks, Ralph Comments
pugazhenthi samidurai
commented Oct 08 '12, 5:15 a.m.
Hi Ralph,
|
I don't know if you can do better.. it appears the final result for that workitem is not collected until that workitem is referenced.. so each next() causes I/O to the server.. I see this same behavior on plans and other items..
the list is quick, accessing individual items is slower I don't call this a bug, its fairly typical.. you could have waited for the whole 50,000 record bundle to come down from the server.. our folks are on remote lines, and this would have been a long wait.. |
Ralph Schoon (63.5k●3●36●46)
| answered Oct 08 '12, 10:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I agree with Sam. In fact there is a threshold that should prevent the server by being hit by questions with such huge amount of result. The result set will only provide up to this limit unless you set the limit to MAXINT immediately after retrieving the result set.
What you could look into is if getting the unresolved result and then resolving the work items with a work item profile e.g. SMALL_PROFILE is faster. Only resolve/load the data you need. Comments Hi sam and ralph,
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
What is the difference of this question and https://jazz.net/forum/questions/90103/is-there-any-alternative-way-to-process-iqueryresult?
If you want to clarify your other question or add something, you can edit it and bump it up by adding a comment. If the questions are just the same and double, Please let me know so I can delete the duplicate. Thanks!
Hi Schoon,
Sorry for my duplicate question.
From last two days this question just got few views only and still i am not received any solution.
That is the reason i have posted another question for the same problem.
you can delete any one of my question.