本文整理汇总了Java中com.cloudera.sqoop.tool.ToolDesc类的典型用法代码示例。如果您正苦于以下问题:Java ToolDesc类的具体用法?Java ToolDesc怎么用?Java ToolDesc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ToolDesc类属于com.cloudera.sqoop.tool包,在下文中一共展示了ToolDesc类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadPlugins
import com.cloudera.sqoop.tool.ToolDesc; //导入依赖的package包/类
/**
* Load plugins referenced in sqoop-site.xml or other config (e.g., tools.d/),
* to allow external tool definitions.
*
* @return the Configuration used to load the plugins.
*/
public static Configuration loadPlugins(Configuration conf) {
conf = loadPluginsFromConfDir(conf);
List<ToolPlugin> plugins =
org.apache.sqoop.config.ConfigurationHelper.getInstances(
conf, TOOL_PLUGINS_KEY, ToolPlugin.class);
for (ToolPlugin plugin : plugins) {
LOG.debug("Loading plugin: " + plugin.getClass().getName());
List<ToolDesc> descriptions = plugin.getTools();
for (ToolDesc desc : descriptions) {
LOG.debug(" Adding tool: " + desc.getName()
+ " -> " + desc.getToolClass().getName());
registerTool(desc);
}
}
return conf;
}
示例2: registerTool
import com.cloudera.sqoop.tool.ToolDesc; //导入依赖的package包/类
/**
* Add tool to available set of SqoopTool instances using the ToolDesc
* struct as the sole argument.
*/
private static void registerTool(ToolDesc toolDescription) {
registerTool(toolDescription.getName(), toolDescription.getToolClass(),
toolDescription.getDesc());
}
示例3: getTools
import com.cloudera.sqoop.tool.ToolDesc; //导入依赖的package包/类
/**
* Describes the tools made available by this plugin.
* @return a list of ToolDesc objects containing the tool name, class,
* and description.
*/
public abstract List<ToolDesc> getTools();