-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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.
ffwd-client/pom.xml
Outdated
<dependency> | ||
<groupId>com.google.protobuf</groupId> | ||
<artifactId>protobuf-java</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
return DoubleValue.create(value); | ||
} | ||
|
||
public static Value distributionValue(ByteBuffer byteBuffer) { |
There was a problem hiding this comment.
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
This is the first cut of Metric with distribution (new histogram ) support. New features includes: