本文整理汇总了Java中org.apache.hadoop.hbase.client.Durability.USE_DEFAULT属性的典型用法代码示例。如果您正苦于以下问题:Java Durability.USE_DEFAULT属性的具体用法?Java Durability.USE_DEFAULT怎么用?Java Durability.USE_DEFAULT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.hbase.client.Durability
的用法示例。
在下文中一共展示了Durability.USE_DEFAULT属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: useDurability
@Override
public Durability useDurability() {
// return true when at least one mutation requested a WAL flush (default)
Durability durability = Durability.USE_DEFAULT;
for (Mutation m : mutations) {
if (m.getDurability().ordinal() > durability.ordinal()) {
durability = m.getDurability();
}
}
return durability;
}
示例3: initTestTable
public void initTestTable() throws IOException {
Durability durability = Durability.USE_DEFAULT;
if (deferredLogFlush) {
durability = Durability.ASYNC_WAL;
}
HBaseTestingUtility.createPreSplitLoadTestTable(conf, tableName,
getColumnFamilies(), compressAlgo, dataBlockEncodingAlgo, numRegionsPerServer,
regionReplication, durability);
applyColumnFamilyOptions(tableName, getColumnFamilies());
}
示例4: getEffectiveDurability
/**
* Returns effective durability from the passed durability and the table descriptor.
*/
protected Durability getEffectiveDurability(Durability d) {
return d == Durability.USE_DEFAULT ? this.durability : d;
}
示例5: useDurability
@Override
public Durability useDurability() {
return Durability.USE_DEFAULT;
}