[ 
https://issues.apache.org/jira/browse/FLUME-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13671708#comment-13671708
 ] 

Hari Shreedharan commented on FLUME-2062:
-----------------------------------------

Roman - sorry for not catching this one earlier, but it looks like you need to 
test whether headers is null before trying to copy the headers into the put. 
Flume does allow the headers map to be null (see EventBuilder#withBody 
methods), so this code:
{code}
      if (depositHeaders) {
        for (Map.Entry<String, String> entry : headers.entrySet()) {
          put.add(cf, entry.getKey().getBytes(Charsets.UTF_8), 
entry.getValue().getBytes(Charsets.UTF_8));
        }
      }
{code}
should be something like:
{code}
      if (depositHeaders && headers != null) {
        for (Map.Entry<String, String> entry : headers.entrySet()) {
          put.add(cf, entry.getKey().getBytes(Charsets.UTF_8), 
entry.getValue().getBytes(Charsets.UTF_8));
        }
      }
{code}
                
> make it possible for HBase sink to deposit event headers into corresponding 
> column qualifiers
> ---------------------------------------------------------------------------------------------
>
>                 Key: FLUME-2062
>                 URL: https://issues.apache.org/jira/browse/FLUME-2062
>             Project: Flume
>          Issue Type: Improvement
>          Components: Sinks+Sources
>    Affects Versions: v1.3.1
>            Reporter: Roman Shaposhnik
>            Assignee: Roman Shaposhnik
>             Fix For: v1.4.0
>
>         Attachments: 
> 0001-FLUME-2062.-make-it-possible-for-HBase-sink-to-depos.patch
>
>
> It would be nice for the HBase sink to parse the event headers and deposit 
> them into the corresponding column qualifiers of a given column family.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to