[ 
https://issues.apache.org/jira/browse/HDFS-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718127#comment-16718127
 ] 

Siyao Meng commented on HDFS-14092:
-----------------------------------

I'll resolve this jira as "Won't Do" for now. Reasons:
1. Using library to redirect this for us might not actually increase the 
performance since the library might still create two connections since it would 
access two servers.
2. When this comment is first written in HDFS-6305, the code is simpler and 
"Location" is not saved in a global variable, which is now referenced in 5 
other places. If we let library auto redirect request to DNs, we need to figure 
out another way to get the redirected address.

(2) shouldn't be hard to do, but (1) is the main reason in my mind that makes 
this jira not worth fixing at the moment.

CWIIW. Feel free to reopen this jira.

> Remove two-step create/append in WebHdfsFileSystem
> --------------------------------------------------
>
>                 Key: HDFS-14092
>                 URL: https://issues.apache.org/jira/browse/HDFS-14092
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: webhdfs
>    Affects Versions: 3.2.0
>            Reporter: Daniel Templeton
>            Assignee: Siyao Meng
>            Priority: Major
>
> Per the javadoc on the {{WebHdfsFileSystem.connect()}} method:
> {code}    /**
>      * Two-step requests redirected to a DN
>      *
>      * Create/Append:
>      * Step 1) Submit a Http request with neither auto-redirect nor data.
>      * Step 2) Submit another Http request with the URL from the Location 
> header
>      * with data.
>      *
>      * The reason of having two-step create/append is for preventing clients 
> to
>      * send out the data before the redirect. This issue is addressed by the
>      * "Expect: 100-continue" header in HTTP/1.1; see RFC 2616, Section 8.2.3.
>      * Unfortunately, there are software library bugs (e.g. Jetty 6 http 
> server
>      * and Java 6 http client), which do not correctly implement "Expect:
>      * 100-continue". The two-step create/append is a temporary workaround for
>      * the software library bugs.
>      *
>      * Open/Checksum
>      * Also implements two-step connects for other operations redirected to
>      * a DN such as open and checksum
>      */{code}
> We should validate that it's safe to remove the two-step process and do so.  
> FYI, [~smeng].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to