You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "moonzhm (via GitHub)" <gi...@apache.org> on 2024/09/20 03:39:08 UTC

[I] [Bug] [HTTP SOURCE] STREAMING模式下,http只get了一次数据,从外部post新数据后,并不能流式更新或插入 [seatunnel]

moonzhm opened a new issue, #7698:
URL: https://github.com/apache/seatunnel/issues/7698

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   测试seatunnel的同步功能时,使用http作为source,mysql作为sink。不论配不配置poll_interval_millis,都只在任务启动时同步一次数据到mysql里面,然后在任务保持任务运行状态下,post新数据后,并没有更新或插入操作,日志也显示数据条数持续不变,怀疑未进行轮询
   ![微信截图_20240920113345](https://github.com/user-attachments/assets/b7ab9a6b-76a7-426f-a247-98241aadbd18)
   
   
   ### SeaTunnel Version
   
   2.3.7
   
   ### SeaTunnel Config
   
   ```conf
   env {
     job.mode = "STREAMING"
     job.name="http_mysql"
     execution.parallelism = 1
     checkpoint.interval = 10000
   }
   
   source {
     Http {
       
       url = "http://******.******:*****/api/sync/user"
       method = "GET"
       format = "json"
       
       headers = {
         Cookie: "token=*****"
       }
       
       poll_interval_millis = 5000
       
       result_table_name = "sync_user_1"
       
       json_field = {
         userId = "$.result[*].userId"
         email = "$.result[*].email"
       }
           
       schema = {
         fields {
           userId = "string"
           email = "string"
         }
       }
       
       
     }
   }
   
   
   transform {
     Sql {
       source_table_name = "sync_user_1"
       result_table_name = "sync_user_2"
       query = "SELECT userId AS username, email, 1 AS active FROM sync_user_1 where email != ''"
     }
   }
   
   
   sink {
       jdbc{
           source_table_name = "sync_user_2"
           url = "jdbc:mysql://*****:3306/***"
           driver = "com.mysql.cj.jdbc.Driver"
           user = "root"
           password = "admin"
           query = "INSERT INTO ab_user_bak (username, email, active) VALUES (?,?,?) ON DUPLICATE KEY UPDATE email = VALUES(email), active = VALUES(active)" 
       }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   no
   ```
   
   
   ### Error Exception
   
   ```log
   no
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [HTTP SOURCE] STREAMING模式下,http只get了一次数据,从外部post新数据后,并不能流式更新或插入 [seatunnel]

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 closed issue #7698: [Bug] [HTTP SOURCE] STREAMING模式下,http只get了一次数据,从外部post新数据后,并不能流式更新或插入
URL: https://github.com/apache/seatunnel/issues/7698


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [HTTP SOURCE] STREAMING模式下,http只get了一次数据,从外部post新数据后,并不能流式更新或插入 [seatunnel]

Posted by "CosmosNi (via GitHub)" <gi...@apache.org>.
CosmosNi commented on issue #7698:
URL: https://github.com/apache/seatunnel/issues/7698#issuecomment-2362994307

   streaming模式通常是无界流,上文的http请求是有界的,UNBOUNDED并不会轮询去取数据。看是不是增加定时轮询功能。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org