Sha256: 4b50776ffd3df3bfd44636128e37ed2248cb9eba4675b23d68e19bad3b1d41a7

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

/*
 * This script generates the list of all nodes in the 1-neighborhood of the specified node.
 * 
 * Output Format:
 * node_id:int
 */

%default UNDIRECTED_PAGELINKS  '/data/results/wikipedia/full/undirected_pagelinks' -- all edges in the pagelink graph
-- %default HUB1               13692155                                            -- Philosophy
%default HUB1                  494528786                                           -- Chimpanzee
%default HUB2                  482846027                                           -- Elephant
%default N1_NODES_OUT          '/data/results/wikipedia/mini/nodes'                -- where output will be stored

undirected_pagelinks = LOAD     '$UNDIRECTED_PAGELINKS' AS (node_a:int, node_b:int, a_into_b:int, b_into_a:int, is_symmetric:int);
spokes               = FILTER   undirected_pagelinks BY (node_a == $HUB1) OR (node_b == $HUB1) OR (node_a == $HUB2) OR (node_b == $HUB2);
neighbors            = FOREACH  spokes GENERATE ((node_a == $HUB) ? node_b : node_a) AS node;
distinct_neighbors   = DISTINCT neighbors;
STORE distinct_neighbors INTO '$N1_NODES_OUT';

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wukong-3.0.0.pre2 examples/munging/wikipedia/n1_subuniverse/n1_nodes.pig