本文整理汇总了Java中org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_EDITS_PLUGIN_PREFIX属性的典型用法代码示例。如果您正苦于以下问题:Java DFSConfigKeys.DFS_NAMENODE_EDITS_PLUGIN_PREFIX属性的具体用法?Java DFSConfigKeys.DFS_NAMENODE_EDITS_PLUGIN_PREFIX怎么用?Java DFSConfigKeys.DFS_NAMENODE_EDITS_PLUGIN_PREFIX使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.hdfs.DFSConfigKeys
的用法示例。
在下文中一共展示了DFSConfigKeys.DFS_NAMENODE_EDITS_PLUGIN_PREFIX属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getJournalClass
/**
* Retrieve the implementation class for a Journal scheme.
* @param conf The configuration to retrieve the information from
* @param uriScheme The uri scheme to look up.
* @return the class of the journal implementation
* @throws IllegalArgumentException if no class is configured for uri
*/
static Class<? extends JournalManager> getJournalClass(Configuration conf,
String uriScheme) {
String key
= DFSConfigKeys.DFS_NAMENODE_EDITS_PLUGIN_PREFIX + "." + uriScheme;
Class <? extends JournalManager> clazz = null;
try {
clazz = conf.getClass(key, null, JournalManager.class);
} catch (RuntimeException re) {
throw new IllegalArgumentException(
"Invalid class specified for " + uriScheme, re);
}
if (clazz == null) {
LOG.warn("No class configured for " +uriScheme
+ ", " + key + " is empty");
throw new IllegalArgumentException(
"No class configured for " + uriScheme);
}
return clazz;
}