https://github.com/FeatureBaseDB/java-pilosa
Java client library for Pilosa
https://github.com/FeatureBaseDB/java-pilosa
java pilosa
Last synced: 5 months ago
JSON representation
Java client library for Pilosa
- Host: GitHub
- URL: https://github.com/FeatureBaseDB/java-pilosa
- Owner: FeatureBaseDB
- License: bsd-3-clause
- Archived: true
- Created: 2017-02-06T19:48:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-09-27T20:58:30.000Z (over 3 years ago)
- Last Synced: 2025-02-08T12:02:25.954Z (about 1 year ago)
- Topics: java, pilosa
- Language: Java
- Homepage: https://www.pilosa.com/
- Size: 1.38 MB
- Stars: 19
- Watchers: 18
- Forks: 15
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Client for Pilosa
This repo archived Sept 2022 as part of the transition from Pilosa to FeatureBase.
Please contact community[at]featurebase[dot]com with any questions.

Java client for Pilosa high performance distributed index.
## What's New?
See: [CHANGELOG](CHANGELOG.md)
## Requirements
* JDK 7 and higher
* Maven 3 and higher
## Install
Add the following dependency in your `pom.xml`:
```xml
com.pilosa
pilosa-client
1.4.0
```
## Usage
### Quick overview
Assuming [Pilosa](https://github.com/pilosa/pilosa) server is running at `localhost:10101` (the default):
```java
// Create the default client
PilosaClient client = PilosaClient.defaultClient();
// Retrieve the schema
Schema schema = client.readSchema();
// Create an Index object
Index myindex = schema.index("myindex");
// Create a Field object
Field myfield = myindex.field("myfield");
// make sure the index and field exists on the server
client.syncSchema(schema);
// Send a Set query. PilosaException is thrown if execution of the query fails.
client.query(myfield.set(5, 42));
// Send a Row query. PilosaException is thrown if execution of the query fails.
QueryResponse response = client.query(myfield.row(5));
// Get the result
QueryResult result = response.getResult();
// Act on the result
if (result != null) {
List columns = result.getRow().getColumns();
System.out.println("Got columns: " + columns);
}
// You can batch queries to improve throughput
response = client.query(
myindex.batchQuery(
myfield.row(5),
myfield.row(10)
)
);
for (Object r : response.getResults()) {
// Act on the result
}
```
## Documentation
### Data Model and Queries
See: [Data Model and Queries](docs/data-model-queries.md)
### Executing Queries
See: [Server Interaction](docs/server-interaction.md)
### Importing and Exporting Data
See: [Importing Data](docs/imports.md)
## Contributing
See: [CONTRIBUTING](CONTRIBUTING.md)
## License
See: [LICENSE](LICENSE)