-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-26474 Implement connection-level attributes #3952
HBASE-26474 Implement connection-level attributes #3952
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionLocator.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
@SuppressWarnings("unchecked") | ||
public B self() { |
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.
Why we need to have so complicated class hierarchy? A class has a generic type parameter which is just itself?
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 don't like it either. Java really sucks for inheritance with the builder pattern. I could try to rebuild it using mix-ins, but I think that will be equally complex.
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've pushed a change that replaces build inheritance with a mix-in style of builder. I don't really like it any better, let me know what you think.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableTracing.java
Outdated
Show resolved
Hide resolved
6df2a9d
to
7df1343
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionLocator.java
Outdated
Show resolved
Hide resolved
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionLocatorTracing.java
Show resolved
Hide resolved
3dc359f
to
c39630d
Compare
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.
Overall LGTM.
Just a minor question on the naming, not a veto. I'm not sure if there are other meanings for a connection string so you choose to use something like a hostname. Just go with your opinion.
@@ -68,6 +68,11 @@ public ShortCircuitConnectionRegistry(ConnectionRegistryEndpoint endpoint) { | |||
return future; | |||
} | |||
|
|||
@Override | |||
public String getConnectionString() { | |||
return "localhost"; |
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.
Maybe just call it short-circuit? I do not think localhost is accurate enough, it may implies that we are connecting to a regsitry through network but on the same machine? For short-circuit we know that we are using the ShortCircuitConnectionRegistry.
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.
This is a good point; localhost
does have a specific meaning. Let me consider it, perhaps I can propose a better name. "short-circuit" isn't too bad.
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Add support for `db.system`, `db.connection_string`, `db.user`.
* address checkstyle complaints * remove member variable `user` from TestAsyncTableTracing
* replace inheritance in *SpanBuilders with a mix-in approach
c39630d
to
acfac73
Compare
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Thank you, @Apache9 ! |
Add support for `db.system`, `db.connection_string`, `db.user`. Signed-off-by: Duo Zhang <zhangduo@apache.org>
Add support for `db.system`, `db.connection_string`, `db.user`. Signed-off-by: Duo Zhang <zhangduo@apache.org>
Add support for
db.system
,db.connection_string
,db.user
.As per https://github.com/open-telemetry/opentelemetry-specification/blob/3e380e249f60c3a5f68746f5e84d10195ba41a79/specification/trace/semantic_conventions/database.md