Skip to content

Commit

Permalink
Update for OpenRiak
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsumner committed Oct 28, 2024
1 parent 72a84d7 commit b59a5a4
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Erlang CI
on:
push:
branches:
- nhse-develop
- openriak-3.2
pull_request:
branches:
- nhse-develop
- openriak-3.2

jobs:

Expand Down
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ebloom

## Overview

![ebloom OpenRiak Status](https://github.com/OpenRiak/ebloom/actions/workflows/erlang.yml/badge.svg?branch=openriak-3.2)

`ebloom` is a NIF wrapper around a basic bloom filter.

## Quick Start

You must have [[http://erlang.org/download.html][Erlang/OTP 22]] or later and a GNU-style build system to compile and run =ebloom=.

```
git clone git://github.com/basho/ebloom.git
cd ebloom
make
```

Start up an Erlang shell with the path to =ebloom= included.

```
erl -pa path/to/ebloom/ebin
```

Create a new bloom filter, insert elements, and test for an elements presence.

```
1> PredictedElementCount=5.
5
2> FalsePositiveProbability=0.01.
3> RandomSeed=123.
123
4> {ok, Ref} = ebloom:new(PredictedElementCount, FalsePositiveProbability, RandomSeed).
{ok,<<>>}
5> ebloom:insert(Ref, <<"abcdef">>).
ok
6> true = ebloom:contains(Ref, <<"abcdef">>).
true
7> false = ebloom:contains(Ref, <<"zzzzzz">>).
false
```

## Contributing

The `ebloom` module is maintained to support a single function within the Riak legacy replication feature. It is not actively developed (i.e. to consider new features or performance improvements).

67 changes: 0 additions & 67 deletions README.org

This file was deleted.

2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{erl_opts, [debug_info, warnings_as_errors]}.
{cover_enabled, true}.

{plugins, [{pc, {git, "https://github.com/blt/port_compiler", {tag, "v1.14.0"}}}]}.
{plugins, [{pc, {git, "https://github.com/OpenRiak/port_compiler", {tag, "openriak-3.2"}}}]}.

{profiles, [
{gha, [{erl_opts, [{d, 'GITHUBEXCLUDE'}]}]}
Expand Down

0 comments on commit b59a5a4

Please sign in to comment.