public abstract class CounterCache<JobStatus,Counters> extends Object
Modifier and Type | Field and Description |
---|---|
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_TIMEOUT_TIMEOUT_SEC |
protected int |
fetchAttempts |
protected int |
maxAge |
protected int |
maxFetchAttempts |
protected int |
timeout |
Modifier | Constructor and Description |
---|---|
protected |
CounterCache(CascadingStats stats,
Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
areCountersAvailable(JobStatus runningJob) |
protected Counters |
cachedCounters() |
protected 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 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 int DEFAULT_TIMEOUT_TIMEOUT_SEC
public static final int DEFAULT_FETCH_RETRIES
public static final int DEFAULT_CACHED_AGE_MAX
protected int maxFetchAttempts
protected int fetchAttempts
protected int timeout
protected int maxAge
protected CounterCache(CascadingStats stats, Configuration configuration)
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)
protected Counters cachedCounters()
protected Counters cachedCounters(boolean force)
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.