chovy-3012 opened a new pull request, #5508:
URL: https://github.com/apache/seatunnel/pull/5508

   
   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code 
changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB 
issue](https://github.com/apache/seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the 
pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix 
typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull 
request adds checkstyle plugin.-->
   
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for 
reason:
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update change log that in connector document. For more details you can 
refer to 
[connector-v2](https://github.com/apache/seatunnel/tree/dev/docs/en/connector-v2)
     2. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it
     3. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
   * [ ] Update the 
[`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md).
   
   ***bug as below***:
   I want to sink data from Kafka in text format, partitioned by date, into 
different HDFS directories, and the data does not contain timestamps.
   test.conf :
   ```conf
   env {
     job.name = "test"
     job.mode = "STREAMING"
     checkpoint.interval=20000
   }
   
   source {
     Kafka {
       result_table_name="test_table"
       bootstrap.servers = "xxxx:9092"
       topic = "test_topic"
       field_name = "data"
       format.type = "text"
       consumer.group = "test_group"
     }
   }
   
   transform {
     Sql {
         source_table_name = "test_table"
         result_table_name = "test_table_result"
         query="SELECT  data,formatdatetime(now(),'yyyy-MM-dd') new_ts   from  
test_table  "
     }
   }
   
   sink {
      HdfsFile {
         fs.defaultFS = "hdfs://hadoop01:9000"
         is_enable_transaction = true
         have_partition = true
         partition_by = ["new_ts"]
         partition_dir_expression = "${v0}"
         is_partition_field_write_in_file =  false
         path = "/data/test"
         file_format_type = "json"
      }
   }
   ```
   
   cmd:
   ```shell
   ./bin/start-seatunnel-flink-13-connector-v2.sh test.conf
   ```
   
   exception:
   ```shell
   java.lang.UnsupportedOperationException
        at java.util.AbstractList.remove(AbstractList.java:161)
        at java.util.AbstractList$Itr.remove(AbstractList.java:374)
        at java.util.AbstractCollection.removeAll(AbstractCollection.java:376)
        at 
org.apache.seatunnel.connectors.seatunnel.file.sink.config.FileSinkConfig.<init>(FileSinkConfig.java:142)
        at 
org.apache.seatunnel.connectors.seatunnel.file.writer.FileSinkConfigTest.testInit(FileSinkConfigTest.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
   ```
   
   ***bux fix***:
   
   fix file sink `isPartitionFieldWriteInFile` occurred exception when no 
columns are given for the sink


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to