Skip to content

Commit

Permalink
fix javac warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Apache9 committed Jul 29, 2024
1 parent 55d6613 commit d3d3f32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,25 +147,6 @@ default int getChunkId() {
*/
long getSequenceId();

/**
* Contiguous raw bytes representing tags that may start at any index in the containing array.
* @return the tags byte array
*/
byte[] getTagsArray();

/** Returns the first offset where the tags start in the Cell */
int getTagsOffset();

/**
* HBase internally uses 2 bytes to store tags length in Cell. As the tags length is always a
* non-negative number, to make good use of the sign bit, the max of tags length is defined 2 *
* Short.MAX_VALUE + 1 = 65535. As a result, the return type is int, because a short is not
* capable of handling that. Please note that even if the return type is int, the max tags length
* is far less than Integer.MAX_VALUE.
* @return the total length of the tags in the Cell.
*/
int getTagsLength();

/** Returns The byte representation of the KeyValue.TYPE of this cell: one of Put, Delete, etc */
byte getTypeByte();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.Map.Entry;
import java.util.NavigableMap;
import java.util.Optional;
import org.apache.hadoop.hbase.Cell.Type;
import org.apache.hadoop.hbase.filter.ByteArrayComparable;
import org.apache.hadoop.hbase.io.TagCompressionContext;
import org.apache.hadoop.hbase.io.util.Dictionary;
Expand Down Expand Up @@ -1649,7 +1648,7 @@ public byte getTypeByte() {
}

@Override
public Type getType() {
public Cell.Type getType() {
throw new UnsupportedOperationException();
}
}
Expand Down Expand Up @@ -3068,13 +3067,13 @@ public boolean advance() {
private static final Cell.Type[] CELL_TYPE_CODE_ARRAY = new Cell.Type[256];

static {
for (Type t : Type.values()) {
for (Cell.Type t : Cell.Type.values()) {
CELL_TYPE_CODE_ARRAY[t.getCode() & 0xff] = t;
}
}

public static Cell.Type code2Type(byte code) {
Type t = CELL_TYPE_CODE_ARRAY[code & 0xff];
Cell.Type t = CELL_TYPE_CODE_ARRAY[code & 0xff];
if (t != null) {
return t;
}
Expand Down

0 comments on commit d3d3f32

Please sign in to comment.