[ 
https://issues.apache.org/jira/browse/FLINK-34308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814627#comment-17814627
 ] 

Rui Fan edited comment on FLINK-34308 at 2/6/24 6:26 AM:
---------------------------------------------------------

Test suggestion:
 # Prepare a Flink SQL job and a flink datastream job
 ** they can use the print sink or call System.out.println inside of the UDF
 # Add this config to the config.yaml
 ** taskmanager.system-out.mode : LOG
 # Run the job
 # Check whether the print log is redirected to log file

 

SQL demo:
{code:java}
./bin/sql-client.sh

CREATE TABLE orders (
  id           INT,
  app          INT,
  channel      INT,
  user_id      STRING,
  ts           TIMESTAMP(3),
  WATERMARK FOR ts AS ts
) WITH (
   'connector' = 'datagen',
   'rows-per-second'='20',
   'fields.app.min'='1',
   'fields.app.max'='10',
   'fields.channel.min'='21',
   'fields.channel.max'='30',
   'fields.user_id.length'='10'
);

create table print_sink ( 
  id           INT,
  app          INT,
  channel      INT,
  user_id      STRING,
  ts           TIMESTAMP(3)
) with ('connector' = 'print' );

insert into print_sink
select id       ,app       ,channel       ,user_id       ,ts   from orders 
{code}


was (Author: fanrui):
Test suggestion:
 # Prepare a Flink SQL job and a flink datastream job
 ** they can use the print sink or call System.out.println inside of the UDF
 # Add this config to the config.yaml
 ** taskmanager.system-out.mode : LOG
 # Run the job
 # Check whether the print log is redirected to log file

 

SQL demo:
{code:java}
CREATE TABLE orders (
  id           INT,
  app          INT,
  channel      INT,
  user_id      STRING,
  ts           TIMESTAMP(3),
  WATERMARK FOR ts AS ts
) WITH (
   'connector' = 'datagen',
   'rows-per-second'='20',
   'fields.app.min'='1',
   'fields.app.max'='10',
   'fields.channel.min'='21',
   'fields.channel.max'='30',
   'fields.user_id.length'='10'
);

create table print_sink ( 
  id           INT,
  app          INT,
  channel      INT,
  user_id      STRING,
  ts           TIMESTAMP(3)
) with ('connector' = 'print' );

insert into print_sink
select id       ,app       ,channel       ,user_id       ,ts   from orders 
{code}

> Release Testing Instructions: Verify FLINK-33625 Support System out and err 
> to be redirected to LOG or discarded
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-34308
>                 URL: https://issues.apache.org/jira/browse/FLINK-34308
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Configuration
>    Affects Versions: 1.19.0
>            Reporter: lincoln lee
>            Assignee: Rui Fan
>            Priority: Blocker
>              Labels: release-testing
>             Fix For: 1.19.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to