[05/12] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2017-08-29 Thread jasobrown
Merge branch 'cassandra-2.1' into cassandra-2.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4b52a686
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4b52a686
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4b52a686

Branch: refs/heads/cassandra-3.11
Commit: 4b52a6860488280073c5b107d9e7ae824a327fd9
Parents: c6dec2f 6b92778
Author: Jason Brown 
Authored: Tue Aug 29 07:58:38 2017 -0700
Committer: Jason Brown 
Committed: Tue Aug 29 08:00:34 2017 -0700

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b52a686/src/java/org/apache/cassandra/gms/Gossiper.java
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[05/12] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2

2016-08-16 Thread blerer
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9583b6b3/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 8820ff7,40f3f33..edf8e47
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -181,8 -247,11 +181,11 @@@ public class SelectStatement implement
  
  private Pageable getPageableCommand(QueryOptions options, int limit, long 
now) throws RequestValidationException
  {
 -if (isNotReturningAnyRows(options))
++if (restrictions.isNotReturningAnyRows(options))
+ return null;
+ 
  int limitForQuery = updateLimitForQuery(limit);
 -if (isKeyRange || usesSecondaryIndexing)
 +if (restrictions.isKeyRange() || restrictions.usesSecondaryIndexing())
  return getRangeCommand(options, limitForQuery, now);
  
  List commands = getSliceCommands(options, limitForQuery, 
now);
@@@ -596,52 -961,338 +599,58 @@@
  }
  }
  
 -/** Returns true if a non-frozen collection is selected, false otherwise. 
*/
 -private boolean selectACollection()
 +/**
 + * May be used by custom QueryHandler implementations
 + */
 +public List getValidatedIndexExpressions(QueryOptions 
options) throws InvalidRequestException
  {
 -if (!cfm.comparator.hasCollections())
 -return false;
 +if (!restrictions.usesSecondaryIndexing())
 +return Collections.emptyList();
  
 -for (ColumnDefinition def : selection.getColumns())
 -{
 -if (def.type.isCollection() && def.type.isMultiCell())
 -return true;
 -}
 +ColumnFamilyStore cfs = 
Keyspace.open(keyspace()).getColumnFamilyStore(columnFamily());
 +SecondaryIndexManager secondaryIndexManager = cfs.indexManager;
  
 -return false;
 +List expressions = 
restrictions.getIndexExpressions(secondaryIndexManager, options);
 +secondaryIndexManager.validateIndexSearchersForQuery(expressions);
 +
 +return expressions;
  }
  
 -@VisibleForTesting
 -static List buildBound(Bound bound,
 -  List defs,
 -  Restriction[] restrictions,
 -  boolean isReversed,
 -  CType type,
 -  QueryOptions options) throws 
InvalidRequestException
 +private CellName makeExclusiveSliceBound(Bound bound, CellNameType type, 
QueryOptions options) throws InvalidRequestException
  {
 -CBuilder builder = type.builder();
 -
 -// The end-of-component of composite doesn't depend on whether the
 -// component type is reversed or not (i.e. the ReversedType is applied
 -// to the component comparator but not to the end-of-component 
itself),
 -// it only depends on whether the slice is reversed
 -Bound eocBound = isReversed ? Bound.reverse(bound) : bound;
 -for (int i = 0, m = defs.size(); i < m; i++)
 -{
 -ColumnDefinition def = defs.get(i);
 -
 -// In a restriction, we always have Bound.START < Bound.END for 
the "base" comparator.
 -// So if we're doing a reverse slice, we must inverse the bounds 
when giving them as start and end of the slice filter.
 -// But if the actual comparator itself is reversed, we must 
inversed the bounds too.
 -Bound b = isReversed == isReversedType(def) ? bound : 
Bound.reverse(bound);
 -Restriction r = restrictions[def.position()];
 -if (isNullRestriction(r, b) || !r.canEvaluateWithSlices())
 -{
 -// There wasn't any non EQ relation on that key, we select 
all records having the preceding component as prefix.
 -// For composites, if there was preceding component and we're 
computing the end, we must change the last component
 -// End-Of-Component, otherwise we would be selecting only one 
record.
 -Composite prefix = builder.build();
 -return Collections.singletonList(eocBound == Bound.END ? 
prefix.end() : prefix.start());
 -}
 -if (r.isSlice())
 -{
 -if (r.isMultiColumn())
 -{
 -MultiColumnRestriction.Slice slice = 
(MultiColumnRestriction.Slice) r;
 +// clusteringColumnBounds may reverse bound if clustering order is 
reversed
 +// but areRequestedBoundsInclusive checks for 
Restriction::isInclusive and never
 +// reverses the order. In order to avoid inconsistencies and check 
inclusive
 +// bounds correctly, we need to check for column order and 

[05/12] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2016-07-26 Thread jbellis
Merge branch 'cassandra-2.1' into cassandra-2.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/04ef62cb
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/04ef62cb
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/04ef62cb

Branch: refs/heads/cassandra-3.9
Commit: 04ef62cba2a8f19f4e853ceb403f9b9e9e426853
Parents: b92ab60 48a45ed
Author: Jonathan Ellis 
Authored: Tue Jul 26 10:54:43 2016 -0500
Committer: Jonathan Ellis 
Committed: Tue Jul 26 10:54:43 2016 -0500

--
 conf/cassandra.yaml | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/04ef62cb/conf/cassandra.yaml
--