• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InternalVertexRunner类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: testEqualPageRankForSevenNodes

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testEqualPageRankForSevenNodes() throws Exception {
    GiraphConfiguration conf = getConf();
    TestGraph<Text, DoubleWritable, Text> input = getTestGraph(conf);
    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, input);
    TestGraph<Text, DoubleWritable, Text> output = InMemoryVertexOutputFormat.getOutputGraph();
    assertEquals(8, output.getVertices().size());
    assertTrue(output.getVertex(new Text("1")).getValue().get() < output.getVertex(new Text("8")).getValue().get());
    assertTrue(output.getVertex(new Text("1")).getValue().get() < output.getVertex(new Text("7")).getValue().get());
    assertTrue(output.getVertex(new Text("1")).getValue().get() < output.getVertex(new Text("6")).getValue().get());
    assertTrue(output.getVertex(new Text("1")).getValue().get() < output.getVertex(new Text("5")).getValue().get());
    assertTrue(output.getVertex(new Text("1")).getValue().get() < output.getVertex(new Text("4")).getValue().get());
    assertTrue(output.getVertex(new Text("1")).getValue().get() < output.getVertex(new Text("3")).getValue().get());
    assertTrue(output.getVertex(new Text("1")).getValue().get() < output.getVertex(new Text("2")).getValue().get());

}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:18,代码来源:PageRankTest.java


示例2: testHighPageRankForOneNode

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testHighPageRankForOneNode() throws Exception {
    GiraphConfiguration conf = getConf();
    TestGraph<Text, DoubleWritable, Text> input = getHighPageRankGraph(conf);
    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, input);
    TestGraph<Text, DoubleWritable, Text> output = InMemoryVertexOutputFormat.getOutputGraph();
    assertEquals(8, output.getVertices().size());
    assertTrue(output.getVertex(new Text("8")).getValue().get() < output.getVertex(new Text("1")).getValue().get());
    assertTrue(output.getVertex(new Text("2")).getValue().get() < output.getVertex(new Text("1")).getValue().get());
    assertTrue(output.getVertex(new Text("3")).getValue().get() < output.getVertex(new Text("1")).getValue().get());
    assertTrue(output.getVertex(new Text("4")).getValue().get() < output.getVertex(new Text("1")).getValue().get());
    assertTrue(output.getVertex(new Text("5")).getValue().get() < output.getVertex(new Text("1")).getValue().get());
    assertTrue(output.getVertex(new Text("6")).getValue().get() < output.getVertex(new Text("1")).getValue().get());
    assertTrue(output.getVertex(new Text("7")).getValue().get() < output.getVertex(new Text("1")).getValue().get());

}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:18,代码来源:PageRankTest.java


示例3: testBiggerGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testBiggerGraph() throws Exception {
    GiraphConfiguration conf = getConf();
    TestGraph<Text, LouvainNodeState, LongWritable> input = getBiggerGraph(conf);
    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, input);
    TestGraph<Text, LouvainNodeState, Text> output = InMemoryVertexOutputFormat.getOutputGraph();
    assertTrue(output.getVertices().size() == 16);
    assertTrue(output.getVertex(new Text("1")).getValue().getCommunity().equals("1"));
    assertTrue(output.getVertex(new Text("2")).getValue().getCommunity().equals("2"));
    assertTrue(output.getVertex(new Text("3")).getValue().getCommunity().equals("3"));
    assertTrue(output.getVertex(new Text("4")).getValue().getCommunity().equals("4"));
    assertTrue(output.getVertex(new Text("5")).getValue().getCommunity().equals("5"));
    assertTrue(output.getVertex(new Text("6")).getValue().getCommunity().equals("6"));
    assertTrue(output.getVertex(new Text("7")).getValue().getCommunity().equals("7"));
    assertTrue(output.getVertex(new Text("8")).getValue().getCommunity().equals("8"));
    assertTrue(output.getVertex(new Text("9")).getValue().getCommunity().equals("9"));
    assertTrue(output.getVertex(new Text("10")).getValue().getCommunity().equals("10"));
    assertTrue(output.getVertex(new Text("11")).getValue().getCommunity().equals("11"));
    assertTrue(output.getVertex(new Text("12")).getValue().getCommunity().equals("12"));
    assertTrue(output.getVertex(new Text("13")).getValue().getCommunity().equals("13"));
    assertTrue(output.getVertex(new Text("14")).getValue().getCommunity().equals("14"));
    assertTrue(output.getVertex(new Text("15")).getValue().getCommunity().equals("15"));
    assertTrue(output.getVertex(new Text("16")).getValue().getCommunity().equals("16"));
}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:26,代码来源:LouvainTests.java


示例4: testComputationUnconnectedGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testComputationUnconnectedGraph() throws Exception {
    TestGraph<Text, Text, Text> testGraph = new TestGraph(giraphConf);
    ImmutableClassesGiraphConfiguration conf = new ImmutableClassesGiraphConfiguration(giraphConf);
    testGraph.addEdge(new Text("1"), new Text("2"), new Text("1"));
    testGraph.addEdge(new Text("4"), new Text("3"), new Text("1"));
    testGraph.addEdge(new Text("28"), new Text("16"), new Text("1"));

    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, testGraph);
    TestGraph<Text, Text, Text> outputGraph = InMemoryVertexOutputFormat.getOutputGraph();
    assertEquals(3, outputGraph.getVertices().size());
    assertNull(outputGraph.getVertex(new Text("1")));
    assertNotNull(outputGraph.getVertex(new Text("2")));
    assertEquals(0, outputGraph.getVertex(new Text("2")).getNumEdges());
    assertNull(outputGraph.getVertex(new Text("4")));
    assertNotNull(outputGraph.getVertex(new Text("3")));
    assertEquals(0, outputGraph.getVertex(new Text("3")).getNumEdges());
    assertNull(outputGraph.getVertex(new Text("28")));
    assertNotNull(outputGraph.getVertex(new Text("16")));
    assertEquals(0, outputGraph.getVertex(new Text("16")).getNumEdges());
}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:23,代码来源:LeafCompressionComputationTest.java


示例5: testActualTextNodes

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testActualTextNodes() throws Exception {
    TestGraph<Text, Text, Text> testGraph = new TestGraph(giraphConf);
    ImmutableClassesGiraphConfiguration conf = new ImmutableClassesGiraphConfiguration(giraphConf);
    testGraph.addEdge(new Text("Jack"), new Text("Jill"), new Text("1"));
    testGraph.addEdge(new Text("Jill"), new Text("Jack"), new Text("1"));
    testGraph.addEdge(new Text("Jane"), new Text("Jill"), new Text("1"));
    testGraph.addEdge(new Text("Jill"), new Text("Jane"), new Text("1"));
    testGraph.addEdge(new Text("Jack"), new Text("Jane"), new Text("1"));
    testGraph.addEdge(new Text("Jane"), new Text("Jack"), new Text("1"));
    testGraph.addEdge(new Text("Jane"), new Text("Gregory"), new Text("1"));
    testGraph.addEdge(new Text("Gregory"), new Text("Straxx"), new Text("1"));

    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, testGraph);
    TestGraph<Text, Text, Text> outputGraph = InMemoryVertexOutputFormat.getOutputGraph();
    assertEquals(4, outputGraph.getVertices().size());
    checkConnectionsFromVertex(outputGraph, "Jack", "Jane", "Jill");
    checkConnectionsFromVertex(outputGraph, "Jane", "Jack", "Jill");
    checkConnectionsFromVertex(outputGraph, "Jill", "Jack", "Jane");
    assertEquals(0, outputGraph.getVertex(new Text("Straxx")).getNumEdges());
}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:23,代码来源:LeafCompressionComputationTest.java


示例6: testComputeOutput

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testComputeOutput() throws Exception {
    GiraphConfiguration conf = getConf();
    TestGraph<Text, VertexData, Text> input = getFirstTestGraph(conf);
    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, input);
    TestGraph<Text, VertexData, Text> output = InMemoryVertexOutputFormat.getOutputGraph();
    assertEquals(8, output.getVertices().size());
    assertTrue(output.getVertex(new Text("2")).getValue().getApproxBetweenness() > 0.0);
    assertTrue(output.getVertex(new Text("1")).getValue().getApproxBetweenness() > 0.0);
    assertEquals(output.getVertex(new Text("3")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("4")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("5")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("6")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("7")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("8")).getValue().getApproxBetweenness(), 0.0, 0.0);
}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:18,代码来源:HBSEComputeTest.java


示例7: testGraphWithShortestPathOne

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testGraphWithShortestPathOne() throws Exception {
    GiraphConfiguration conf = getConf();
    TestGraph<Text, VertexData, Text> input = getShortestPathOneTestGraph(conf);
    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, input);
    TestGraph<Text, VertexData, Text> output = InMemoryVertexOutputFormat.getOutputGraph();
    assertEquals(8, output.getVertices().size());
    assertNotSame(output.getVertex(new Text("1")).getValue().getApproxBetweenness(), 0.0);
    assertEquals(output.getVertex(new Text("2")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("3")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("4")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("5")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("6")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("7")).getValue().getApproxBetweenness(), 0.0, 0.0);
    assertEquals(output.getVertex(new Text("8")).getValue().getApproxBetweenness(), 0.0, 0.0);

}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:19,代码来源:HBSEComputeTest.java


示例8: testComputeOutput

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testComputeOutput() throws Exception {
    GiraphConfiguration conf = new GiraphConfiguration();
    conf.setComputationClass(WeaklyConnectedComponentComputation.class);
    conf.setVertexOutputFormatClass(InMemoryVertexOutputFormat.class);
    TestGraph<Text,Text,Text> testGraph = getGraph(conf);
    InMemoryVertexOutputFormat.initializeOutputGraph(conf);
    InternalVertexRunner.run(conf, testGraph);
    TestGraph<Text, Text, Text> graph = InMemoryVertexOutputFormat.getOutputGraph();
    assertEquals(6, graph.getVertices().size());
    assertEquals("2", graph.getVertex(new Text("1")).getValue().toString());
    assertEquals("2", graph.getVertex(new Text("2")).getValue().toString());
    assertEquals("4", graph.getVertex(new Text("3")).getValue().toString());
    assertEquals("4", graph.getVertex(new Text("4")).getValue().toString());
    assertEquals("6", graph.getVertex(new Text("5")).getValue().toString());
    assertEquals("6", graph.getVertex(new Text("6")).getValue().toString());
}
 
开发者ID:Sotera,项目名称:distributed-graph-analytics,代码行数:18,代码来源:WeaklyConnectedComponentComputationTest.java


示例9: testMax

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testMax() throws Exception {
  String[] graph = {
      "5 1",
      "1 5 2",
      "2 5",
  };

  GiraphConfiguration conf = new GiraphConfiguration();
  conf.setComputationClass(MaxComputation.class);
  conf.setVertexInputFormatClass(IntIntNullTextInputFormat.class);
  conf.setVertexOutputFormatClass(IdWithValueTextOutputFormat.class);
  Iterable<String> results = InternalVertexRunner.run(conf, graph);

  Map<Integer, Integer> values = parseResults(results);
  assertEquals(3, values.size());
  assertEquals(5, (int) values.get(1));
  assertEquals(5, (int) values.get(2));
  assertEquals(5, (int) values.get(5));
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:21,代码来源:MaxComputationTest.java


示例10: testThreeNodesAllNodesFreeGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testThreeNodesAllNodesFreeGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[]]",
                                "[2,[[1,0]]]",
                                "[3,[[1,0]]]"
                              };
  String[]            expected = {
                                   "1\tisFree=true",
                                   "2\tisFree=false",
                                   "3\tisFree=false" 
                                 };

  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:18,代码来源:BrachaTouegDeadlockComputationTest.java


示例11: testThreeNodesAllNodesBlockedGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testThreeNodesAllNodesBlockedGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[[2,0]]]",
                                "[2,[[3,0]]]",
                                "[3,[[1,0]]]"
                              };
  String[]            expected = {
                                   "1\tisFree=false",
                                   "2\tisFree=false",
                                   "3\tisFree=false" 
                                 };

  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:18,代码来源:BrachaTouegDeadlockComputationTest.java


示例12: testThreeNodesAllNodesFreeMultiEdgesGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testThreeNodesAllNodesFreeMultiEdgesGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[[2,0],[3,1]]]",
                                "[2,[]]",
                                "[3,[]]"
                              };
  String[]            expected = {
                                   "1\tisFree=true",
                                   "2\tisFree=true",
                                   "3\tisFree=true" 
                                 };

  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:18,代码来源:BrachaTouegDeadlockComputationTest.java


示例13: testThreeNodesAllNodesFreeNOutOfMGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testThreeNodesAllNodesFreeNOutOfMGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[[2,0],[3,0]]]",
                                "[2,[]]",
                                "[3,[]]"
                              };
  String[]            expected = {
                                   "1\tisFree=true",
                                   "2\tisFree=true",
                                   "3\tisFree=true" 
                                 };

  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:18,代码来源:BrachaTouegDeadlockComputationTest.java


示例14: testThreeNodesInitNodeFreeNOutOfMGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testThreeNodesInitNodeFreeNOutOfMGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[[2,0],[3,0]]]",
                                "[2,[]]",
                                "[3,[]]"
                              };
  String[]            expected = {
                                   "1\tisFree=false",
                                   "2\tisFree=true",
                                   "3\tisFree=false" 
                                 };

  BRACHA_TOUEG_DL_INITIATOR_ID.set(this.conf, 2);
  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
  BRACHA_TOUEG_DL_INITIATOR_ID.set(this.conf, 1);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:20,代码来源:BrachaTouegDeadlockComputationTest.java


示例15: testThreeNodesAllNodesBlockedNOutOfMGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testThreeNodesAllNodesBlockedNOutOfMGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[[2,0],[3,0]]]",
                                "[2,[[3,0]]]",
                                "[3,[[2,0]]]"
                              };
  String[]            expected = {
                                   "1\tisFree=false",
                                   "2\tisFree=false",
                                   "3\tisFree=false" 
                                 };

  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:18,代码来源:BrachaTouegDeadlockComputationTest.java


示例16: testFiveNodesAllNodesFreeNOutOfMGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testFiveNodesAllNodesFreeNOutOfMGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[[2,0], [5,0]]]",
                                "[2,[[4,0]]]",
                                "[3,[[2,0], [5,0]]]",
                                "[4,[[1,0], [5,1], [3,2]]]",
                                "[5,[]]"
                              };
  String[]            expected = {
                                   "1\tisFree=true",
                                   "2\tisFree=true",
                                   "3\tisFree=true",
                                   "4\tisFree=true",
                                   "5\tisFree=true"
                                 };

  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:22,代码来源:BrachaTouegDeadlockComputationTest.java


示例17: testFiveNodesAllNodesBlockedNOutOfMGraph

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testFiveNodesAllNodesBlockedNOutOfMGraph() throws Exception {
  Iterable<String>    results;
  String[]            graph = {
                                "[1,[[2,0], [5,0]]]",
                                "[2,[[4,0]]]",
                                "[3,[[2,0], [5,0]]]",
                                "[4,[[1,0], [5,1], [3,1]]]",
                                "[5,[]]"
                              };
  String[]            expected = {
                                   "1\tisFree=false",
                                   "2\tisFree=false",
                                   "3\tisFree=false",
                                   "4\tisFree=false",
                                   "5\tisFree=true"
                                 };

  results = InternalVertexRunner.run(this.conf, graph);
  checkResults(results, expected);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:22,代码来源:BrachaTouegDeadlockComputationTest.java


示例18: runJob

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
private void runJob(String tableName, GiraphConfiguration conf) throws Exception {
  String[] edges = new String[] {
      "1 2",
      "2 3",
      "2 4",
      "4 1"
  };

  GiraphHiveConstants.HIVE_VERTEX_OUTPUT_TABLE.set(conf, tableName);
  GiraphHiveConstants.VERTEX_TO_HIVE_CLASS.set(conf, HiveOutputIntIntVertex.class);

  conf.setComputationClass(ComputationCountEdges.class);
  conf.setOutEdgesClass(ByteArrayEdges.class);
  conf.setEdgeInputFormatClass(IntNullTextEdgeInputFormat.class);
  conf.setVertexOutputFormatClass(HiveVertexOutputFormat.class);
  InternalVertexRunner.run(conf, null, edges);

  Helpers.commitJob(conf);
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:20,代码来源:HiveOutputTest.java


示例19: testCheckFailsJob

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testCheckFailsJob() throws Exception {
  String tableName = "test1";
  hiveServer.createTable("CREATE TABLE " + tableName +
     " (i1 INT, i2 BIGINT) ");

  GiraphConfiguration conf = new GiraphConfiguration();
  String[] edges = new String[] {
      "1 2",
      "2 3",
      "2 4",
      "4 1"
  };

  GiraphHiveConstants.HIVE_VERTEX_OUTPUT_TABLE.set(conf, tableName);
  GiraphHiveConstants.VERTEX_TO_HIVE_CLASS.set(conf, HiveOutputIntIntVertex.class);

  conf.setComputationClass(ComputationCountEdges.class);
  conf.setOutEdgesClass(ByteArrayEdges.class);
  conf.setEdgeInputFormatClass(IntNullTextEdgeInputFormat.class);
  conf.setVertexOutputFormatClass(HiveVertexOutputFormat.class);
  try {
    Iterable<String> result = InternalVertexRunner.run(conf, null, edges);
    assertNull(result);
  } catch (IllegalArgumentException e) { }
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:27,代码来源:CheckOutputTest.java


示例20: testCheckJobThrows

import org.apache.giraph.utils.InternalVertexRunner; //导入依赖的package包/类
@Test
public void testCheckJobThrows() throws Exception {
  String tableName = "test1";
  hiveServer.createTable("CREATE TABLE " + tableName +
      " (i1 BIGINT, i2 INT) " +
      " ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'");
  String[] rows = {
      "1\t2",
      "2\t3",
      "2\t4",
      "4\t1",
  };
  hiveServer.loadData(tableName, rows);

  GiraphConfiguration conf = new GiraphConfiguration();
  HIVE_EDGE_INPUT.setTable(conf, tableName);
  HIVE_EDGE_INPUT.setClass(conf, HiveIntNullEdge.class);
  conf.setComputationClass(ComputationCountEdges.class);
  conf.setEdgeInputFormatClass(HiveEdgeInputFormat.class);
  conf.setVertexOutputFormatClass(IdWithValueTextOutputFormat.class);
  assertNull(InternalVertexRunner.run(conf, new String[0], new String[0]));
}
 
开发者ID:renato2099,项目名称:giraph-gora,代码行数:23,代码来源:CheckInputTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DestroyRequest类代码示例发布时间:2022-05-23
下一篇:
Java EMGroup类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap