https://github.com/redistimeseries/jredistimeseries
Java Client for RedisTimeSeries
https://github.com/redistimeseries/jredistimeseries
java java-client redis timeseries
Last synced: 3 months ago
JSON representation
Java Client for RedisTimeSeries
- Host: GitHub
- URL: https://github.com/redistimeseries/jredistimeseries
- Owner: RedisTimeSeries
- License: bsd-3-clause
- Created: 2019-01-21T15:18:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-31T10:05:30.000Z (over 3 years ago)
- Last Synced: 2025-06-24T01:38:11.637Z (11 months ago)
- Topics: java, java-client, redis, timeseries
- Language: Java
- Homepage: https://redistimeseries.io
- Size: 144 KB
- Stars: 34
- Watchers: 5
- Forks: 16
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/RedisTimeSeries/JRedisTimeSeries)
[](https://github.com/RedisTimeSeries/JRedisTimeSeries/releases/latest)
[](https://maven-badges.herokuapp.com/maven-central/com.redislabs/jredistimeseries)
[](https://www.javadoc.io/doc/com.redislabs/jredistimeseries)
[](https://codecov.io/gh/RedisTimeSeries/JRedisTimeSeries)
[](https://lgtm.com/projects/g/RedisTimeSeries/JRedisTimeSeries/context:java)
[](https://snyk.io/test/github/RedisTimeSeries/JRedisTimeSeries?targetFile=pom.xml)
# JRedisTimeSeries
[](https://forum.redislabs.com/c/modules/redistimeseries)
[](https://discord.gg/KExRgMb)
Java Client for RedisTimeSeries
## Deprecation notice
As of [Jedis 4.2.0](https://github.com/redis/jedis), this library is deprecated. Its features have been merged into Jedis. Please install it either [from maven](https://mvnrepository.com/artifact/redis.clients/jedis) or [the repo](https://github.com/redis/jedis).
### Official Releases
```xml
com.redislabs
jredistimeseries
1.4.0
```
### Snapshots
```xml
snapshots-repo
https://oss.sonatype.org/content/repositories/snapshots
```
and
```xml
com.redislabs
jredistimeseries
1.5.0-SNAPSHOT
```
# Example: Using the Java Client
```java
RedisTimeSeries rts = new RedisTimeSeries("localhost", 6379);
Map labels = new HashMap<>();
labels.put("country", "US");
labels.put("cores", "8");
rts.create("cpu1", 60*10 /*10min*/, labels);
rts.create("cpu1-avg", 60*10 /*10min*/, null);
rts.createRule("cpu1", Aggregation.AVG, 60 /*1min*/, "cpu1-avg");
rts.add("cpu1", System.currentTimeMillis()/1000 /* time sec */, 80.0);
// Get all the timeseries in US in the last 10min average per min
rts.mrange(System.currentTimeMillis()/1000 - 10*60, System.currentTimeMillis()/1000, Aggregation.AVG, 60, "country=US")
```