Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8564365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:11:02+00:00 2026-06-11T17:11:02+00:00

I’m trying to collecting logs in a text file to HBase using Flume NG.

  • 0

I’m trying to collecting logs in a text file to HBase using Flume NG. Each row in the log file is JSON text, and I’m inserting them as values in HBase table. The problem is I have no idea how to customize the row key pattern. For example, when I count rows in a table:

hbase(main):001:0> count 'flume-ng-test', 100000
Current count: 100000, row: default32e473e0-4f54-48b5-8081-c3f845b38456         
Current count: 200000, row: default65b0cc3d-5421-4bb1-87e2-b21c2841fcd6         
Current count: 300000, row: default98be85e3-bb9f-402e-8f36-0db74cb8ab44         
Current count: 400000, row: defaultcbf888dc-e2bb-492f-ab17-63f5e0327344         
Current count: 500000, row: defaultfedc40e5-04b4-49a4-8734-655f43956d6e         
502224 row(s) in 8.1540 seconds

Row keys are default + UUID_like_string. If I want to change the row key pattern using current timestamp (ascending or descending), what should I do?

Thanks for any comments.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:11:03+00:00Added an answer on June 11, 2026 at 5:11 pm

    In flume-ng’s HBase sink, HbaseEventSerializer implementation is responsible for generating row keys. The default implementation org.apache.flume.sink.hbase.SimpleHbaseEventSerializer already supports generating timestamp row keys in the format prefix + current timestamp, to use it just modify your flume configuration accordinly.

    hbase-agent.sinks.sink1.type = org.apache.flume.sink.hbase.HBaseSink
    hbase-agent.sinks.sink1.channel = ch1
    hbase-agent.sinks.sink1.table = demo
    hbase-agent.sinks.sink1.columnFamily = cf
    hbase-agent.sinks.sink1.serializer = org.apache.flume.sink.hbase.SimpleHbaseEventSerializer
    hbase-agent.sinks.sink1.serializer.payloadColumn = col1
    hbase-agent.sinks.sink1.serializer.keyType = timestamp
    

    If the provided timestamp based key generation method is not what you are after then you’ll need to provide a custom HbaseEventSerializer implementation to flume, which will require you to:

    1. Create your own row key generator class (the default one is org.apache.flume.sink.hbase.SimpleRowKeyGenerator)
    2. Create your own implementation of the HbaseEventSerializer interface (default implementation is org.apache.flume.sink.hbase.SimpleHbaseEventSerializer) which will use the custom row key generator you created in first step
    3. Modify your flume hbase sink configuration to use the custom HbaseEventSerializer implementation.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to render a haml file in a javascript response like so:
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a reasonable size flat file database of text documents mostly saved in
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.