-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CASSANDRA-18154: CEP-15: Enhance returning SELECT to allow partition …
…and clustering IN clauses to return multiple partitions/rows
- Loading branch information
Showing
29 changed files
with
1,809 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/java/org/apache/cassandra/metrics/AccordClientRequestMetrics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.cassandra.metrics; | ||
|
||
import com.codahale.metrics.Histogram; | ||
import com.codahale.metrics.Meter; | ||
|
||
import static org.apache.cassandra.metrics.CassandraMetricsRegistry.Metrics; | ||
|
||
public class AccordClientRequestMetrics extends ClientRequestMetrics | ||
{ | ||
public final Meter preempts; | ||
public final Histogram keySize; | ||
|
||
public AccordClientRequestMetrics(String scope) | ||
{ | ||
super(scope); | ||
|
||
preempts = Metrics.meter(factory.createMetricName("Preempts")); | ||
keySize = Metrics.histogram(factory.createMetricName("KeySizeHistogram"), false); | ||
} | ||
|
||
@Override | ||
public void release() | ||
{ | ||
super.release(); | ||
Metrics.remove(factory.createMetricName("Preempts")); | ||
Metrics.remove(factory.createMetricName("KeySizeHistogram")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/java/org/apache/cassandra/utils/logging/ClassNameFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.cassandra.utils.logging; | ||
|
||
import ch.qos.logback.classic.spi.ILoggingEvent; | ||
import ch.qos.logback.core.filter.AbstractMatcherFilter; | ||
import ch.qos.logback.core.spi.FilterReply; | ||
|
||
public class ClassNameFilter extends AbstractMatcherFilter<ILoggingEvent> | ||
{ | ||
String loggerName; | ||
|
||
public void setLoggerName(String loggerName) | ||
{ | ||
this.loggerName = loggerName; | ||
} | ||
|
||
@Override | ||
public FilterReply decide(ILoggingEvent event) | ||
{ | ||
if (!isStarted()) return FilterReply.NEUTRAL; | ||
if (event.getLoggerName().equals(loggerName)) return onMatch; | ||
return onMismatch; | ||
} | ||
|
||
@Override | ||
public void start() | ||
{ | ||
if (loggerName != null) super.start(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.