本文整理了Java中org.apache.hadoop.hbase.client.Put.setFamilyCellMap()
方法的一些代码示例,展示了Put.setFamilyCellMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Put.setFamilyCellMap()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Put
类名称:Put
方法名:setFamilyCellMap
[英]Method for setting the put's familyMap
[中]
代码示例来源:origin: apache/hbase
/**
* Add updates first to the wal and then add values to memstore.
* <p>
* Warning: Assumption is caller has lock on passed in row.
* @param edits Cell updates by column
*/
void put(final byte[] row, byte[] family, List<Cell> edits) throws IOException {
NavigableMap<byte[], List<Cell>> familyMap;
familyMap = new TreeMap<>(Bytes.BYTES_COMPARATOR);
familyMap.put(family, edits);
Put p = new Put(row);
p.setFamilyCellMap(familyMap);
doBatchMutate(p);
}
代码示例来源:origin: apache/hbase
private boolean doCheckAndDelete(byte[] row, byte[] family, byte[] qualifier,
byte[] value, Delete delete) throws IOException {
Put put = new Put(row);
put.setFamilyCellMap(delete.getFamilyCellMap());
代码示例来源:origin: harbby/presto-connectors
/**
* Add updates first to the wal and then add values to memstore.
* Warning: Assumption is caller has lock on passed in row.
* @param edits Cell updates by column
* @throws IOException
*/
private void put(final byte [] row, byte [] family, List<Cell> edits)
throws IOException {
NavigableMap<byte[], List<Cell>> familyMap;
familyMap = new TreeMap<byte[], List<Cell>>(Bytes.BYTES_COMPARATOR);
familyMap.put(family, edits);
Put p = new Put(row);
p.setFamilyCellMap(familyMap);
doBatchMutate(p);
}
代码示例来源:origin: org.apache.hbase/hbase-rest
private boolean doCheckAndDelete(byte[] row, byte[] family, byte[] qualifier,
byte[] value, Delete delete) throws IOException {
Put put = new Put(row);
put.setFamilyCellMap(delete.getFamilyCellMap());
代码示例来源:origin: com.aliyun.hbase/alihbase-rest
private boolean doCheckAndDelete(byte[] row, byte[] family, byte[] qualifier,
byte[] value, Delete delete) throws IOException {
Put put = new Put(row);
put.setFamilyCellMap(delete.getFamilyCellMap());
代码示例来源:origin: co.cask.tigon/tigon-hbase-compat-0.96
@Override
public void prePut(ObserverContext<RegionCoprocessorEnvironment> ctx, Put put, WALEdit edit, Durability durability)
throws IOException {
if (put.getAttribute(Constants.DELTA_WRITE) != null) {
// incremental write
NavigableMap<byte[], List<Cell>> newFamilyMap = new TreeMap<byte[], List<Cell>>(Bytes.BYTES_COMPARATOR);
for (Map.Entry<byte[], List<Cell>> entry : put.getFamilyCellMap().entrySet()) {
List<Cell> newCells = new ArrayList<Cell>(entry.getValue().size());
for (Cell cell : entry.getValue()) {
// rewrite the cell value with a special prefix to identify it as a delta
// for 0.98 we can update this to use cell tags
byte[] newValue = Bytes.add(DELTA_MAGIC_PREFIX, CellUtil.cloneValue(cell));
newCells.add(CellUtil.createCell(CellUtil.cloneRow(cell), CellUtil.cloneFamily(cell),
CellUtil.cloneQualifier(cell), cell.getTimestamp(), cell.getTypeByte(),
newValue));
}
newFamilyMap.put(entry.getKey(), newCells);
}
put.setFamilyCellMap(newFamilyMap);
}
// put completes normally with value prefix marker
}
代码示例来源:origin: caskdata/cdap
put.setFamilyCellMap(newFamilyMap);
代码示例来源:origin: cdapio/cdap
put.setFamilyCellMap(newFamilyMap);
代码示例来源:origin: cdapio/cdap
put.setFamilyCellMap(newFamilyMap);
代码示例来源:origin: cdapio/cdap
put.setFamilyCellMap(newFamilyMap);
代码示例来源:origin: cdapio/cdap
put.setFamilyCellMap(newFamilyMap);
代码示例来源:origin: caskdata/cdap
put.setFamilyCellMap(newFamilyMap);
代码示例来源:origin: caskdata/cdap
put.setFamilyCellMap(newFamilyMap);
内容来源于网络,如有侵权,请联系作者删除!