[
https://issues.apache.org/jira/browse/YARN-7931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16428411#comment-16428411
]
Haibo Chen commented on YARN-7931:
----------------------------------
I have one question. The DomainRowKeyConverter.encode() and decode() are not
symmetric. By that I mean, the domainId is not separator-encoded at encoding
time, but will be separator-decoded in decoding time. Will that cause issue if
the domainId happens to contain bytes of escape separators?
{code:java}
@Override
public byte[] encode(DomainRowKey rowKey) {
if (rowKey == null) {
return Separator.EMPTY_BYTES;
}
return Separator.QUALIFIERS.join(Separator.encode(rowKey.getClusterId(),
Separator.SPACE, Separator.TAB, Separator.QUALIFIERS), Bytes
.toBytes(rowKey.getDomainId()));
}
{code}
{code:java}
@Override
public DomainRowKey decode(byte[] rowKey) {
byte[][] rowKeyComponents =
Separator.QUALIFIERS.split(rowKey, SEGMENT_SIZES);
if (rowKeyComponents.length != 2) {
throw new IllegalArgumentException("the row key is not valid for "
+ "a domain id");
}
String clusterId =
Separator.decode(Bytes.toString(rowKeyComponents[0]),
Separator.QUALIFIERS, Separator.TAB, Separator.SPACE);
String domainId =
Separator.decode(Bytes.toString(rowKeyComponents[1]),
Separator.QUALIFIERS, Separator.TAB, Separator.SPACE);
return new DomainRowKey(clusterId, domainId);
}
{code}
dfa
> [atsv2 read acls] Include domain table creation as part of schema creator
> -------------------------------------------------------------------------
>
> Key: YARN-7931
> URL: https://issues.apache.org/jira/browse/YARN-7931
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Vrushali C
> Assignee: Vrushali C
> Priority: Major
> Attachments: YARN-7391.0001.patch, YARN-7391.0002.patch,
> YARN-7391.0003.patch
>
>
>
> Update the schema creator to create a domain table to store timeline entity
> domain info.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]