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

First draft of FFWD java client Metric with distribution support #10

Merged
merged 4 commits into from
Aug 3, 2020
Merged

First draft of FFWD java client Metric with distribution support #10

merged 4 commits into from
Aug 3, 2020

Conversation

ao2017
Copy link
Contributor

@ao2017 ao2017 commented Jul 17, 2020

This is the first cut of Metric with distribution (new histogram ) support. New features includes:

  1. Point value as an Object instead of a double.
  2. Proto3 instead of proto2 but I kept serialization methods that was designed to prevent serialization of fields that were not set.

Copy link
Member

@lmuhlha lmuhlha left a comment

Choose a reason for hiding this comment

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

lgtm 👍


public class Metric {

private static final long PROC = 1 << 0;

Choose a reason for hiding this comment

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

I believe this field is obsolete and we should clean and remove this from the list of fields if we introducing new schema.

<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>

Choose a reason for hiding this comment

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

Could introduction of guava dependency here create some issues downstream? I don't for sure if this could be an issue but all those java dependency hell issues.

*/

/*
* FastForward Client

Choose a reason for hiding this comment

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

I think this should be removed as it repeated.

pom.xml Outdated
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>

Choose a reason for hiding this comment

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

Do we need this one?

<version>${com.google.guava}</version>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>

Choose a reason for hiding this comment

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

Can we avoid using auto value and try keep this client lean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there is a value in using auto value we don't have to write those crucial boilerplate methods and the code is more readable.

<artifactId>auto-value</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>

Choose a reason for hiding this comment

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

Do we need this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, library for annotation, it adds annotation to generated code.

@@ -14,6 +14,15 @@
<description>FastForward client for Java.</description>

<dependencies>
<dependency>
<groupId>com.google.auto.value</groupId>

Choose a reason for hiding this comment

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

Can we avoid using auto value and try keep this client lean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above

@ao2017 ao2017 changed the title Adele/master First draft of metric with distribution support Jul 29, 2020
@ao2017 ao2017 changed the title First draft of metric with distribution support First draft of FFWD java client Metric with distribution support Jul 29, 2020
@malish8632 malish8632 merged commit 082e4b5 into spotify:master Aug 3, 2020
return DoubleValue.create(value);
}

public static Value distributionValue(ByteBuffer byteBuffer) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this should take ByteString as input instead of ByteBuffer since ByteBuffer is not immutable

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

Successfully merging this pull request may close these issues.

4 participants