
prerna.reactor.SampleReactor Maven / Gradle / Ivy
The newest version!
package prerna.reactor;
//package prerna.sablecc2.reactor;
//
//import java.util.List;
//import java.util.Set;
//import java.util.Vector;
//
//import prerna.algorithm.api.ITableDataFrame;
//import prerna.algorithm.api.SemossDataType;
//import prerna.engine.api.IHeadersDataRow;
//import prerna.sablecc2.om.CodeBlock;
//import prerna.sablecc2.om.GenRowStruct;
//import prerna.sablecc2.om.NounStore;
//import prerna.sablecc2.om.PixelDataType;
//import prerna.sablecc2.om.nounmeta.NounMetadata;
//
//public class SampleReactor extends AbstractReactor {
//
// //Shifted to abstract reactor
//// String operationName = null;
//// String signature = null;
//// String curNoun = null;
//// IReactor parentReactor = null;
//// IReactor childReactor = null;
//// NounStore store = null;
//// IReactor.TYPE type = IReactor.TYPE.FLATMAP;
//// IReactor.STATUS status = null;
//// GenRowStruct curRow = null;
////
//// String reactorName = "Sample";
//// String [] asName = null;
//// Vector outputFields = null;
//// Vector outputTypes = null;
////
//// Hashtable propStore = new Hashtable();
////
//// PKSLPlanner planner = null;
//
// @Override
// public void In()
// {
// // set the stores and such
// System.out.println("Calling the in of" + operationName);
// curNoun("all");
// //if(parentReactor != null && parentReactor.getName().equalsIgnoreCase("EXPR"))
// }
//
// @Override
// public Object Out()
// {
// System.out.println("Calling the out of" + operationName);
// System.out.println("Calling the out of " + reactorName);
// // if the operation is fully sql-able etc
// // and it is a map operation.. in this place it should merge with the parent
// // there are 2 cases here
// // a. I can assimilate with the parent and let it continue to rip
// // b. I have to finish processing this before I give it off to parent
//
// // additionally.. if I do see a parent reactor.. I should add this as the input to the parent
// // so that we know what order to execute it
//
// updatePlan();
//
// if(this.type != IReactor.TYPE.REDUCE && this.store.isSQL())
// {
// // 2 more scenarios here
// // if parent reactor is not null
// // merge
// // if not execute it
// // if the whole thing is done through SQL, then just add the expression
// if(this.parentReactor != null)
// {
// mergeUp();
// return parentReactor;
// }
// // else assimilated with the other execute
///* else
// {
// // execute it
// }
//*/
// }
// // the case below should not actually happen.. it should be done through the script chain
// else if(parentReactor == null)
// {
// // execute it
// //return execute();
// }
// else if(parentReactor != null) return parentReactor;
// // else all the merging has already happened
// return null;
// }
//
// // yes.. that is right make code not war
// private void makeCode()
// {
// if(propStore.containsKey("CODE"))
// {
// String code = (String)propStore.get("CODE");
// String baseClass = "prerna.sablecc2.reactor.Lambda";
// getType();
// Set keys = store.nounRow.keySet();
// String reactorOutput = reactorName;
//
// Vector
© 2015 - 2025 Weber Informatics LLC | Privacy Policy