diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java index 553346b5848..8a4999a217d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java @@ -69,8 +69,8 @@ public class ClientScanner extends AbstractClientScanner { /** * Create a new ClientScanner for the specified table. An HConnection will be * retrieved using the passed Configuration. - * Note that the passed {@link Scan}'s start row maybe changed changed. - * + * Note that the passed {@link Scan}'s start row maybe changed changed. + * * @param conf The {@link Configuration} to use. * @param scan {@link Scan} to use in this scanner * @param tableName The table that we wish to scan @@ -80,11 +80,11 @@ public class ClientScanner extends AbstractClientScanner { final byte[] tableName) throws IOException { this(conf, scan, tableName, HConnectionManager.getConnection(conf)); } - + /** * Create a new ClientScanner for the specified table - * Note that the passed {@link Scan}'s start row maybe changed changed. - * + * Note that the passed {@link Scan}'s start row maybe changed changed. + * * @param conf The {@link Configuration} to use. * @param scan {@link Scan} to use in this scanner * @param tableName The table that we wish to scan @@ -250,7 +250,6 @@ public class ClientScanner extends AbstractClientScanner { if (this.scanMetrics == null) { return; } - final DataOutputBuffer d = new DataOutputBuffer(); MapReduceProtos.ScanMetrics pScanMetrics = ProtobufUtil.toScanMetrics(scanMetrics); scan.setAttribute(Scan.SCAN_ATTRIBUTES_METRICS_DATA, pScanMetrics.toByteArray()); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.java index 1b63560ecb3..9f59ca24516 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.java @@ -90,13 +90,13 @@ public class FirstKeyOnlyFilter extends FilterBase { */ public static FirstKeyOnlyFilter parseFrom(final byte [] pbBytes) throws DeserializationException { - FilterProtos.FirstKeyOnlyFilter proto; + // There is nothing to deserialize. Why do this at all? try { - proto = FilterProtos.FirstKeyOnlyFilter.parseFrom(pbBytes); + FilterProtos.FirstKeyOnlyFilter.parseFrom(pbBytes); } catch (InvalidProtocolBufferException e) { throw new DeserializationException(e); } - + // Just return a new instance. return new FirstKeyOnlyFilter(); }