当前位置: 首页>>代码示例>>Java>>正文


Java Cluster类代码示例

本文整理汇总了Java中org.apache.pig.pigunit.Cluster的典型用法代码示例。如果您正苦于以下问题:Java Cluster类的具体用法?Java Cluster怎么用?Java Cluster使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Cluster类属于org.apache.pig.pigunit包,在下文中一共展示了Cluster类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testWithMock

import org.apache.pig.pigunit.Cluster; //导入依赖的package包/类
@Ignore("Not ready yet")
@Test
public void testWithMock() throws ParseException, IOException {
    String[] args = {
                    "n=3",
                    "reducers=1",
                    "input=top_queries_input_data.txt",
                    "output=top_3_queries",
    };

    PigServer mockServer = null;
    Cluster mockCluster = null;

    test = new PigTest(PIG_SCRIPT, args, mockServer, mockCluster);

    test.assertOutput(new File("data/top_queries_expected_top_3.txt"));
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:18,代码来源:TestPigTest.java

示例2: testWithMock

import org.apache.pig.pigunit.Cluster; //导入依赖的package包/类
@Ignore("Not ready yet")
@Test
public void testWithMock() throws ParseException, IOException {
  String[] args = {
      "n=3",
      "reducers=1",
      "input=top_queries_input_data.txt",
      "output=top_3_queries",
      };

  PigServer mockServer = null;
  Cluster mockCluster = null;

  test = new PigTest(PIG_SCRIPT, args, mockServer, mockCluster);

  test.assertOutput(new File("data/top_queries_expected_top_3.txt"));
}
 
开发者ID:PonIC,项目名称:PonIC,代码行数:18,代码来源:TestPigTest.java

示例3: createPigTest

import org.apache.pig.pigunit.Cluster; //导入依赖的package包/类
public static PigTest createPigTest(String scriptFile, String[] args) throws PigException {
    try {
        PigServer pigServer = new PigServer(ExecType.LOCAL);
        Cluster pigCluster = new Cluster(pigServer.getPigContext());
        return new PigTest(scriptFile, args, pigServer, pigCluster);
    } catch (Exception ex) {
        throw new PigException("Failed to create PigTest instance. ", ex);
    }
}
 
开发者ID:christiangda,项目名称:pigiptools,代码行数:10,代码来源:PigUnitUtil.java

示例4: setupDataFilesForPigServer

import org.apache.pig.pigunit.Cluster; //导入依赖的package包/类
@Before
public void setupDataFilesForPigServer() throws Exception {
  System.getProperties().setProperty("pigunit.exectype",
      Util.getLocalTestMode().toString());
  Cluster cluster = PigTest.getCluster();
  // Put the data files in target/ so they don't dirty the local git checkout
  cluster.update(
      new Path(getFullPathForTestDataFile("data.txt")),
      new Path("target/data.txt"));
  cluster.update(
      new Path(getFullPathForTestDataFile("data2.txt")),
      new Path("target/data2.txt"));
}
 
开发者ID:apache,项目名称:calcite,代码行数:14,代码来源:PigRelBuilderStyleTest.java


注:本文中的org.apache.pig.pigunit.Cluster类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。