本文整理汇总了Java中org.apache.pig.ExecType.toString方法的典型用法代码示例。如果您正苦于以下问题:Java ExecType.toString方法的具体用法?Java ExecType.toString怎么用?Java ExecType.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.pig.ExecType
的用法示例。
在下文中一共展示了ExecType.toString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkAndCleanup
import org.apache.pig.ExecType; //导入方法依赖的package包/类
private void checkAndCleanup(ExecType execType, String expectedFileName,
String inputFileName) throws IOException {
if (execType == ExecType.MAPREDUCE) {
FileSystem fs = FileSystem.get(ConfigurationUtil.toConfiguration(
cluster.getProperties()));
assertTrue(fs.exists(new Path(expectedFileName)));
Util.deleteFile(cluster, inputFileName);
Util.deleteFile(cluster, expectedFileName);
} else if (execType == ExecType.LOCAL) {
File f = new File(expectedFileName);
assertTrue(f.exists());
f.delete();
} else {
throw new IllegalArgumentException("invalid excetype " + execType.
toString());
}
}
示例2: checkAndCleanup
import org.apache.pig.ExecType; //导入方法依赖的package包/类
private void checkAndCleanup(ExecType execType, String expectedFileName,
String inputFileName) throws IOException {
if (execType == cluster.getExecType()) {
FileSystem fs = FileSystem.get(ConfigurationUtil.toConfiguration(
cluster.getProperties()));
assertTrue(fs.exists(new Path(expectedFileName)));
Util.deleteFile(cluster, inputFileName);
Util.deleteFile(cluster, expectedFileName);
} else if (execType == ExecType.LOCAL) {
File f = new File(expectedFileName);
assertTrue(f.exists());
f.delete();
} else {
throw new IllegalArgumentException("invalid excetype " + execType.
toString());
}
}
示例3: createInput
import org.apache.pig.ExecType; //导入方法依赖的package包/类
private void createInput(String[] data, ExecType execType) throws IOException {
if (execType == cluster.getExecType()) {
Util.createInputFile(cluster, inputFileName, data);
} else if (execType == ExecType.LOCAL) {
Util.createLocalInputFile(inputFileName, data);
} else {
throw new IOException("unknown exectype:" + execType.toString());
}
}
示例4: tearDown
import org.apache.pig.ExecType; //导入方法依赖的package包/类
public void tearDown(ExecType execType) throws Exception {
if (execType == cluster.getExecType()) {
Util.deleteFile(cluster, inputFileName);
} else if (execType == ExecType.LOCAL) {
new File(inputFileName).delete();
} else {
throw new IOException("unknown exectype:" + execType.toString());
}
pigServer.shutdown();
}