Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HyperLogLog Data Type #669

Merged
merged 11 commits into from
Sep 6, 2016
Merged

Add HyperLogLog Data Type #669

merged 11 commits into from
Sep 6, 2016

Conversation

alexmoore
Copy link
Contributor

@alexmoore alexmoore commented Aug 31, 2016

Adds HLL data type.

Test with a devrel of this Riak branch: https://github.com/basho/riak_ee/tree/develop-2.2

Test / sample usage can be found at:

public void testHyperLogLog() throws ExecutionException, InterruptedException

When running maven, add the flag -Dcom.basho.riak.hlldt=true to enable the new tests.

Docs PR forthcoming.

@Override
public RiakHll extractDatatype(RiakDatatype element)
{
return element.getAsHLL();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hll (lowercase l characters) is used elsewhere. I can't say I like the way either version looks, though 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, HLL, Hll, and HyperLogLog all have their downsides, I just chose the least annoying 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it should probably be consistently Hll everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh h(e)ll, I'll root out those non-compliant vars.

@lukebakken
Copy link
Contributor

👍 tests ran successfully against develop-2.2

* this class is used to encapsulate the update to be performed on a
* Riak HyperLogLog datatype.
* </p>
* @author Dave Rusek <drusek at basho dot com>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dave still here? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shhh, we keep him in the closet.

@lukebakken
Copy link
Contributor

Several if( statements remain. Doesn't IntelliJ have an option to auto-fix that as you type? I'm pretty sure VS does.

@@ -72,7 +72,7 @@ public HllUpdate add(String element)
*/
public HllUpdate addAllBinary(Collection<BinaryValue> elements)
{
if(elements == null)
if (elements == null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants