git.net

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

Re: Running SQL to print to Std Out


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:
Hi,

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]
    r.print()

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

This is the output from Flink GUI

image.png

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.

Thanks,

Dr Mich Talebzadeh

 

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

 

http://talebzadehmich.wordpress.com


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.

 




( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-flink-users/msg11163.html on line 86
Call Stack
#TimeMemoryFunctionLocation
10.0007368664{main}( ).../msg11163.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-flink-users/msg11163.html on line 86
Call Stack
#TimeMemoryFunctionLocation
10.0007368664{main}( ).../msg11163.html:0