Skip to content

Conversation

@chrisaycock
Copy link

No description provided.

}
if (!config->kerb.empty()) {
hdfsBuilderSetKerbTicketCachePath(builder, config->kerb.c_str());
}
Copy link
Member

@wesm wesm Oct 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if any of these 3 strings are empty?

std::string user;

// TODO: Kerberos, etc.
std::string kerb;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give this a more descriptive name, like kerberos_ticket_path

host : NameNode. Set to "default" for fs.defaultFS from core-site.xml.
port : NameNode's port. Set to 0 for default or logical (HA) nodes.
user : Username when connecting to HDFS; None implies login user.
kerb : Path to Kerberos ticket cache.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above


conf.host = tobytes(host)
if host is not None:
conf.host = tobytes(host)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is None a valid option?

@chrisaycock
Copy link
Author

A None host is valid from the standpoint of libhdfs. Here's the doc from hdfs.h:

If NULL is given, a LocalFileSystem will be created.

I'm not sure why they chose to specify the default host with "default", but I wanted to keep my parameter values consistent with the C++.

I'll rename the kerb parameter.

@wesm
Copy link
Member

wesm commented Oct 29, 2016

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants