https://github.com/steveniemitz/littletable
In-memory JVM-based Bigtable emulator
https://github.com/steveniemitz/littletable
Last synced: about 1 month ago
JSON representation
In-memory JVM-based Bigtable emulator
- Host: GitHub
- URL: https://github.com/steveniemitz/littletable
- Owner: steveniemitz
- License: apache-2.0
- Created: 2019-01-25T19:02:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-27T16:00:41.000Z (over 3 years ago)
- Last Synced: 2025-05-28T10:11:24.110Z (6 months ago)
- Language: Java
- Homepage:
- Size: 169 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bigtable - LittleTable - In-memory JVM-based emulator for Bigtable. (Tools / Emulators)
README
# LittleTable
[](https://github.com/steveniemitz/littletable/actions/workflows/ci.yml)
[](http://search.maven.org/#search|gav|1|g:"com.steveniemitz")
[](https://github.com/zrosenbauer/awesome-bigtable)
## Overview
LittleTable is an emulator for [Google Cloud Bigtable](https://cloud.google.com/bigtable/), intended
to replace the emulator distributed with the `gcloud` utility.
It aims to provide full compatibility with the Cloud Bigtable API,
and fill the gaps in the Go-based emulator, such as the `sink` filter.
## Getting the emulator
Maven:
```xml
com.steveniemitz
littletable_2.12
1.1.0
```
Gradle:
```gradle
compile 'com.steveniemitz:littletable_2.12:1.0.0'
```
sbt:
```sbt
libraryDependencies += "com.steveniemitz" %% "littletable" % "1.0.0"
```
### Other Dependencies
LittleTable assumes you'll "bring your own" dependencies for gRPC as well as [`bigtable-client-core`](https://mvnrepository.com/artifact/com.google.cloud.bigtable/bigtable-client-core).
By default, `bigtable-client-core` will also include the required gRPC dependencies, so adding a
dependency to that is all that's required.
See [`build.sbt`](build.sbt) for reasonable defaults.
## Usage
`BigtableEmulator.newBuilder` (or `BigtableEmulators.newBuilder` in Java) can be used to obtain an
emulator builder. The builder can configure an in-process gRPC transport, or a TCP transport
(or both). When using the in-process emulator, the session provided by the built emulator must be
used. For advanced usage, `BigtableEmulator.Builder.configureServerBuilder` can be used to
configure a user-provided gRPC server builder.
```scala
val emulator =
BigtableEmulator.newBuilder
.withInProcess
.build()
// Start the emulator
emulator.start()
// Use the client
val session = emulator.session
val rows = session.getDataClient.readFlatRowsList(...)
```
See the [`BigtableTestSuite`](src/test/scala/com/steveniemitz/littletable/BigtableTestSuite.scala) for a full example.