本文整理了Java中org.apache.hadoop.hbase.client.Put.getDurability()
方法的一些代码示例,展示了Put.getDurability()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Put.getDurability()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Put
类名称:Put
方法名:getDurability
暂无
代码示例来源:origin: apache/hbase
@Override
public void checkAndPreparePut(Put p) throws IOException {
region.checkFamilies(p.getFamilyCellMap().keySet(), p.getDurability());
}
代码示例来源:origin: apache/hbase
out.setTimestamp(in.getTimestamp());
if (in.getDurability() != Durability.USE_DEFAULT) {
out.setDurability(durabilityFromHBase(in.getDurability()));
代码示例来源:origin: apache/hbase
tPut.setDurability(TDurability.SKIP_WAL);
Put put = putFromThrift(tPut);
assertEquals(Durability.SKIP_WAL, put.getDurability());
assertEquals(Durability.ASYNC_WAL, put.getDurability());
assertEquals(Durability.SYNC_WAL, put.getDurability());
assertEquals(Durability.FSYNC_WAL, put.getDurability());
代码示例来源:origin: org.apache.tephra/tephra-hbase-compat-0.98
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: org.apache.tephra/tephra-hbase-compat-1.0
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: org.apache.tephra/tephra-hbase-compat-1.0-cdh
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: co.cask.tephra/tephra-hbase-compat-1.0
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: org.apache.tephra/tephra-hbase-compat-1.1
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: caskdata/tephra
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: org.apache.tephra/tephra-hbase-compat-0.96
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: caskdata/tephra
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: co.cask.tephra/tephra-hbase-compat-0.96
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: co.cask.tephra/tephra-hbase-compat-1.1
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: caskdata/tephra
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: caskdata/tephra
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: caskdata/tephra
private Put transactionalizeAction(Put put) throws IOException {
Put txPut = new Put(put.getRow(), tx.getWritePointer());
Set<Map.Entry<byte[], List<Cell>>> familyMap = put.getFamilyCellMap().entrySet();
if (!familyMap.isEmpty()) {
for (Map.Entry<byte[], List<Cell>> family : familyMap) {
List<Cell> familyValues = family.getValue();
if (!familyValues.isEmpty()) {
for (Cell value : familyValues) {
txPut.add(value.getFamily(), value.getQualifier(), tx.getWritePointer(), value.getValue());
addToChangeSet(txPut.getRow(), value.getFamily(), value.getQualifier());
}
}
}
}
for (Map.Entry<String, byte[]> entry : put.getAttributesMap().entrySet()) {
txPut.setAttribute(entry.getKey(), entry.getValue());
}
txPut.setDurability(put.getDurability());
addToOperation(txPut, tx);
return txPut;
}
代码示例来源:origin: org.apache.hbase/hbase-thrift
tPut.setDurability(TDurability.SKIP_WAL);
Put put = putFromThrift(tPut);
assertEquals(Durability.SKIP_WAL, put.getDurability());
assertEquals(Durability.ASYNC_WAL, put.getDurability());
assertEquals(Durability.SYNC_WAL, put.getDurability());
assertEquals(Durability.FSYNC_WAL, put.getDurability());
代码示例来源:origin: com.aliyun.hbase/alihbase-thrift
tPut.setDurability(TDurability.SKIP_WAL);
Put put = putFromThrift(tPut);
assertEquals(Durability.SKIP_WAL, put.getDurability());
assertEquals(Durability.ASYNC_WAL, put.getDurability());
assertEquals(Durability.SYNC_WAL, put.getDurability());
assertEquals(Durability.FSYNC_WAL, put.getDurability());
内容来源于网络,如有侵权,请联系作者删除!