@Override public void execute( JavaSparkContext ctx, SQLContext sqlContext, WorkflowContext workflowContext, DataFrame df) { workflowContext.out("Executing NodePrintFirstNRows : " + id); Row[] rows = df.take(n); for (Row row : rows) { workflowContext.out(row.toString()); } super.execute(ctx, sqlContext, workflowContext, df); }
@Override public void execute( JavaSparkContext ctx, SQLContext sqlContext, WorkflowContext workflowContext, DataFrame df) { workflowContext.out("Executing NodeGraphLineChart : " + id); Seq<Column> seq = DataFrameUtil.getColumnsAsSeq(df, columns); // select the required columns from the input dataframe DataFrame selectdf = df.select(seq); workflowContext.outSchema(selectdf); super.execute(ctx, sqlContext, workflowContext, df); }