// Cassandra Kiji URIs aren't strictly legal - the Cassandra "authority" is really the first
// part of the path.
final List<String> segments = Splitter.on('/').omitEmptyStrings().splitToList(uri.getPath());
if (segments.size() < 1) {
throw new KijiURIException(uri.toString(), "Cassandra contact points must be specified.");
}
final String cassandraAuthority = segments.get(0);
final AuthorityParser cassandraAuthorityParser = AuthorityParser.getAuthorityParser(
cassandraAuthority,
uri);
// We currently support either neither a username nor a password, OR a username and a
// password, but not a username without a password.
if (null != cassandraAuthorityParser.getUsername()
&& null == cassandraAuthorityParser.getPassword()) {
throw new KijiURIException(uri.toString(),
"Cassandra Kiji URIs do not support a username without a password.");
}
final PathParser segmentParser = new PathParser(uri, 1);