UCMDB and UD Practitioners Forum (Previously CMS)
cancel

uCMDB Web services method f- <ns0:numberOfChunks>2</ns0:numberOfChunks>

Highlighted
tme345
Occasional Advisor

uCMDB Web services method f- <ns0:numberOfChunks>2</ns0:numberOfChunks>

Hi there

 

I have a customer with the following issue. Wondering if someone can help

 

-----------------------

We are using HP UD 10.10 CP 13.0.1179 on Windows OS.
We are using uCMDB Web services method for integration with other tools.
We were getting response to the requests which we were sending to uCMDB. The method which I am using is "getCIsByType".
Now as the count of the devices has reached over 800 devices for "nt" CI type, we are not receiving the response instead we are getting chunks data when we send the request for "nt" CI type. While we are getting response for "unix" CI type as the count is less as compared to "nt" CI type.
Please can you let me know if there is any setting which restricts the result count and where can I increase the same to get the desired result.

--------------------------

 

His request code

 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:quer="http://schemas.hp.com/ucmdb/1/params/query" xmlns:typ="http://schemas.hp.com/ucmdb/1/types" xmlns:prop="http://schemas.hp.com/ucmdb/1/types/props">
<soap:Header/>
<soap:Body>
<quer:getCIsByType>
<quer:cmdbContext>
<typ:callerApplication>ucmdb</typ:callerApplication>
</quer:cmdbContext>
<quer:type>nt</quer:type>
<!--Optional:-->
<quer:properties>
<!--Optional:-->
<prop:propertiesList>
<!--1 or more repetitions:-->
<prop:propertyName>name</prop:propertyName>
<prop:propertyName>discovered_model</prop:propertyName>
</prop:propertiesList>
</quer:properties>
</quer:getCIsByType>
</soap:Body>
</soap:Envelope>

 

The response he is getting

 

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header/>
<soapenv:Body>
<tns:getCIsByTypeResponse xmlns:ns0="http://schemas.hp.com/ucmdb/1/types" xmlns:ns1="http://schemas.hp.com/ucmdb/1/types/history" xmlns:ns2="http://schemas.hp.com/ucmdb/1/types/impact" xmlns:ns3="http://schemas.hp.com/ucmdb/1/types/update" xmlns:ns4="http://schemas.hp.com/ucmdb/discovery/1/types" xmlns:ns5="http://schemas.hp.com/ucmdb/ui/1/types" xmlns:ns6="http://schemas.hp.com/ucmdb/1/types/query" xmlns:ns7="http://schemas.hp.com/ucmdb/1/types/props" xmlns:ns8="http://schemas.hp.com/ucmdb/1/types/classmodel" xmlns:tns="http://schemas.hp.com/ucmdb/1/params/query">
<tns:CIs/>
<tns:chunkInfo>
<ns0:numberOfChunks>2</ns0:numberOfChunks>
<ns0:chunksKey>
<ns0:key1>getObjectsByCondition</ns0:key1>
<ns0:key2>getObjectsByConditionab1fb3edc1290d4a4038e798d3e09b6d</ns0:key2>
</ns0:chunksKey>
</tns:chunkInfo>
</tns:getCIsByTypeResponse>
</soapenv:Body>
</soapenv:Envelope>

 

From page 264 from the developers guide

 

Processing Large Responses
The response to a query always includes the structures for the data requested by the query method,
even if no actual data is being transmitted. For many methods where the data is a collection or map,
the response also includes the ChunkInfo structure, comprised of chunksKey and
numberOfChunks. The numberOfChunks field indicates the number of chunks containing data that
must be retrieved.
The maximum transmission size of data is set by the system administrator. If the data returned
from the query is larger than the maximum size, the data structures in the first response contain no
meaningful information, and the value of the numberOfChunks field is 2 or greater. If the data is not
larger than the maximum, the numberOfChunks field is 0 (zero), and the data is transmitted in the
first response. Therefore, in processing a response, check the numberOfChunks value first. If it is
greater than 1, discard the data in the transmission and request the chunks of data. Otherwise, use
the data in the response.
For information on handling chunked data, see "pullTopologyMapChunks" on page 282 and
"releaseChunks" on page 284.

 

2 REPLIES
tme345
Occasional Advisor

Re: uCMDB Web services method f- <ns0:numberOfChunks>2</ns0:numberOfChunks>

My question is:

 

Where is this max transmission unit set actually? 

 

Or how should the code be rewritten to fix the issue with numberof chinks=2?

 

Many thanks in advance.

 

TME

Dima Gomel
HPE Expert

Re: uCMDB Web services method f- <ns0:numberOfChunks>2</ns0:numberOfChunks>

I'm almost sure, that a fuse defining where to start chunking results is "Query Results Chunk Size". It exposed in infrastructure Settings Manager. I'll attached the screen shot.

But, I'd ask you to think twice before changing the value for several reasons.

First, it will affect many systems in UCMDB. Fuse isn't a problem, but the cure for OOM situations, which could happend not only on UCMDB, but on the client side as well. Keep in mind that data set size depends not only on amount CIs, but on layout of requested attributes. Second, sending big ammount of data you'll start to face timeouts on different layers the data will come through.

Botom line, it will be much easier to implement receiving chunks on client side.

 

Regards
-Dmitry Gomel, PMP
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Click the Like button at the bottom to say 'Thanks'.
//Add this to "OnDomLoad" event