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

Steve Loughran commented on HADOOP-8545:
----------------------------------------

I've had an initial look through the code

h3. Rest Client 
* swift rest client should be called {{SwiftRestClient}}, not {{RestClient}}
* rest client should throw  {{SwiftException}} over 
{{IllegalArgumentException}} when parsing configs.
* Rest client API: we *must* have a way of avoiding the static HttpClient 
{{Protocol.registerProtocol()}} operations. The HTTP protocol is clearly 
something to remove; the HTTPS one looks trickier. We can't break any hadoop 
code that is already using HTTPS
* {{DeleteMethodProcessor}} is creating a {{PutMethod()}} -surely it should be 
deleting things
* {{RestClient.perform()}} doesn't release request on all exceptions - 
{{method.releaseConnection();}} should be in a {{finally}} block
* {{RestClient.perform()}}  needs better error handling -swift (&proxies) 
return JSON data -that coul be turned into a SwiftRemoteException (with status 
code, URL, body, etc), so enable better failure handing upstream. It's 
particularly critical that the body gets retained, as that is how you find 
things like throttling reponses (assuming they apply to swift as well as nova)


h3. Other

* new exceptions should extend IOException, not RuntimeException. Proposed a 
{{SwiftException extends IOException}}; {{SwiftConnectionException}} could be a 
subclass of this
* needs ASF headers
* google guava snipped class, {{Preconditions}} needs to be pulled, somehow.
* move swift auth keys into a class of their own for ease of reference (to be 
fair -you did define constants, which is more than a lot of existing hadoop 
code does)

                
> Filesystem Implementation for OpenStack Swift
> ---------------------------------------------
>
>                 Key: HADOOP-8545
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8545
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>    Affects Versions: 2.0.3-alpha, 1.1.2
>            Reporter: Tim Miller
>            Priority: Minor
>         Attachments: HADOOP-8545-1.patch, HADOOP-8545-javaclouds-2.patch, 
> HADOOP-8545.patch, HADOOP-8545.patch
>
>
> Add a filesystem implementation for OpenStack Swift object store, similar to 
> the one which exists today for S3.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to