giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Puneet Agarwal <puagar...@yahoo.com.INVALID>
Subject Aggregator Issue and GIRAPH-806
Date Mon, 17 Nov 2014 09:02:39 GMT
Hi All,I am sorry for double posting and for posting a use related e-mail in dev forum. Doing
this because, I got no response to some of e-mails in the users' list.
I have two main problems:
1.    The aggregator functionality is not behaving as it should. I need to understand
how aggregators work in Giraph to resolve that problem. So my questions are:

a.    I observed that more than one objects of my custom aggregator class get instantiated
per worker, why so?b.    I also observed that there is a master aggregator which seems
to be getting the locally aggregated values from various workers. When this master-aggregator
receives a value from one of the local-aggregators, it forgets the previously aggregated value,
which should not happen. I have posted code-snippet and log messages in the users' forum also
given in the attached e-mail.c.    Is this a bug in Giraph?d.    How can I understand
Aggregator behaviour of Giraph in detailed, is reading the source-code of Giraph the only
option?e.    Is something wrong in what I am doing?
 
2.    Sometimes the Giraph jobs hang, and I noticed that I get similar problems as mentioned
in Jira issue - GIRAPH-806. I observed that there is a patch available for this issue. But
when I try to apply the patch on top of Giraph 1.0.0, I face the problem that the patch has
been provided on a nightly build dated ---> 1390205044000 ( I did not understand this date
format), and not on Giraph 1.0.0.

a.    Should I upgrade to 1.1.0 ( when it becomes available)?b.    I upgrade to nightly
build of 1390205044000, and then apply this patch?c.    What is the suggested way out for
me now?
Seeking your opinion on the above mentioned issues. I heavily rely on Giraph for my work,
and I am completely stuck because of the above mentioned issues. Rquesting you to help me
in this regard.

-Puneet
      On Monday, November 17, 2014 8:58 AM, Puneet Agarwal <puagarwal@yahoo.com> wrote:
   

 I have no clue on how to resolve this issue. Any guidance in this situation can be helpful.
Claudio - is there any detailed description of how aggregator works in Giraph in your book?
Getting no response from anyone, should such questions be asked in developers' list?

-PuneetIIT Delhi, India


      On Sunday, November 16, 2014 12:11 PM, Puneet Agarwal <puagarwal@yahoo.com> wrote:
   

 Hi All,

I have been facing a problem in Giraph for last two weeks. Following is the detailed description,
sample code, corresponding log message and a few questions.
I will greatly appreciate any help in this regard.

Code Description:
=================
My algorithm assigns a score to select vertexes of the graph. I have to find the best K(=5)
vertexes such that their score is minimum.
I have written a Persistent Aggregator for this which takes Text value. The snippet of the
code is given below.

It works fine on my laptop (single worker), but not on the cluster of 4 computers, when running
with 10 workers.
I am using Hadoop 1.0.0 and Giraph 1.0.0.


Problem Description:
====================
In the aggregator one of the previously aggregated value suddenly gets lost.
Therefore, my algorithm generates wrong results.

You can observe this in the logs, given below, in following manner
a.    At line number 11, the vertex 8.4793-1 has weight 3.0, and it is the best so far.
b.    At line number 12, the aggregator receives a new value "6.1100-1,6.0", i.e., vertex=6.1100-1
has weight=6.0
c.    At line number 13, in the begining of aggregate method, the output of getAggregatedValue()
is also same as newValue.
This means it simply forgets the previously aggregated value, why so? 

I have printed object-ids also, in the log messages, in order to ensure that this is happening
in the same object.

Source Code Snippet:
====================

@Override
public void aggregate(Text value) {
    printLogMessage("aggregate", "MyAGG", "Entering - NewValue=", value);
    printLogMessage("aggregate", "MyAGG",
            "Entering - getAggregatedValue()=", getAggregatedValue());

        // Main Logic is here - Omitting for simplicity

    setAggregatedValue(new Text(myTopK));
    printLogMessage("aggregate", "MyAGG", "Exiting AggregatedValue=",
            getAggregatedValue().toString());
}

@Override
public Text createInitialValue() {
    printLogMessage("=====>createInitialValue", "MyAGG",
            "Entering getAggregatedValue()=", getAggregatedValue());
    Text initialValue = getAggregatedValue();
    if (initialValue == null) {
        initialValue = new Text();
    }
    printLogMessage("=====>createInitialValue", "MyAGG",
            "Exiting ReturnedValue=", getAggregatedValue());
    return initialValue;
}
private void printLogMessage(String methodName, String prefix, String msg, Object obj) {
    if (isDebugOn(methodName)) {
        if (obj == null) {
            obj = "";
        }
        System.out.println(java.lang.System.identityHashCode(this) + "--"+ prefix +
"==>" + 
                                methodName + "() - " + msg
+ obj.toString());
    }
}

Printed Log Messages:
=====================
1.  %%%%%%%%%%%%% Entered Master Compute %%%%%%%%%%%%%%%%%%%% ====> SupsetStep No.=2
2.  249768912--MyAGG==>=====>createInitialValue() - Entering getAggregatedValue()=
3.  249768912--MyAGG==>=====>createInitialValue() - Exiting ReturnedValue=
4.  249768912--MyAGG==>aggregate() - Entering - NewValue=8.4793-1,3.0
5.  249768912--MyAGG==>aggregate() - Entering - getAggregatedValue()=8.4793-1,3.0
6.  249768912--MyAGG==>aggregate() - Received AggregatedValue Again- Exiting CurrVal=8.4793-1,3.0
7.  249768912--MyAGG==>=====>createInitialValue() - Entering getAggregatedValue()=8.4793-1,3.0
8.  249768912--MyAGG==>=====>createInitialValue() - Exiting ReturnedValue=8.4793-1,3.0
9.  %%%%%%%%%%%%% Entered Master Compute %%%%%%%%%%%%%%%%%%%% ====> SupsetStep No.=3
10. 249768912--MyAGG==>=====>createInitialValue() - Entering getAggregatedValue()=8.4793-1,3.0
11. 249768912--MyAGG==>=====>createInitialValue() - Exiting ReturnedValue=8.4793-1,3.0
12. 249768912--MyAGG==>aggregate() - Entering - NewValue=6.1100-1,6.0
13. 249768912--MyAGG==>aggregate() - Entering - getAggregatedValue()=6.1100-1,6.0
14. 249768912--MyAGG==>aggregate() - Received AggregatedValue Again- Exiting CurrVal=6.1100-1,6.0
15. 249768912--MyAGG==>=====>createInitialValue() - Entering getAggregatedValue()=6.1100-1,6.0
16. 249768912--MyAGG==>=====>createInitialValue() - Exiting ReturnedValue=6.1100-1,6.0
17. %%%%%%%%%%%%% Entered Master Compute %%%%%%%%%%%%%%%%%%%% ====> SupsetStep No.=4
18. ...
...

My Queries:
===========
1.    Why does the createInitialValue method gets called twice, in the same superstep,
on the same object of the aggregator?
2.    Even if its gets called twice, why should it forget the previouly aggregated value?

Please help me resolve this issue. This is a major problem in my work. 
I am not able to proceed further because of this.

Thanks in anticipation.

- Puneet
IIT Delhi, India



    

   
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message