[
https://issues.apache.org/jira/browse/NIFI-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16121249#comment-16121249
]
ASF GitHub Bot commented on NIFI-4275:
--------------------------------------
Github user pvillard31 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2070#discussion_r132390001
--- Diff:
nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors/src/main/java/org/apache/nifi/hbase/PutHBaseRecord.java
---
@@ -317,18 +333,34 @@ protected PutFlowFile createPut(ProcessContext
context, Record record, RecordSch
final byte[] fam = clientService.toBytes(columnFamily);
+ final Long timestamp;
+ if (!StringUtils.isBlank(timestampFieldName)) {
+ try {
+ timestamp = record.getAsLong(timestampFieldName);
--- End diff --
Could the record be null here? (I assume it could since we're checking the
record is not null few lines below)
> Allow specifying timestamp in PutHBase processors
> -------------------------------------------------
>
> Key: NIFI-4275
> URL: https://issues.apache.org/jira/browse/NIFI-4275
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Bryan Bende
> Assignee: Bryan Bende
> Priority: Minor
>
> We should add the ability to specify the timestamp of a cell in PutHBase
> processors.
> * PutHBaseCell - Add an optional property called "Timestamp" that supports
> EL, if specified it would get passed to the Put operation sent to HBase
> * PutHBaseJson - Add an optional property called "Timestamp" that supports
> EL, if specified this would be the timestamp used for all cells created from
> the JSON document
> * PutHBaseRecord - Add an optional property called "Timestamp Field Name"
> that supports EL, if specified the value of this field would be used as the
> timestamp of each cell
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)