本文整理汇总了Java中org.apache.hadoop.hbase.client.Durability.SKIP_WAL属性的典型用法代码示例。如果您正苦于以下问题:Java Durability.SKIP_WAL属性的具体用法?Java Durability.SKIP_WAL怎么用?Java Durability.SKIP_WAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.hbase.client.Durability
的用法示例。
在下文中一共展示了Durability.SKIP_WAL属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toDurability
/**
* Convert a protobuf Durability into a client Durability
*/
public static Durability toDurability(
final ClientProtos.MutationProto.Durability proto) {
switch(proto) {
case USE_DEFAULT:
return Durability.USE_DEFAULT;
case SKIP_WAL:
return Durability.SKIP_WAL;
case ASYNC_WAL:
return Durability.ASYNC_WAL;
case SYNC_WAL:
return Durability.SYNC_WAL;
case FSYNC_WAL:
return Durability.FSYNC_WAL;
default:
return Durability.USE_DEFAULT;
}
}
示例2: durabilityFromThrift
private static Durability durabilityFromThrift(TDurability tDurability) {
switch (tDurability.getValue()) {
case 1: return Durability.SKIP_WAL;
case 2: return Durability.ASYNC_WAL;
case 3: return Durability.SYNC_WAL;
case 4: return Durability.FSYNC_WAL;
default: return null;
}
}
示例3: MutationReplay
public MutationReplay(MutationType type, Mutation mutation, long nonceGroup, long nonce) {
this.type = type;
this.mutation = mutation;
if(this.mutation.getDurability() != Durability.SKIP_WAL) {
// using ASYNC_WAL for relay
this.mutation.setDurability(Durability.ASYNC_WAL);
}
this.nonceGroup = nonceGroup;
this.nonce = nonce;
}