HBASE-14766 In WALEntryFilter, cell.getFamily() needs to be replaced with the new low-cost implementation (huaxiang sun)

This commit is contained in:
tedyu 2015-11-10 14:18:59 -08:00
parent c817aa386c
commit 867a5ea188
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,6 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellUtil;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.wal.WAL.Entry;
@ -63,7 +62,8 @@ public class TableCfWALEntryFilter implements WALEntryFilter {
Cell cell = cells.get(i);
// ignore(remove) kv if its cf isn't in the replicable cf list
// (empty cfs means all cfs of this table are replicable)
if ((cfs != null && !cfs.contains(Bytes.toString(CellUtil.cloneFamily(cell))))) {
if ((cfs != null) && !cfs.contains(Bytes.toString(
cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength()))) {
cells.remove(i);
}
}