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

Fateh Singh commented on RANGER-4390:
-------------------------------------

[~bpatel] 
Here is the issue we discussed today. If you would like to take it up you can 
assign it to yourself.

cc: [~rmani] 

> ORC audit fails with null pointer exception when filequeue buffer size and 
> orc buffer size are not equal
> --------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-4390
>                 URL: https://issues.apache.org/jira/browse/RANGER-4390
>             Project: Ranger
>          Issue Type: Improvement
>          Components: Ranger
>            Reporter: Fateh Singh
>            Priority: Major
>
> Steps to reproduce:
> Change config values in unit test case testAuditFileQueueSpoolORC() in 
> TestAuditQueue.java
> xasecure.audit.destination.hdfs.orc.buffersize=5
> xasecure.audit.destination.hdfs.batch.filequeue.filespool.buffer.size=10
> If both are same then error not observed
> Sample config from test case to reproduce issue:
> Configs:
> {code:java}
> {xasecure.audit.destination.hdfs.orc.buffersize=5, 
> xasecure.audit.destination.hdfs.batch.filequeue.filespool.dir=target/spool, 
> xasecure.audit.destination.hdfs.batch.queuetype=filequeue, 
> xasecure.audit.destination.hdfs.batch.filequeue.filespool.buffer.size=10, 
> xasecure.audit.destination.hdfs.batch.filequeue.filetype=orc, 
> xasecure.audit.is.enabled=true, 
> xasecure.audit.destination.hdfs.filename.format=%app-type%_ranger_audit.orc, 
> xasecure.audit.destination.hdfs=enable, 
> xasecure.audit.destination.hdfs.orc.stripesize=10, 
> xasecure.audit.destination.hdfs.dir=target/testAuditFileQueueSpoolORC, 
> xasecure.audit.destination.hdfs.orc.compression=none, 
> xasecure.audit.destination.hdfs.batch.filequeue.filespool.file.rollover.sec=5}{code}
> Error logs:
> {code:java}
> 13:52:49.800 [AuditFileQueueSpool_hdfs_destWriter] ERROR 
> org.apache.ranger.audit.provider.BaseAuditHandler - Error writing to log file.
> java.lang.NullPointerException: null
>     at java.lang.System.arraycopy(Native Method)
>     at org.apache.hadoop.io.Text.set(Text.java:225)
>     at org.apache.orc.impl.StringRedBlackTree.add(StringRedBlackTree.java:59)
>     at 
> org.apache.orc.impl.writer.StringTreeWriter.writeBatch(StringTreeWriter.java:70)
>     at 
> org.apache.orc.impl.writer.StructTreeWriter.writeRootBatch(StructTreeWriter.java:56)
>     at org.apache.orc.impl.WriterImpl.addRowBatch(WriterImpl.java:574)
>     at org.apache.ranger.audit.utils.ORCFileUtil.log(ORCFileUtil.java:147)
>     at 
> org.apache.ranger.audit.utils.RangerORCAuditWriter$1.run(RangerORCAuditWriter.java:77)
>     at 
> org.apache.ranger.audit.utils.RangerORCAuditWriter$1.run(RangerORCAuditWriter.java:73)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at javax.security.auth.Subject.doAs(Subject.java:422)
>     at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1845)
>     at 
> org.apache.ranger.audit.provider.MiscUtil.executePrivilegedAction(MiscUtil.java:544)
>     at 
> org.apache.ranger.audit.utils.RangerORCAuditWriter.logAuditAsORC(RangerORCAuditWriter.java:73)
>     at 
> org.apache.ranger.audit.utils.RangerORCAuditWriter.logAsORC(RangerORCAuditWriter.java:159)
>     at 
> org.apache.ranger.audit.utils.RangerORCAuditWriter.log(RangerORCAuditWriter.java:112)
>     at 
> org.apache.ranger.audit.destination.HDFSAuditDestination.logJSON(HDFSAuditDestination.java:79)
>     at 
> org.apache.ranger.audit.destination.HDFSAuditDestination.log(HDFSAuditDestination.java:171)
>     at 
> org.apache.ranger.audit.queue.AuditFileQueueSpool.sendEvent(AuditFileQueueSpool.java:926)
>     at 
> org.apache.ranger.audit.queue.AuditFileQueueSpool.logEvent(AuditFileQueueSpool.java:904)
>     at 
> org.apache.ranger.audit.queue.AuditFileQueueSpool.runLogAudit(AuditFileQueueSpool.java:847)
>     at 
> org.apache.ranger.audit.queue.AuditFileQueueSpool.run(AuditFileQueueSpool.java:790)
>     at java.lang.Thread.run(Thread.java:750) {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to