-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add 'show available urls' #16441
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
base: master
Are you sure you want to change the base?
Add 'show available urls' #16441
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #16441 +/- ##
=========================================
Coverage 38.65% 38.65%
Complexity 207 207
=========================================
Files 4936 4939 +3
Lines 326722 326787 +65
Branches 41471 41476 +5
=========================================
+ Hits 126279 126310 +31
- Misses 200443 200477 +34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
new ColumnHeader(NODE_ID, TSDataType.INT32), | ||
new ColumnHeader(STATUS, TSDataType.TEXT), |
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.
no need to expose these two columns to users, they only need to know ip and port is enough.
@Override | ||
public TSStatus visitShowAvailableUrls( | ||
ShowAvailableUrlsStatement showAvailableUrlsStatement, TreeAccessCheckContext context) { | ||
return SUCCEED; |
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.
better to add recordObjectAuthenticationAuditLog for these operation even if they require no privilege. Auth in audit log for such operations can be null.
while (iterator.next()) { | ||
String ip = iterator.getString(IP_COLUMN_NAME); | ||
// ignore 0.0.0.0 and removing DN | ||
if (!REMOVING_STATUS.equals(iterator.getString(STATUS_COLUMN_NAME)) |
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.
filter removing DN in server implement
.collect(Collectors.toList()); | ||
TsBlockBuilder builder = new TsBlockBuilder(outputDataTypes); | ||
if (showDataNodesResp.getDataNodesInfoList() != null) { | ||
for (TDataNodeInfo dataNodeInfo : showDataNodesResp.getDataNodesInfoList()) { |
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.
filter removing DN here
try (SessionDataSet sessionDataSet = | ||
client.executeQueryStatement(SHOW_DATA_NODES_COMMAND, TIMEOUT_IN_MS, FETCH_SIZE)) { | ||
updateAvailableNodes(sessionDataSet); | ||
} catch (Exception e2) { |
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.
no need to do this compatibility
|
Description
Add 'show available urls'