本文整理汇总了Java中org.apache.hadoop.eclipse.ErrorMessageDialog类的典型用法代码示例。如果您正苦于以下问题:Java ErrorMessageDialog类的具体用法?Java ErrorMessageDialog怎么用?Java ErrorMessageDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ErrorMessageDialog类属于org.apache.hadoop.eclipse包,在下文中一共展示了ErrorMessageDialog类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createJarPackage
import org.apache.hadoop.eclipse.ErrorMessageDialog; //导入依赖的package包/类
/**
* Static way to create a JAR package for the given resource and showing a
* progress bar
*
* @param resource
* @return
*/
public static File createJarPackage(IResource resource) {
JarModule jarModule = new JarModule(resource);
try {
PlatformUI.getWorkbench().getProgressService().run(false, true,
jarModule);
} catch (Exception e) {
e.printStackTrace();
return null;
}
File jarFile = jarModule.getJarFile();
if (jarFile == null) {
ErrorMessageDialog.display("Run on Hadoop",
"Unable to create or locate the JAR file for the Job");
return null;
}
return jarFile;
}
示例2: getDFS
import org.apache.hadoop.eclipse.ErrorMessageDialog; //导入依赖的package包/类
/**
* Gets a connection to the DFS
*
* @return a connection to the DFS
* @throws IOException
*/
DistributedFileSystem getDFS() throws IOException {
if (this.dfs == null) {
FileSystem fs = location.getDFS();
if (!(fs instanceof DistributedFileSystem)) {
ErrorMessageDialog.display("DFS Browser",
"The DFS Browser cannot browse anything else "
+ "but a Distributed File System!");
throw new IOException("DFS Browser expects a DistributedFileSystem!");
}
this.dfs = (DistributedFileSystem) fs;
}
return this.dfs;
}