Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2321

New HDFSTextWritableSerializer for HDFS Sink

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 1.4.0
    • None
    • None
    • Centos 6.4, Java6_u34

    Description

      Generated a new way to save the SequenceFiles, So far, Flume has two different ways to write (Text and Writable) in HDFS, we must tell it in the configuration file like this:
      colector.sinks.SinkWritable.hdfs.writeFormat = Writable.
      I have created a new type TextWritable, where you can generated SequenceFile with Text as key and BytesWritable as value.
      The key must be configured with in the flume.conf, for example:

      colector.sinks.SinkWritable.hdfs.writeFormat = TextWritable.
      colector.sinks.SinkWritable.hdfs.textWritable.keyFormat = %

      {file}

      _%

      {host}

      _hello.

      When Flume generates the SequenceFile, the key will be the name of the file and the name of the host, these variables are totally configurable. If you don't define the property keyFormat the key will be the timestamp.
      I have the code done. I hope to improve a little the JavaDoc, modify the documentation today and upload the patch.

      Attachments

        1. FLUME-2321-0.patch
          20 kB
          Guillermo Ortiz Fernández, Pragsis.

        Activity

          People

            Unassigned Unassigned
            guillermo.of Guillermo Ortiz Fernández, Pragsis.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: