Repository: giraph
Updated Branches:
  refs/heads/trunk 705f93d15 -> c8db59b6a


GIRAPH-978 Giraph-Debugger Test Graphs not working (nishantgandhi99 via edunov)

Summary:
Giraph-Debugger has feature of creating graphs for test input. The GUI panel 
has options of selecting predefined graph types with number of nodes. The 
corresponding graph is created on panel and test code is also generated 
automatically.
Now there are six types graph available in the drop-down list but only first 
two types of graph are working.
In this patch, I have implemented another two types of Graph.

Test Plan: Manual Testing.

Reviewers: semihsalihoglu, sergey.edunov

Reviewed By: sergey.edunov

Differential Revision: https://reviews.facebook.net/D31137


Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/c8db59b6
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/c8db59b6
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/c8db59b6

Branch: refs/heads/trunk
Commit: c8db59b6a19e23f0665dae2d06c3d44da2895602
Parents: 705f93d
Author: Sergey Edunov <[email protected]>
Authored: Thu Jan 8 15:08:39 2015 -0800
Committer: Sergey Edunov <[email protected]>
Committed: Thu Jan 8 15:13:03 2015 -0800

----------------------------------------------------------------------
 CHANGELOG                                       |  2 ++
 .../debugger/gui/js/utils.sampleGraphs.js       | 23 ++++++++++++++++----
 2 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/c8db59b6/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index f169fe0..26164f5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 Giraph Change Log
 
 Release 1.2.0 - unreleased
+  GIRAPH-978 Giraph-Debugger Test Graphs not working (nishantgandhi99 via 
edunov)
+
   GIRAPH-979: Add type of input to 'missing input' error message (majakabiljo)
 
   GIRAPH-975: In-proc ZooKeeper server with Master process (edunov)

http://git-wip-us.apache.org/repos/asf/giraph/blob/c8db59b6/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
----------------------------------------------------------------------
diff --git 
a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
 
b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
index 9f4f87d..4c4d91b 100644
--- 
a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
+++ 
b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
@@ -18,8 +18,23 @@ Utils.sampleGraphs = {
         }
         return simpleAdjList;
     },
-    "Vertex Clique" : function(numNodes) {},
-    "Tailed Cycle Graph" : function(numNodes) {},
-    "Star Graph" : function(numNodes) {},
-    "Disconnected Graphs" : function(numNodes) {}
+    "Clique" : function(numNodes) {
+        var simpleAdjList = { 0 : {} };
+        var list = [];
+        for (var i = 0; i < numNodes; i++) {
+            list[list.length] = i;
+        }
+        for (var i = 0; i < numNodes; i++) {
+            simpleAdjList[i] = list;
+        }
+        return simpleAdjList;
+     },
+    "Star Graph" : function(numNodes) {
+        var simpleAdjList = { 0 : {} };    
+        for (var i = 1; i < numNodes; i++) {
+            simpleAdjList[i] = [0];
+        }
+        return simpleAdjList;
+    },
+   
 }

Reply via email to