Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add Stream SSTable API to Sidecar to stream SSTable components throug…
…h zero copy streaming Patch by Saranya Krishnakumar; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-28
- Loading branch information
Showing
21 changed files
with
1,653 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,7 +5,6 @@ build/ | ||
src/gen-java/ | ||
src/resources/org/apache/cassandra/config/ | ||
logs/ | ||
data/ | ||
conf/hotspot_compiler | ||
doc/cql3/CQL.html | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.google.common.util.concurrent; | ||
|
||
/** | ||
* Wrapper class over guava Rate Limiter, uses SmoothBursty Ratelimiter. This class mainly exists to expose | ||
* package protected method queryEarliestAvailable of guava RateLimiter | ||
*/ | ||
public class SidecarRateLimiter | ||
{ | ||
private final RateLimiter rateLimiter; | ||
|
||
private SidecarRateLimiter(final double permitsPerSecond) | ||
{ | ||
this.rateLimiter = RateLimiter.create(permitsPerSecond); | ||
} | ||
|
||
public static SidecarRateLimiter create(final double permitsPerSecond) | ||
{ | ||
return new SidecarRateLimiter(permitsPerSecond); | ||
} | ||
|
||
/** | ||
* Returns earliest time permits will become available | ||
*/ | ||
public long queryEarliestAvailable(final long nowMicros) | ||
{ | ||
return this.rateLimiter.queryEarliestAvailable(nowMicros); | ||
} | ||
|
||
/** | ||
* Tries to reserve 1 permit, if not available immediately returns false | ||
*/ | ||
public boolean tryAcquire() | ||
{ | ||
return this.rateLimiter.tryAcquire(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.apache.cassandra.sidecar.exceptions; | ||
|
||
/** | ||
* Custom exception | ||
*/ | ||
public class RangeException extends RuntimeException | ||
{ | ||
public RangeException(String msg) | ||
{ | ||
super(msg); | ||
} | ||
} |
Oops, something went wrong.