public abstract class Evaluator extends Interpreter
Modifier and Type | Field and Description |
---|---|
(package private) static MRContainer |
counter_container |
(package private) static MR_long |
counter_key |
static Evaluator |
evaluator
the current MRQL evaluator
|
(package private) static MRContainer |
value_container |
coerce_method, false_name, false_value, global_env, identity_mapper, is_dataset, null_name, null_value, query_plan, query_type, tab_count, trace_count, true_name, true_value
algebraic_operators, data_constructors, functions, global_datatype_env, global_functions, global_macros, global_type_env, global_vars, identity, impure_functions, monoids, plan_names, plans_with_distributed_lambdas, repeat_variables, st, type_env, type_names
Constructor and Description |
---|
Evaluator() |
Modifier and Type | Method and Description |
---|---|
abstract MRData |
aggregate(Tree acc_fnc,
Tree zero,
Tree plan,
Environment env)
The Aggregate physical operator
|
abstract Class<? extends MRQLFileInputFormat> |
binaryInputFormat()
return the FileInputFormat for binary files
|
MRData |
bsp(Tree plan,
Environment env)
run a BSP task
|
Bag |
distribute(MR_string peerName,
Bag s)
distribute a bag among peers in BSP mode
|
void |
dump_text(String file,
Tree type,
MRData data)
dump MRQL data into a text CVS file
|
void |
dump(String file,
Tree type,
MRData data)
dump MRQL data into a sequence file
|
abstract DataSet |
eval(Tree e,
Environment env,
String counter)
Evaluate a MRQL physical plan and print tracing info
|
abstract Class<? extends MRQLFileInputFormat> |
generatorInputFormat()
return the FileInputFormat for data generator files
|
Tree |
get_type(String file)
for dumped data to a file, return the MRQL type of the data
|
abstract void |
init(org.apache.hadoop.conf.Configuration conf)
initialize the evaluator
|
abstract void |
initialize_query()
initialize the query evaluation
|
abstract Tuple |
loop(Tree e,
Environment env)
Evaluate a loop a fixed number of times
|
abstract org.apache.hadoop.conf.Configuration |
new_configuration()
create a new evaluation configuration
|
abstract Class<? extends MRQLFileInputFormat> |
parsedInputFormat()
return the FileInputFormat for parsed files (CSV, XML, JSON, etc)
|
abstract void |
shutdown(org.apache.hadoop.conf.Configuration conf)
shutdown the evaluator
|
void |
streaming(Tree plan,
Environment env,
Function f)
evaluate plan in stream mode: evaluate each batch of data and apply the function f
|
MR_bool |
synchronize(MR_string peerName,
MR_bool mr_exit)
synchronize peers in BSP mode
|
abstract Bag |
toBag(MRData data)
Coerce a persistent collection to a Bag
|
closure, dataSetCollect, evalE, evalE, evalF, evalM, evalMM, evalS, lookup_distributed_binding, lookup_global_binding, new_distributed_binding, new_global_binding, pre_trace, remove_global_binding, set_global_bindings, tabs, trace, translate_expression, variable_lookup
compare_types, equal_types, expand, make_persistent_type, normalize_type, subtype_unify, subtype, subtype, subtype, type_error, type_inference, type_inference2, unify, unify
alpha_equivalent, alpha_equivalent, collection_type, error, free_variables, global_reset, identity, is_collection, is_persistent_collection, is_pure, new_var, occurences, pattern_variables, persistent_collection, print_aggregates, reify, reify, reset, subst_list, subst_var, subst, template, top_level, transient_collection, translate_select, union
print_plan, print_query, print_type, print, reify
public static Evaluator evaluator
static final MR_long counter_key
static final MRContainer counter_container
static final MRContainer value_container
public abstract void init(org.apache.hadoop.conf.Configuration conf)
public abstract void shutdown(org.apache.hadoop.conf.Configuration conf)
public abstract void initialize_query()
public abstract org.apache.hadoop.conf.Configuration new_configuration()
public MR_bool synchronize(MR_string peerName, MR_bool mr_exit)
public Bag distribute(MR_string peerName, Bag s)
public MRData bsp(Tree plan, Environment env) throws Exception
Exception
public abstract Class<? extends MRQLFileInputFormat> parsedInputFormat()
public abstract Class<? extends MRQLFileInputFormat> binaryInputFormat()
public abstract Class<? extends MRQLFileInputFormat> generatorInputFormat()
public abstract MRData aggregate(Tree acc_fnc, Tree zero, Tree plan, Environment env) throws Exception
acc_fnc
- the accumulator function from (T,T) to Tzero
- the zero element of type Tplan
- the plan that constructs the dataset that contains the bag of values {T}env
- contains bindings fro variables to values (MRData)Exception
public abstract Tuple loop(Tree e, Environment env) throws Exception
Exception
public abstract DataSet eval(Tree e, Environment env, String counter)
e
- the physical planenv
- contains bindings fro variables to values (MRData)public void dump(String file, Tree type, MRData data) throws Exception
Exception
public void dump_text(String file, Tree type, MRData data) throws Exception
Exception
public void streaming(Tree plan, Environment env, Function f)
Copyright © 2013-2016 The Apache Software Foundation. All Rights Reserved.