[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running SQL to print to Std Out

Hi Mich,

Hequn is correct, click on the “Task Managers” menu located on the left side of the Flink web UI, select a TM from the TM list, and then click on the “Stdout” option in the TM Details tab.

Thanks, vino.

2018-08-07 9:42 GMT+08:00 Hequn Cheng <chenghequn@xxxxxxxxx>:
Hi Mich,

When you print to stdout on cluster, you have to look at the taskmanager .out file (also available in the UI).

Best, Hequn

On Tue, Aug 7, 2018 at 4:48 AM, Mich Talebzadeh <mich.talebzadeh@xxxxxxxxx> wrote:

This is the streaming program I have for trade prices following the doc for result set for tables

    val streamExecEnv = StreamExecutionEnvironment.getExecutionEnvironment
     val ds =  streamExecEnv
       .addSource(new FlinkKafkaConsumer011[String](topicsValue, new SimpleStringSchema(), properties))
    val splitStream = ds.map(new MapFunction[String, Tuple4[String, String, String, Float]] {
      override def map(value: String): Tuple4[String, String, String, Float] = {
        var cols = value.split(',')
        return (cols(0).toString, cols(1).toString, cols(2).toString, cols(3).toFloat)
    val tableEnv = TableEnvironment.getTableEnvironment(streamExecEnv)
    tableEnv.registerDataStream("priceTable", splitStream, 'key, 'ticker, 'timeissued, 'price)

    val result = tableEnv.scan("priceTable").filter('ticker.isNotNull).select('key, 'ticker, 'timeissued, 'price)
    val r = result.toDataStream[Row]

This compiles and runs but I do not see any ouput to screen.

This is the output from Flink GUI


I can verify that data being streamed in so there is no issue there. However, I don't see any output and Flink GUI does not look healthy (circles).

Appreciate any input.


Dr Mich Talebzadeh


LinkedIn  https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw



Disclaimer: Use it at your own risk. Any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on this email's technical content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from such loss, damage or destruction.