Class HBaseTimelineStorageUtils
java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.common.HBaseTimelineStorageUtils
A bunch of utility functions used in HBase TimelineService backend.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]calculateTheClosestNextRowKeyForPrefix(byte[] rowKeyPrefix) Given a row key prefix stored in a byte array, return a byte array for its immediate next row key.static org.apache.hadoop.conf.ConfigurationgetTimelineServiceHBaseConf(org.apache.hadoop.conf.Configuration conf) static voidsetMetricsTimeRange(org.apache.hadoop.hbase.client.Query query, byte[] metricsCf, long tsBegin, long tsEnd)
-
Method Details
-
getTimelineServiceHBaseConf
public static org.apache.hadoop.conf.Configuration getTimelineServiceHBaseConf(org.apache.hadoop.conf.Configuration conf) throws IOException - Parameters:
conf- YARN configuration. Used to see if there is an explicit config pointing to the HBase config file to read. It should not be null or a NullPointerException will be thrown.- Returns:
- a configuration with the HBase configuration from the classpath, optionally overwritten by the timeline service configuration URL if specified.
- Throws:
IOException- if a timeline service HBase configuration URL is specified but unable to read it.
-
calculateTheClosestNextRowKeyForPrefix
public static byte[] calculateTheClosestNextRowKeyForPrefix(byte[] rowKeyPrefix) Given a row key prefix stored in a byte array, return a byte array for its immediate next row key.- Parameters:
rowKeyPrefix- The provided row key prefix, represented in an array.- Returns:
- the closest next row key of the provided row key.
-
setMetricsTimeRange
public static void setMetricsTimeRange(org.apache.hadoop.hbase.client.Query query, byte[] metricsCf, long tsBegin, long tsEnd)
-