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

James Clampffer commented on HDFS-10366:
----------------------------------------

Looks good to me other than a trailing whitespace error, +1 pending a passing 
CI run.

Minor nits in case you want to fix them now, I'm guessing a lot of this code 
will get a second pass in HDFS-10450 so they can also be pushed there if they 
look like they are worth doing.

{code}
Options::Options() : rpc_timeout(kDefaultRpcTimeout), 
max_rpc_retries(kDefaultMaxRpcRetries),
                     rpc_retry_delay_ms(kDefaultRpcRetryDelayMs),
                     host_exclusion_duration(kDefaultHostExclusionDuration),
                     defaultFS()
                     defaultFS(),
                     authentication(kSimple)
{code}
Initialize authentication with kDefaultAuthentication?

{code}
  enum Code {
    kOk = 0,
    kInvalidArgument = static_cast<unsigned>(std::errc::invalid_argument),
    kResourceUnavailable = 
static_cast<unsigned>(std::errc::resource_unavailable_try_again),
    kUnimplemented = static_cast<unsigned>(std::errc::function_not_supported),
    kOperationCanceled = static_cast<unsigned>(std::errc::operation_canceled),
    kPermissionDenied = static_cast<unsigned>(std::errc::permission_denied),
    kAuthenticationFailed = 254,
{code}
I worry that the explicit assignment of kAuthentication failed could possibly 
collide with erd::errc values on some platforms.  On the other hand implicit 
assignment might make it take on the value of an error code we aren't using at 
the moment and lead to confusion.  I'm not sure there's a good portable way to 
prevent this, maybe cmake can generate and run a little program to check?

We also now have two base64 encode functions; not really a big deal bit having 
a single one would be nicer.

> libhdfs++: Add SASL authentication
> ----------------------------------
>
>                 Key: HDFS-10366
>                 URL: https://issues.apache.org/jira/browse/HDFS-10366
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Bob Hansen
>            Assignee: Bob Hansen
>         Attachments: HDFS-10366.HDFS-8707.000.patch
>
>
> Enable communication with HDFS clusters that have KERBEROS authentication 
> enabled; use tokens from NN when communicating with DN.



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

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

Reply via email to