HBASE-9962. Improve tag iteration
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1541772 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1545a952fa
commit
61cabc3b2c
|
@ -380,14 +380,14 @@ public final class CellUtil {
|
|||
|
||||
/********************* tags *************************************/
|
||||
/**
|
||||
* Util method to iterate through the tags. Used in testcase
|
||||
* Util method to iterate through the tags
|
||||
*
|
||||
* @param tags
|
||||
* @param offset
|
||||
* @param length
|
||||
* @return iterator for the tags
|
||||
*/
|
||||
public static Iterator<Tag> tagsIterator(final byte[] tags, final int offset, final short length) {
|
||||
public static Iterator<Tag> tagsIterator(final byte[] tags, final int offset, final int length) {
|
||||
return new Iterator<Tag>() {
|
||||
private int pos = offset;
|
||||
private int endOffset = offset + length - 1;
|
||||
|
|
|
@ -119,14 +119,14 @@ public class Tag {
|
|||
/**
|
||||
* @return Length of actual tag bytes within the backed buffer
|
||||
*/
|
||||
int getTagLength() {
|
||||
public int getTagLength() {
|
||||
return this.length - INFRASTRUCTURE_SIZE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Offset of actual tag bytes within the backed buffer
|
||||
*/
|
||||
int getTagOffset() {
|
||||
public int getTagOffset() {
|
||||
return this.offset + INFRASTRUCTURE_SIZE;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ public class Tag {
|
|||
* @param length
|
||||
* @return List of tags
|
||||
*/
|
||||
public static List<Tag> asList(byte[] b, int offset, short length) {
|
||||
public static List<Tag> asList(byte[] b, int offset, int length) {
|
||||
List<Tag> tags = new ArrayList<Tag>();
|
||||
int pos = offset;
|
||||
while (pos < offset + length) {
|
||||
|
|
Loading…
Reference in New Issue