asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vignesh Raghunathan <vignesh.raghunatha...@gmail.com>
Subject Re: Debugging source code
Date Fri, 15 Jul 2016 21:19:20 GMT
Hi,

I am trying to step through some of the function descriptor code. For instance, I launched
an AsterixDB instance via AsterixHyracksIntegrationUtil, placed a breakpoint in 

org.apache.asterix.runtime.evaluators.constructors.ATimeConstructorDescriptor.createEvaluatorFactory(...).new
IScalarEvaluatorFactory() {...}.createScalarEvaluator(...).new IScalarEvaluator() {...}.evaluate(IFrameTupleReference,
IPointable)

and ran the query 

let $v := time(“12:23:23”)
return $v

However, execution doesn’t stop at the breakpoint. My questions are as follows:

1. http://sigmod.github.io/papers/socc15-final153.pdf <http://sigmod.github.io/papers/socc15-final153.pdf>
mentions runtime artifacts called evaluators for function expressions. Is the evaluate function
mentioned above part of an evaluator for the time constructor?

2. Is a separate JVM launched for each virtual node controller? 

3. How can I debug a task that is scheduled to run in a particular node controller?

As an aside, http://sigmod.github.io/papers/socc15-final153.pdf <http://sigmod.github.io/papers/socc15-final153.pdf>
mentions that translation between logical functions and evaluators happen during the job generation
phase. Does that mean the rule based physical optimization phase is skipped for functions?


I am also not able to figure out where the function evaluators are actually called in code.
Where can I find them?

Thanks,
Vignesh


> On Jul 7, 2016, at 2:23 AM, Mike Carey <dtabass@gmail.com> wrote:
> 
> Vignesh,
> 
> Count would actually be a particularly bad example to start with.  :-)  Aggregate functions
(count, min, max, sum, avg) are not like other functions - they are special and more complicated
/ very different.  Instead, you should look at simple(r) functions like almost anything else
described at https://asterixdb.apache.org/docs/0.8.8-incubating/aql/functions.html.
> 
> 
> Cheers,
> 
> Mike
> 
> On 7/6/16 11:29 AM, Xikui Wang wrote:
>> Hi Vignesh,
>> 
>> There is an entrance class called: AsterixHyracksIntegrationUtil. You can
>> find it under: org.apache.asterix.api.common. The main method in this class
>> enables you to launch a local instance for debugging. From my own
>> experience, QueryTranslator will be a good start point to trace the process.
>> 
>> Best,
>> Xikui
>> 
>> On Wed, Jul 6, 2016 at 11:16 AM, Vignesh Raghunathan <
>> vignesh.raghunathan90@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> I've been trying to figure out how functions are implemented under the hood
>>> in AsterixDB. For example, I would like to know what happens when the aql
>>> statement count([1,2,3]) is executed.
>>> 
>>> I tried to set up remote debugging in eclipse to step through the code.
>>> However, I'm not sure what to change to launch an asterixdb instance in
>>> debug mode. Is there a way to do it?
>>> 
>>> Thanks,
>>> Vignesh
>>> 
> 


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