https://github.com/couchbase/jtap
Java Tap Client for Membase
https://github.com/couchbase/jtap
Last synced: 9 months ago
JSON representation
Java Tap Client for Membase
- Host: GitHub
- URL: https://github.com/couchbase/jtap
- Owner: couchbase
- Created: 2011-03-17T18:29:57.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-03-18T22:15:35.000Z (over 15 years ago)
- Last Synced: 2023-08-03T07:53:03.295Z (almost 3 years ago)
- Language: Java
- Homepage:
- Size: 2.29 MB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
----------------------------------------------------------------------
__ __
|__|/ |______ ______
| \ __\__ \ \____ \
| || | / __ \| |_> >
/\__| ||__| (____ / __/
\______| \/|__|
----------------------------------------------------------------------
A Tap Client for Java
----------------------------------------------------------------------
# Building
ant
A jar should be generated in the build folder
# Documentation
ant doc
Check out docs/javadocs/index.html
# Using
You need to create a `TapStreamClient`, an `Exporter`, and a
`TapStream`. The `TapStreamClient` is given an exporter which handles
data output from the tap stream connection. To start streaming data
call the start function in `TapStreamClient` and pass in a `TapStream`
template.
# Example
Creates a custom tap stream that will dump all key in a Membase server
and send only the key names. All of the key names will be exported to
a file named `results.txt`
TapStreamClient client = new TapStreamClient("10.1.5.102", 11210, "default", null);
Exporter exporter = new FileExporter("results.txt");
CustomStream tapListener = new CustomStream(exporter, "node1");
tapListener.keysOnly();
tapListener.doDump();
client.start(tapListener);
# Contact
The [couchbase server forums][forum] welcomes you and whatever
questions you may have regarding using jtap and all other things
couchbase.
See also: the full specification for the [TAP protocol][tapspec].
[tapspec]: http://techzone.couchbase.com/wiki/display/membase/TAP+Protocol
[forum]: http://techzone.couchbase.com/forums/couchbase/couchbase-server