YARN-6435. [ATSv2] Can't retrieve more than 1000 versions of metrics in time series. (Rohith Sharma K S via Haibo Chen)

This commit is contained in:
Haibo Chen 2017-05-09 21:10:18 -07:00
parent 166be0ee95
commit 461ee44d28
2 changed files with 20 additions and 4 deletions

View File

@ -82,6 +82,13 @@ public class ApplicationTable extends BaseTable<ApplicationTable> {
private static final String METRICS_TTL_CONF_NAME = PREFIX
+ ".table.metrics.ttl";
/**
* config param name that specifies max-versions for metrics column family in
* entity table.
*/
private static final String METRICS_MAX_VERSIONS =
PREFIX + ".table.metrics.max-versions";
/** default value for application table name. */
private static final String DEFAULT_TABLE_NAME =
"timelineservice.application";
@ -90,7 +97,7 @@ public class ApplicationTable extends BaseTable<ApplicationTable> {
private static final int DEFAULT_METRICS_TTL = 2592000;
/** default max number of versions. */
private static final int DEFAULT_METRICS_MAX_VERSIONS = 1000;
private static final int DEFAULT_METRICS_MAX_VERSIONS = 10000;
private static final Log LOG = LogFactory.getLog(ApplicationTable.class);
@ -136,7 +143,8 @@ public class ApplicationTable extends BaseTable<ApplicationTable> {
metricsCF.setBlockCacheEnabled(true);
// always keep 1 version (the latest)
metricsCF.setMinVersions(1);
metricsCF.setMaxVersions(DEFAULT_METRICS_MAX_VERSIONS);
metricsCF.setMaxVersions(
hbaseConf.getInt(METRICS_MAX_VERSIONS, DEFAULT_METRICS_MAX_VERSIONS));
metricsCF.setTimeToLive(hbaseConf.getInt(METRICS_TTL_CONF_NAME,
DEFAULT_METRICS_TTL));
applicationTableDescp.setRegionSplitPolicyClassName(

View File

@ -83,6 +83,13 @@ public class EntityTable extends BaseTable<EntityTable> {
private static final String METRICS_TTL_CONF_NAME = PREFIX
+ ".table.metrics.ttl";
/**
* config param name that specifies max-versions for metrics column family in
* entity table.
*/
private static final String METRICS_MAX_VERSIONS =
PREFIX + ".table.metrics.max-versions";
/** default value for entity table name. */
public static final String DEFAULT_TABLE_NAME = "timelineservice.entity";
@ -90,7 +97,7 @@ public class EntityTable extends BaseTable<EntityTable> {
private static final int DEFAULT_METRICS_TTL = 2592000;
/** default max number of versions. */
private static final int DEFAULT_METRICS_MAX_VERSIONS = 1000;
private static final int DEFAULT_METRICS_MAX_VERSIONS = 10000;
private static final Log LOG = LogFactory.getLog(EntityTable.class);
@ -136,7 +143,8 @@ public class EntityTable extends BaseTable<EntityTable> {
metricsCF.setBlockCacheEnabled(true);
// always keep 1 version (the latest)
metricsCF.setMinVersions(1);
metricsCF.setMaxVersions(DEFAULT_METRICS_MAX_VERSIONS);
metricsCF.setMaxVersions(
hbaseConf.getInt(METRICS_MAX_VERSIONS, DEFAULT_METRICS_MAX_VERSIONS));
metricsCF.setTimeToLive(hbaseConf.getInt(METRICS_TTL_CONF_NAME,
DEFAULT_METRICS_TTL));
entityTableDescp.setRegionSplitPolicyClassName(