pkuwm commented on a change in pull request #1383:
URL: https://github.com/apache/helix/pull/1383#discussion_r497070180
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/service/InstanceServiceImpl.java
##########
@@ -58,9 +63,18 @@
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
private static final ExecutorService POOL = Executors.newCachedThreadPool();
+ // Metric names for custom instance check
+ private static final String CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_TOTAL =
+ MetricRegistry.name(InstanceService.class,
"custom_instance_check_http_requests_total");
+ private static final String CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_ERROR_TOTAL =
+ MetricRegistry.name(InstanceService.class,
"custom_instance_check_http_requests_error_total");
+ private static final String CUSTOM_INSTANCE_CHECK_HTTP_REQUEST_DURATION =
+ MetricRegistry.name(InstanceService.class,
"custom_instance_check_http_request_duration");
+
private final HelixDataAccessorWrapper _dataAccessor;
Review comment:
Moved. Thx.
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/service/InstanceServiceImpl.java
##########
@@ -58,29 +62,44 @@
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
private static final ExecutorService POOL = Executors.newCachedThreadPool();
+ // Metric names for custom instance check
+ private static final String CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_TOTAL =
+ MetricRegistry.name(InstanceService.class,
"custom_instance_check_http_requests_total");
+ private static final String CUSTOM_INSTANCE_CHECK_HTTP_REQUESTS_ERROR_TOTAL =
+ MetricRegistry.name(InstanceService.class,
"custom_instance_check_http_requests_error_total");
+ private static final String CUSTOM_INSTANCE_CHECK_HTTP_REQUEST_DURATION =
+ MetricRegistry.name(InstanceService.class,
"custom_instance_check_http_request_duration");
+
private final HelixDataAccessorWrapper _dataAccessor;
private final ConfigAccessor _configAccessor;
private final CustomRestClient _customRestClient;
+ private String _namespace;
private boolean _skipZKRead;
+ @Deprecated
public InstanceServiceImpl(HelixDataAccessorWrapper dataAccessor,
ConfigAccessor configAccessor) {
- _dataAccessor = dataAccessor;
- _configAccessor = configAccessor;
- _customRestClient = CustomRestClientFactory.get();
+ this(dataAccessor, configAccessor, false);
}
- public InstanceServiceImpl(HelixDataAccessorWrapper dataAccessor,
ConfigAccessor configAccessor, boolean skipZKRead) {
- this(dataAccessor,configAccessor);
- this._skipZKRead = skipZKRead;
+ @Deprecated
+ public InstanceServiceImpl(HelixDataAccessorWrapper dataAccessor,
ConfigAccessor configAccessor,
+ boolean skipZKRead) {
+ this(dataAccessor, configAccessor, skipZKRead,
HelixRestNamespace.DEFAULT_NAMESPACE_NAME);
+ }
Review comment:
Since helix is open source, I prefer to follow a standard process:
deprecate first and then remove it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]