Giter Club home page Giter Club logo

Comments (6)

xianzhen avatar xianzhen commented on July 25, 2024 1

I used fieldPartioner to handle it. But i think your idea is better!

from kafka-connect-hdfs.

doriwal avatar doriwal commented on July 25, 2024

Agree that timeBased should have the option to use event time , for example event that send from mobile SDK at 8:58 might be pushed to kafka at 9:01 , using the ingestion time is not accurate

I also added pull request in order to support several fieldsPartitioner as in my use case I need both event time and event type in order to partition the events in parquet

from kafka-connect-hdfs.

ewencp avatar ewencp commented on July 25, 2024

@xianzhen FieldPartitioner only works for exact values, which means you can't use a timestamp field directly, you need it to be simplified to, e.g., minute, hour, or day, depending on the granularity you want.

@KerKerO I think this would definitely be valuable. In particular, Kafka added timestamps natively in its format (but after this connector was originally created) so we should at least support those. Additionally, since Connect supports timestamp logical types, we should definitely have support for those fields. I think this should amount to a small additional config to specify the field and minor modifications to TimeBasedPartitioner.

from kafka-connect-hdfs.

doriwal avatar doriwal commented on July 25, 2024

Agree that FieldPartitioner cant use timestamp , in my use case each event that i am sending to kafka contains also the following fields : day like 2016-08-23 , time like 10:00
this fields are calculated from the event timestamp (I am adding day/time fields to the event that i am sending to kafka)

from kafka-connect-hdfs.

codenamelxl avatar codenamelxl commented on July 25, 2024

A little head-up, it seems that kafka-connect-hdfs has been change to use kafka-connect-storage-common which does have a very nice way to provide a timestamp field ( it can be seen here in kafka-connect-s3 which also use kafka-connec-storage-common. We now have to wait for this change come into release :) From what i see in the branch, 3.3.1-alpha2 still does not have mentioned change applied :(

from kafka-connect-hdfs.

kkonstantine avatar kkonstantine commented on July 25, 2024

Indeed, timestamp-based partitioners where timestamp is stored in the Kafka record or a record field have become available under kafka-connect-storage-common.

Two recent PRs have added support of such partitioners in the HDFS connector (#245 and #246).

Closing this issue, and we may reopen this one or a new one if there's an issue with these partitioners. Anyone interested in field-based timestamp partitioning is highly encouraged to try what's on master right now! Thanks everyone for highlighting this feature!

from kafka-connect-hdfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.