You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "dongsilun (via GitHub)" <gi...@apache.org> on 2023/08/14 06:29:55 UTC

[GitHub] [seatunnel] dongsilun opened a new issue, #5299: [Bug] [Flink Sink Writer] Kafka → Hive(Partition table). Records under the same partition will be overwritten

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

   ### 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
   
   There are two records : {"id":10,"name":"zz1","age":20,"pt":"aa"}, {"id":10,"name":"zz1","age":30,"pt":"aa"}.
   One by one, the records are input to the kafka producer client. 
   There is only one record ["id":10,"name":"zz1","age":30,"pt":"aa"] in partition 'aa' of hive table.
   An overwrite has occurred. The file in hdfs only have one line.
   
   
   ### SeaTunnel Version
   
   2.3.2
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
     job.mode = "STREAMING"
     checkpoint.interval = 2000
   }
   
   source {
   
     Kafka {
       result_table_name = "ltao_test"
       schema = {
         fields {
           id = "int"
           name = "string"
           age = "int"
           pt = "string"
         }
       }
       format = json
       consumer.group = "seatunnel1"
       topic = "kafka2hive"
       bootstrap.servers = "node02:9092,node03:9092,node04:9092"
       kafka.config = {
         auto.offset.reset = "latest"
       }
     } 
   }
   
   transform {
     Sql {
       source_table_name = "ltao_test"
       result_table_name = "result_table"
       query = "select id, concat(name, '_', 'test') as user_name, age, pt from ltao_test where id>0"
     }
   }
   
   sink {
     Hive {
       table_name = "test.ltao"
       metastore_uri = "thrift://node02:9083"
       save_mode="append"
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   start-seatunnel-flink-15-connector-v2.sh --master local --config test_kakfa_to_hive.conf
   ```
   
   
   ### Error Exception
   
   ```log
   None
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   Flink-1.15.3
   
   ### Java or Scala Version
   
   Java8
   
   ### Screenshots
   
   ![image](https://github.com/apache/seatunnel/assets/70750474/aeaba961-6ecb-400a-80d6-3cae10482e93)
   ![image](https://github.com/apache/seatunnel/assets/70750474/b881228d-1563-4cf9-83b5-dea1b633de31)
   
   
   ### 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


[GitHub] [seatunnel] github-actions[bot] commented on issue #5299: [Bug] [Flink Sink Writer] Kafka → Hive(Partition table). With Flink-1.15, FlinkSinkWriter.snapshotState() never be called

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5299:
URL: https://github.com/apache/seatunnel/issues/5299#issuecomment-1718478885

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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


[GitHub] [seatunnel] dongsilun commented on issue #5299: [Bug] [Flink Sink Writer] Kafka → Hive(Partition table). Records under the same partition will be overwritten

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

   Because " FlinkSinkWriter.snapshotState() " never be called. When currentBatchSize < batchSize, partId never ++, and snapshotState() never be called, so checkpointId never ++. Every time he new filename is same.
   seatunnel + flink-1.15 have this question
   seatunnel + flink-1.14 doesn't have this question.
   The key maybe flink-1.15 change some code about checkpoint.


-- 
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] [Flink Sink Writer] Kafka → Hive(Partition table). With Flink-1.15, FlinkSinkWriter.snapshotState() never be called [seatunnel]

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

   Have you solved this problem? 


-- 
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


[GitHub] [seatunnel] github-actions[bot] commented on issue #5299: [Bug] [Flink Sink Writer] Kafka → Hive(Partition table). With Flink-1.15, FlinkSinkWriter.snapshotState() never be called

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5299:
URL: https://github.com/apache/seatunnel/issues/5299#issuecomment-1728586625

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
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


[GitHub] [seatunnel] github-actions[bot] closed issue #5299: [Bug] [Flink Sink Writer] Kafka → Hive(Partition table). With Flink-1.15, FlinkSinkWriter.snapshotState() never be called

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5299: [Bug] [Flink Sink Writer] Kafka → Hive(Partition table). With Flink-1.15, FlinkSinkWriter.snapshotState() never be called
URL: https://github.com/apache/seatunnel/issues/5299


-- 
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