YARN-6435. [ATSv2] Can't retrieve more than 1000 versions of metrics in time series. (Rohith Sharma K S via Haibo Chen)
(cherry picked from commit 461ee44d28
)
This commit is contained in:
parent
f7637b55bb
commit
6e2de8b417
|
@ -82,6 +82,13 @@ public class ApplicationTable extends BaseTable<ApplicationTable> {
|
||||||
private static final String METRICS_TTL_CONF_NAME = PREFIX
|
private static final String METRICS_TTL_CONF_NAME = PREFIX
|
||||||
+ ".table.metrics.ttl";
|
+ ".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. */
|
/** default value for application table name. */
|
||||||
private static final String DEFAULT_TABLE_NAME =
|
private static final String DEFAULT_TABLE_NAME =
|
||||||
"timelineservice.application";
|
"timelineservice.application";
|
||||||
|
@ -90,7 +97,7 @@ public class ApplicationTable extends BaseTable<ApplicationTable> {
|
||||||
private static final int DEFAULT_METRICS_TTL = 2592000;
|
private static final int DEFAULT_METRICS_TTL = 2592000;
|
||||||
|
|
||||||
/** default max number of versions. */
|
/** 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 Logger LOG =
|
private static final Logger LOG =
|
||||||
LoggerFactory.getLogger(ApplicationTable.class);
|
LoggerFactory.getLogger(ApplicationTable.class);
|
||||||
|
@ -137,7 +144,8 @@ public class ApplicationTable extends BaseTable<ApplicationTable> {
|
||||||
metricsCF.setBlockCacheEnabled(true);
|
metricsCF.setBlockCacheEnabled(true);
|
||||||
// always keep 1 version (the latest)
|
// always keep 1 version (the latest)
|
||||||
metricsCF.setMinVersions(1);
|
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,
|
metricsCF.setTimeToLive(hbaseConf.getInt(METRICS_TTL_CONF_NAME,
|
||||||
DEFAULT_METRICS_TTL));
|
DEFAULT_METRICS_TTL));
|
||||||
applicationTableDescp.setRegionSplitPolicyClassName(
|
applicationTableDescp.setRegionSplitPolicyClassName(
|
||||||
|
|
|
@ -83,6 +83,13 @@ public class EntityTable extends BaseTable<EntityTable> {
|
||||||
private static final String METRICS_TTL_CONF_NAME = PREFIX
|
private static final String METRICS_TTL_CONF_NAME = PREFIX
|
||||||
+ ".table.metrics.ttl";
|
+ ".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. */
|
/** default value for entity table name. */
|
||||||
public static final String DEFAULT_TABLE_NAME = "timelineservice.entity";
|
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;
|
private static final int DEFAULT_METRICS_TTL = 2592000;
|
||||||
|
|
||||||
/** default max number of versions. */
|
/** 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 Logger LOG =
|
private static final Logger LOG =
|
||||||
LoggerFactory.getLogger(EntityTable.class);
|
LoggerFactory.getLogger(EntityTable.class);
|
||||||
|
@ -137,7 +144,8 @@ public class EntityTable extends BaseTable<EntityTable> {
|
||||||
metricsCF.setBlockCacheEnabled(true);
|
metricsCF.setBlockCacheEnabled(true);
|
||||||
// always keep 1 version (the latest)
|
// always keep 1 version (the latest)
|
||||||
metricsCF.setMinVersions(1);
|
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,
|
metricsCF.setTimeToLive(hbaseConf.getInt(METRICS_TTL_CONF_NAME,
|
||||||
DEFAULT_METRICS_TTL));
|
DEFAULT_METRICS_TTL));
|
||||||
entityTableDescp.setRegionSplitPolicyClassName(
|
entityTableDescp.setRegionSplitPolicyClassName(
|
||||||
|
|
Loading…
Reference in New Issue