Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2836#discussion_r217911368
  
    --- Diff: 
storm-server/src/main/java/org/apache/storm/daemon/nimbus/HeartbeatCache.java 
---
    @@ -0,0 +1,229 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.storm.daemon.nimbus;
    +
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.HashMap;
    +import java.util.HashSet;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.function.Function;
    +import org.apache.storm.generated.Assignment;
    +import org.apache.storm.generated.ExecutorInfo;
    +import org.apache.storm.generated.SupervisorWorkerHeartbeat;
    +import 
org.apache.storm.shade.com.google.common.annotations.VisibleForTesting;
    +import org.apache.storm.stats.ClientStatsUtil;
    +import org.apache.storm.stats.StatsUtil;
    +import org.apache.storm.utils.Time;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +/**
    + * Holds a cache of heartbeats from the workers.
    + */
    +public class HeartbeatCache {
    +    private static final Logger LOG = 
LoggerFactory.getLogger(HeartbeatCache.class);
    +    private static final Function<String, ConcurrentHashMap<List<Integer>, 
ExecutorCache>> MAKE_MAP = (k) -> new ConcurrentHashMap<>();
    +
    +    private static class ExecutorCache {
    +        private Boolean isTimedOut;
    +        private Integer nimbusTime;
    --- End diff --
    
    Please rename to include the unit of time.


---

Reply via email to