mirror of https://github.com/apache/cassandra
Fix backward incompatibility in CqlInputFormat
patch by jlewandowski; reviewed by mike_tr_adamson for CASSANDRA-10717
This commit is contained in:
parent
84750421a9
commit
fee9791b0a
|
|
@ -1,4 +1,5 @@
|
||||||
3.0.1
|
3.0.1
|
||||||
|
* Fix backward incompatibiliy in CqlInputFormat (CASSANDRA-10717)
|
||||||
* Correctly preserve deletion info on updated rows when notifying indexers
|
* Correctly preserve deletion info on updated rows when notifying indexers
|
||||||
of single-row deletions (CASSANDRA-10694)
|
of single-row deletions (CASSANDRA-10694)
|
||||||
* Notify indexers of partition delete during cleanup (CASSANDRA-10685)
|
* Notify indexers of partition delete during cleanup (CASSANDRA-10685)
|
||||||
|
|
|
||||||
|
|
@ -501,11 +501,26 @@ public class CqlConfigHelper
|
||||||
return new LimitedLocalNodeFirstLocalBalancingPolicy(stickHosts);
|
return new LimitedLocalNodeFirstLocalBalancingPolicy(stickHosts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Optional<AuthProvider> getDefaultAuthProvider(Configuration conf)
|
||||||
|
{
|
||||||
|
Optional<String> username = getStringSetting(USERNAME, conf);
|
||||||
|
Optional<String> password = getStringSetting(PASSWORD, conf);
|
||||||
|
|
||||||
|
if (username.isPresent() && password.isPresent())
|
||||||
|
{
|
||||||
|
return Optional.of(new PlainTextAuthProvider(username.get(), password.get()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Optional.absent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Optional<AuthProvider> getAuthProvider(Configuration conf)
|
private static Optional<AuthProvider> getAuthProvider(Configuration conf)
|
||||||
{
|
{
|
||||||
Optional<String> authProvider = getInputNativeAuthProvider(conf);
|
Optional<String> authProvider = getInputNativeAuthProvider(conf);
|
||||||
if (!authProvider.isPresent())
|
if (!authProvider.isPresent())
|
||||||
return Optional.absent();
|
return getDefaultAuthProvider(conf);
|
||||||
|
|
||||||
return Optional.of(getClientAuthProvider(authProvider.get(), conf));
|
return Optional.of(getClientAuthProvider(authProvider.get(), conf));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue