diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java index 2119a3e7cbef..f4cccfd03b04 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java @@ -105,13 +105,6 @@ public Cell getKey() { return delegate.getKey(); } - @Override - public String getKeyString() { - if (atEnd) return null; - - return delegate.getKeyString(); - } - @Override public ByteBuffer getValue() { if (atEnd) return null; @@ -119,13 +112,6 @@ public ByteBuffer getValue() { return delegate.getValue(); } - @Override - public String getValueString() { - if (atEnd) return null; - - return delegate.getValueString(); - } - @Override public Cell getCell() { if (atEnd) return null; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java index 9c9b38c4906b..e0585c6edaa2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java @@ -1040,16 +1040,6 @@ protected Cell getFirstKeyCellInBlock(HFileBlock curBlock) { } } - @Override - public String getKeyString() { - return CellUtil.toString(getKey(), false); - } - - @Override - public String getValueString() { - return ByteBufferUtils.toStringBinary(getValue()); - } - public int compareKey(CellComparator comparator, Cell key) { blockBuffer.asSubByteBuffer(blockBuffer.position() + KEY_VALUE_LEN_SIZE, currKeyLen, pair); this.bufBackedKeyOnlyKv.setKey(pair.getFirst(), pair.getSecond(), currKeyLen, rowLen); @@ -1571,17 +1561,6 @@ public Cell getCell() { return seeker.getCell(); } - @Override - public String getKeyString() { - return CellUtil.toString(getKey(), false); - } - - @Override - public String getValueString() { - ByteBuffer valueBuffer = getValue(); - return ByteBufferUtils.toStringBinary(valueBuffer); - } - private void assertValidSeek() { if (this.curBlock == null) { throw new NotSeekedException(reader.getPath()); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileScanner.java index 0393d3b788a7..b0022788c38f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileScanner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileScanner.java @@ -106,24 +106,6 @@ public interface HFileScanner extends Shipper, Closeable { /** Returns Instance of {@link org.apache.hadoop.hbase.Cell}. */ Cell getCell(); - /** - * Convenience method to get a copy of the key as a string - interpreting the bytes as UTF8. You - * must call {@link #seekTo(Cell)} before this method. - * @return key as a string - * @deprecated Since hbase-2.0.0 - */ - @Deprecated - String getKeyString(); - - /** - * Convenience method to get a copy of the value as a string - interpreting the bytes as UTF8. You - * must call {@link #seekTo(Cell)} before this method. - * @return value as a string - * @deprecated Since hbase-2.0.0 - */ - @Deprecated - String getValueString(); - /** Returns Reader that underlies this Scanner instance. */ HFile.Reader getReader(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java index c757798a3940..b40f39777d8a 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java @@ -32,6 +32,7 @@ import org.apache.hadoop.hbase.Tag; import org.apache.hadoop.hbase.testclassification.IOTests; import org.apache.hadoop.hbase.testclassification.SmallTests; +import org.apache.hadoop.hbase.util.ByteBufferUtils; import org.apache.hadoop.hbase.util.Bytes; import org.junit.ClassRule; import org.junit.Test; @@ -118,7 +119,7 @@ private void testReseekToInternals(TagUsage tagUsage) throws IOException { long start = System.nanoTime(); scanner.seekTo(new KeyValue(Bytes.toBytes(key), Bytes.toBytes("family"), Bytes.toBytes("qual"), Bytes.toBytes(value))); - assertEquals(value, scanner.getValueString()); + assertEquals(value, ByteBufferUtils.toStringBinary(scanner.getValue())); } scanner.seekTo(); @@ -128,7 +129,7 @@ private void testReseekToInternals(TagUsage tagUsage) throws IOException { long start = System.nanoTime(); scanner.reseekTo(new KeyValue(Bytes.toBytes(key), Bytes.toBytes("family"), Bytes.toBytes("qual"), Bytes.toBytes(value))); - assertEquals("i is " + i, value, scanner.getValueString()); + assertEquals("i is " + i, value, ByteBufferUtils.toStringBinary(scanner.getValue())); } reader.close();