public abstract class CounterCache<Config,JobStatus,Counters> extends Object
Modifier and Type | Field and Description |
---|---|
protected Config |
configuration |
static String |
COUNTER_FETCH_RETRIES_PROPERTY |
static String |
COUNTER_MAX_AGE_PROPERTY |
static String |
COUNTER_TIMEOUT_PROPERTY |
static int |
DEFAULT_CACHED_AGE_MAX |
static int |
DEFAULT_FETCH_RETRIES |
static int |
DEFAULT_NODE_CACHED_AGE_MAX |
static int |
DEFAULT_TIMEOUT_TIMEOUT_SEC |
protected int |
fetchAttempts |
protected int |
maxAge |
protected int |
maxFetchAttempts |
static String |
NODE_COUNTER_MAX_AGE_PROPERTY |
protected int |
timeout |
Modifier | Constructor and Description |
---|---|
protected |
CounterCache(CascadingStats stats,
Config configuration) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
areCountersAvailable(JobStatus runningJob) |
Counters |
cachedCounters() |
Counters |
cachedCounters(boolean force) |
Collection<String> |
getCounterGroups() |
Collection<String> |
getCounterGroupsMatching(String regex) |
protected abstract Counters |
getCounters(JobStatus runningJob) |
protected abstract Set<String> |
getCountersFor(Counters counters,
String group) |
Collection<String> |
getCountersFor(String group) |
protected abstract long |
getCounterValue(Counters counters,
Enum counter) |
protected abstract long |
getCounterValue(Counters counters,
String group,
String counter) |
long |
getCounterValue(Enum counter) |
long |
getCounterValue(String group,
String counter) |
protected abstract Collection<String> |
getGroupNames(Counters counters) |
protected abstract int |
getIntProperty(String property,
int defaultValue) |
protected abstract JobStatus |
getJobStatusClient() |
long |
getLastSuccessfulFetch() |
public static final String COUNTER_TIMEOUT_PROPERTY
public static final String COUNTER_FETCH_RETRIES_PROPERTY
public static final String COUNTER_MAX_AGE_PROPERTY
public static final String NODE_COUNTER_MAX_AGE_PROPERTY
public static final int DEFAULT_TIMEOUT_TIMEOUT_SEC
public static final int DEFAULT_FETCH_RETRIES
public static final int DEFAULT_CACHED_AGE_MAX
public static final int DEFAULT_NODE_CACHED_AGE_MAX
protected int maxFetchAttempts
protected int fetchAttempts
protected int timeout
protected int maxAge
protected final Config configuration
protected CounterCache(CascadingStats stats, Config configuration)
protected abstract int getIntProperty(String property, int defaultValue)
public long getLastSuccessfulFetch()
protected abstract JobStatus getJobStatusClient()
protected abstract boolean areCountersAvailable(JobStatus runningJob)
protected abstract Counters getCounters(JobStatus runningJob) throws IOException
IOException
protected abstract Collection<String> getGroupNames(Counters counters)
protected abstract Set<String> getCountersFor(Counters counters, String group)
protected abstract long getCounterValue(Counters counters, Enum counter)
protected abstract long getCounterValue(Counters counters, String group, String counter)
public Collection<String> getCounterGroups()
public Collection<String> getCounterGroupsMatching(String regex)
public Collection<String> getCountersFor(String group)
public long getCounterValue(Enum counter)
public long getCounterValue(String group, String counter)
public Counters cachedCounters()
public Counters cachedCounters(boolean force)
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.