本文整理汇总了Java中org.apache.hadoop.hbase.util.FSUtils.isRecoveredEdits方法的典型用法代码示例。如果您正苦于以下问题:Java FSUtils.isRecoveredEdits方法的具体用法?Java FSUtils.isRecoveredEdits怎么用?Java FSUtils.isRecoveredEdits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.util.FSUtils
的用法示例。
在下文中一共展示了FSUtils.isRecoveredEdits方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.hadoop.hbase.util.FSUtils; //导入方法依赖的package包/类
@Override
public void init(FileSystem fs, Path path, Configuration conf, FSDataInputStream stream)
throws IOException {
this.conf = conf;
this.path = path;
this.fs = fs;
this.fileLength = this.fs.getFileStatus(path).getLen();
String cellCodecClsName = initReader(stream);
boolean compression = hasCompression();
if (compression) {
// If compression is enabled, new dictionaries are created here.
try {
if (compressionContext == null) {
compressionContext = new CompressionContext(LRUDictionary.class,
FSUtils.isRecoveredEdits(path), hasTagCompression());
} else {
compressionContext.clear();
}
} catch (Exception e) {
throw new IOException("Failed to initialize CompressionContext", e);
}
}
initAfterCompression(cellCodecClsName);
}
示例2: initializeCompressionContext
import org.apache.hadoop.hbase.util.FSUtils; //导入方法依赖的package包/类
public boolean initializeCompressionContext(Configuration conf, Path path) throws IOException {
boolean doCompress = conf.getBoolean(HConstants.ENABLE_WAL_COMPRESSION, false);
if (doCompress) {
try {
this.compressionContext = new CompressionContext(LRUDictionary.class,
FSUtils.isRecoveredEdits(path), conf.getBoolean(
CompressionContext.ENABLE_WAL_TAGS_COMPRESSION, true));
} catch (Exception e) {
throw new IOException("Failed to initiate CompressionContext", e);
}
}
return doCompress;
}