hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1697) Performance issue while closing client streams
Date Sun, 15 Nov 2015 11:58:11 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCLIENT-1697.
-------------------------------------------
    Resolution: Invalid

The behavior of HttpClient is correct. By default it attempts to consume the remaining message
content in order to be able to re-use the underlying connection for subsequent exchanges.
If one does not want the connection to be re-used one can either abort the request or close
the response without reading the rest of the message content

http://hc.apache.org/httpcomponents-client-4.5.x/tutorial/html/fundamentals.html#d5e145. 

http://hc.apache.org/httpcomponents-client-4.5.x/tutorial/html/fundamentals.html#d5e329

Oleg

> Performance issue while closing client streams
> ----------------------------------------------
>
>                 Key: HTTPCLIENT-1697
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1697
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>            Reporter: Rajat Jain
>            Priority: Critical
>
> cc [~jmurty]
> The performance of http client 4.5 (used by the `jets3t` project for this particular
bug) has degraded in 4.x as compared to 3.x. A lot of time in present is spent in the following
stack trace, which is when `jets3t` is trying to close the http stream.
> {code}
> "main" prio=10 tid=0x00007f8e1c012000 nid=0x2bdd runnable [0x00007f8e247b4000]
>    java.lang.Thread.State: RUNNABLE
>     at java.net.SocketInputStream.socketRead0(Native Method)
>     at java.net.SocketInputStream.read(SocketInputStream.java:152)
>     at java.net.SocketInputStream.read(SocketInputStream.java:122)
>     at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:204)
>     at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:182)
>     at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:204)
>     at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:108)
>     at org.apache.http.conn.BasicManagedEntity.streamClosed(BasicManagedEntity.java:164)
>     at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:237)
>     at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:186)
>     at org.apache.http.util.EntityUtils.consume(EntityUtils.java:87)
>     at org.jets3t.service.impl.rest.httpclient.HttpMethodReleaseInputStream.releaseConnection(HttpMethodReleaseInputStream.java:102)
>     at org.jets3t.service.impl.rest.httpclient.HttpMethodReleaseInputStream.close(HttpMethodReleaseInputStream.java:194)
>     at org.apache.hadoop.io.IOUtils.cleanup(IOUtils.java:237)
>     at org.apache.hadoop.io.IOUtils.closeStream(IOUtils.java:254)
>     at org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream.closeInnerStream(NativeS3FileSystem.java:247)
>     at org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream.updateInnerStream(NativeS3FileSystem.java:282)
>     - locked <0x00000000f6cd5730> (a org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream)
>     at org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream.reopen(NativeS3FileSystem.java:270)
>     - locked <0x00000000f6cd5730> (a org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream)
>     at org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream.seek(NativeS3FileSystem.java:258)
>     - locked <0x00000000f6cd5730> (a org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream)
>     at org.apache.hadoop.fs.BufferedFSInputStream.seek(BufferedFSInputStream.java:98)
>     at org.apache.hadoop.fs.FSDataInputStream.seek(FSDataInputStream.java:63)
>     - locked <0x00000000f6cd56e0> (a org.apache.hadoop.fs.FSDataInputStream)
>     at com.rjain.Jets3tTest.main(Jets3tTest.java:31)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.util.RunJar.run(RunJar.java:223)
>     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> {code}
> Please read further description of the issue here: https://bitbucket.org/jmurty/jets3t/issues/221/hadoop-seek-performance-regression-in



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message