TisonKun commented on a change in pull request #10074: [FLINK-14499][Runtime / 
Metrics]MetricRegistry#getMetricQueryServiceGatewayRpcAddress is Nonnull
URL: https://github.com/apache/flink/pull/10074#discussion_r343415894
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
 ##########
 @@ -237,13 +237,14 @@ public TaskExecutor(
                        TaskManagerServices taskExecutorServices,
                        HeartbeatServices heartbeatServices,
                        TaskManagerMetricGroup taskManagerMetricGroup,
-                       @Nullable String metricQueryServiceAddress,
+                       String metricQueryServiceAddress,
                        BlobCacheService blobCacheService,
                        FatalErrorHandler fatalErrorHandler,
                        PartitionTable<JobID> partitionTable) {
 
                super(rpcService, 
AkkaRpcServiceUtils.createRandomName(TASK_MANAGER_NAME));
 
+               Preconditions.checkNotNull(metricQueryServiceAddress);
 
 Review comment:
   IIRC you can change 
   
   ```java
   this.metricQueryServiceAddress = metricQueryServiceAddress;
   ```
   
   to
   
   ```java
   this.metricQueryServiceAddress = checkNotNull(metricQueryServiceAddress);
   ```
   
   instead of a single line.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to