public final class HBaseTimelineServerUtils extends Object
Modifier and Type | Method and Description |
---|---|
static List<org.apache.hadoop.hbase.Tag> |
convertCellAsTagList(org.apache.hadoop.hbase.Cell cell)
Convert a cell to a list of tags.
|
static byte[] |
convertTagListToByteArray(List<org.apache.hadoop.hbase.Tag> tags)
Convert a list of tags to a byte array.
|
static org.apache.hadoop.hbase.Cell |
createNewCell(byte[] row,
byte[] family,
byte[] qualifier,
long ts,
byte[] newValue,
byte[] tags)
creates a cell with the given inputs.
|
static org.apache.hadoop.hbase.Cell |
createNewCell(org.apache.hadoop.hbase.Cell origCell,
byte[] newValue)
creates a new cell based on the input cell but with the new value.
|
static org.apache.hadoop.hbase.Tag |
createTag(byte tagType,
byte[] tag)
Create a Tag.
|
static org.apache.hadoop.hbase.Tag |
createTag(byte tagType,
String tag)
Create a Tag.
|
static int |
flushCompactTableRegions(org.apache.hadoop.hbase.regionserver.HRegionServer server,
org.apache.hadoop.hbase.TableName table)
Flush and compact all regions of a table.
|
static String |
getAggregationCompactionDimension(List<org.apache.hadoop.hbase.Tag> tags)
returns app id from the list of tags.
|
static org.apache.hadoop.yarn.server.timelineservice.storage.flow.AggregationOperation |
getAggregationOperationFromTagsList(List<org.apache.hadoop.hbase.Tag> tags)
Returns the first seen aggregation operation as seen in the list of input
tags or null otherwise.
|
static org.apache.hadoop.hbase.Tag |
getTagFromAttribute(Map.Entry<String,byte[]> attribute)
Creates a
Tag from the input attribute. |
static void |
validateFlowRunCoprocessor(org.apache.hadoop.hbase.regionserver.HRegionServer server,
org.apache.hadoop.hbase.TableName table,
boolean existenceExpected)
Check the existence of FlowRunCoprocessor in a table.
|
public static org.apache.hadoop.hbase.Tag getTagFromAttribute(Map.Entry<String,byte[]> attribute)
Tag
from the input attribute.attribute
- Attribute from which tag has to be fetched.public static org.apache.hadoop.hbase.Cell createNewCell(org.apache.hadoop.hbase.Cell origCell, byte[] newValue) throws IOException
origCell
- Original cellnewValue
- new cell valueIOException
- while creating new cell.public static org.apache.hadoop.hbase.Cell createNewCell(byte[] row, byte[] family, byte[] qualifier, long ts, byte[] newValue, byte[] tags) throws IOException
row
- row of the cell to be createdfamily
- column family name of the new cellqualifier
- qualifier for the new cellts
- timestamp of the new cellnewValue
- value of the new celltags
- tags in the new cellIOException
- while creating the cell.public static org.apache.hadoop.hbase.Tag createTag(byte tagType, byte[] tag)
tagType
- tag typetag
- the content of the tag in byte array.public static org.apache.hadoop.hbase.Tag createTag(byte tagType, String tag)
tagType
- tag typetag
- the content of the tag in String.public static List<org.apache.hadoop.hbase.Tag> convertCellAsTagList(org.apache.hadoop.hbase.Cell cell)
cell
- the cell to convertpublic static byte[] convertTagListToByteArray(List<org.apache.hadoop.hbase.Tag> tags)
tags
- the list of tags to convertpublic static String getAggregationCompactionDimension(List<org.apache.hadoop.hbase.Tag> tags)
tags
- cell tags to be looked intopublic static org.apache.hadoop.yarn.server.timelineservice.storage.flow.AggregationOperation getAggregationOperationFromTagsList(List<org.apache.hadoop.hbase.Tag> tags)
tags
- list of HBase tags.public static int flushCompactTableRegions(org.apache.hadoop.hbase.regionserver.HRegionServer server, org.apache.hadoop.hbase.TableName table) throws IOException
server
- region servertable
- the table to flush and compactIOException
public static void validateFlowRunCoprocessor(org.apache.hadoop.hbase.regionserver.HRegionServer server, org.apache.hadoop.hbase.TableName table, boolean existenceExpected) throws Exception
server
- region servertable
- table to checkexistenceExpected
- true if the FlowRunCoprocessor is expected
to be loaded in the table, false otherwiseException
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.