It's all about the answers!

Ask a question

How to split IQueryResult to multiple ArrayList?


0
1
pugazhenthi samidurai (26423942) | asked Oct 03 '12, 7:09 a.m.
edited Oct 04 '12, 3:12 a.m.
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



Comments
Ralph Schoon commented Oct 05 '12, 4:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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!


pugazhenthi samidurai commented Oct 05 '12, 5:05 a.m.

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.

3 answers



permanent link
Ralph Schoon (63.4k33646) | 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 have searched over the IQueryResult class.

Its defined as interface, let me know is there any possibilities to creating custom IQueryResult class with additional functionality's.(ex. sublist in List)





permanent link
sam detweiler (12.5k6195201) | answered Oct 08 '12, 10:15 a.m.
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..

permanent link
Ralph Schoon (63.4k33646) | 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
pugazhenthi samidurai commented Oct 09 '12, 12:51 a.m. | edited Oct 09 '12, 5:40 a.m.

Hi sam and ralph,

i knew it is not an bug.

But i have planned to divide this IQueryResult into mulple sub arrayList.
Because Then only we can able to process all this sub AraayList at the same time using Multi Threading.

Unfortunately sublist function available in List is not available in our IQueryResult.

Thanks a lot.


Your answer


Register or to post 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.