Code-walkthrough between v1 and v2 of TimelineClient API revealed that v2 API TimelineV2ClientImpl#putObjects doesn't close ClientResponse objects under success status returned from Timeline Server. ClientResponse is closed only under erroneous response from the server using ClientResponse#getEntity.
We also noticed that TimelineClient (v1) closes the ClientResponse object in TimelineWriter#putEntities by calling ClientResponse#getEntity in both success and error conditions from the server thereby avoiding this file descriptor leak.
Customer's original issue and the symptom was that the NodeManager went down because of 'too many files open' condition where there were lots of CLOSED_WAIT sockets observed between the timeline client (from NM) and the timeline server hosts.
Could you please help resolve this issue ? Thanks.