HBASE-16139 Use CellUtil instead of KeyValueUtil in Import (NIDHI GAMBHIR)
This commit is contained in:
parent
432868b038
commit
6fb0dd07a8
|
@ -1505,6 +1505,10 @@ public final class CellUtil {
|
||||||
}
|
}
|
||||||
return new FirstOnRowCell(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength());
|
return new FirstOnRowCell(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Cell createFirstOnRow(final byte [] row, int roffset, short rlength) {
|
||||||
|
return new FirstOnRowCell(row, roffset, rlength);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a Cell that is smaller than all other possible Cells for the given Cell's row.
|
* Create a Cell that is smaller than all other possible Cells for the given Cell's row.
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class Import extends Configured implements Tool {
|
||||||
+ Bytes.toString(row.get(), row.getOffset(), row.getLength()));
|
+ Bytes.toString(row.get(), row.getOffset(), row.getLength()));
|
||||||
}
|
}
|
||||||
if (filter == null
|
if (filter == null
|
||||||
|| !filter.filterRowKey(KeyValueUtil.createFirstOnRow(row.get(), row.getOffset(),
|
|| !filter.filterRowKey(CellUtil.createFirstOnRow(row.get(), row.getOffset(),
|
||||||
(short) row.getLength()))) {
|
(short) row.getLength()))) {
|
||||||
for (Cell kv : value.rawCells()) {
|
for (Cell kv : value.rawCells()) {
|
||||||
kv = filterKv(filter, kv);
|
kv = filterKv(filter, kv);
|
||||||
|
@ -275,7 +275,7 @@ public class Import extends Configured implements Tool {
|
||||||
+ Bytes.toString(row.get(), row.getOffset(), row.getLength()));
|
+ Bytes.toString(row.get(), row.getOffset(), row.getLength()));
|
||||||
}
|
}
|
||||||
if (filter == null
|
if (filter == null
|
||||||
|| !filter.filterRowKey(KeyValueUtil.createFirstOnRow(row.get(), row.getOffset(),
|
|| !filter.filterRowKey(CellUtil.createFirstOnRow(row.get(), row.getOffset(),
|
||||||
(short) row.getLength()))) {
|
(short) row.getLength()))) {
|
||||||
for (Cell kv : value.rawCells()) {
|
for (Cell kv : value.rawCells()) {
|
||||||
kv = filterKv(filter, kv);
|
kv = filterKv(filter, kv);
|
||||||
|
@ -332,7 +332,7 @@ public class Import extends Configured implements Tool {
|
||||||
+ Bytes.toString(key.get(), key.getOffset(), key.getLength()));
|
+ Bytes.toString(key.get(), key.getOffset(), key.getLength()));
|
||||||
}
|
}
|
||||||
if (filter == null
|
if (filter == null
|
||||||
|| !filter.filterRowKey(KeyValueUtil.createFirstOnRow(key.get(), key.getOffset(),
|
|| !filter.filterRowKey(CellUtil.createFirstOnRow(key.get(), key.getOffset(),
|
||||||
(short) key.getLength()))) {
|
(short) key.getLength()))) {
|
||||||
processKV(key, result, context, put, delete);
|
processKV(key, result, context, put, delete);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue