Giter Club home page Giter Club logo

giraph-kcore's Introduction

K-Core Giraph

This is a different way of computing the K-Cores of vertices in a graph with Giraph than the repository I've shared.

How it works.

This is a bottom up approach, in that it first computes the 0-kcore, then the 1-core, 2-core, etc. If you have large sparse graphs, computing the lower core values can take awhile. However, this approach doesn't generate nearly as much messages as the other implementation I've shared, so depending on your environment this might be preferable. On multi-node systems, I've found both to be comparable in terms of performance; it really boils down to your graph structure.

Quick and Dirty install

Drop this under the example folder included with giraph and recompile with maven.

Graph Structure

The expected format of the graph is [vertex_id, vertex_kcore_initial, [[neighbor_vertex_id, vertex_neighbor_kcore],[......]]. Here, verteix_id is the identifier of the vertex, vertex_kcore_initial is the starting kcore value (just leave this to be 0), and the list after that is the neighboring vertices (identifier and k-core value initially). I would just set the kcore values to be 0; I added that in to experiment with (seeing if there would be a faster way to compute kcores, etc).

Example Usage

GRAPH=example_graph.txt GIRAPH_HOME=/opt/bin/giraph

$HADOOP_HOME/bin/hadoop jar $GIRAPH_HOME/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.2.1-jar-with-dependencies.jar
org.apache.giraph.GiraphRunner org.apache.giraph.examples.kcore.KCore
-mc org.apache.giraph.examples.kcore.KCoreMasterCompute
-wc org.apache.giraph.examples.kcore.KCoreWorkerContext
-vif org.apache.giraph.examples.kcore.KCoreInputFormat
-vip /user/hduser/input/$GRAPH
-vof org.apache.giraph.examples.kcore.KCoreOutputFormat
-op /user/hduser/output/kcore
-w 1
/

giraph-kcore's People

Watchers

James Cloos avatar Muntasir Raihan Rahman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.