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

Hao Chen commented on EAGLE-54:
-------------------------------

It can be easily done by rewriting this line: 
https://github.com/apache/incubator-eagle/blob/bf35ede03a55df9c851669e16c59049f696e0b6d/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogKafkaDeserializer.java#L46

My only concern is why not keep using the consistent native Kafka deserializer 
instead of customized Eagle deserializer, which may include another interface 
for user to care about.

> Encoding match between Kafka serialization and Eagle deserialization
> --------------------------------------------------------------------
>
>                 Key: EAGLE-54
>                 URL: https://issues.apache.org/jira/browse/EAGLE-54
>             Project: Eagle
>          Issue Type: Improvement
>            Reporter: Edward Zhang
>            Priority: Minor
>
> For various audit logs, Kafka serializes log with String type into bytes, and 
> Eagle deserializes bytes into String. Kafka supports to configure 
> serialization class by specifying kafka.serializer.StringEncoder and encoding 
> type. But Eagle lack the mechanism to deserialize with configuration of 
> encoding, today it does not have issue as it by default uses UTF-8 both. But 
> it is more graceful for Eagle to expose encoding configuration to be aligned 
> with Kafka.
> https://github.com/apache/kafka/blob/b62f8ea43b6d5307f7274fbe8b7984dd5ee22239/core/src/main/scala/kafka/serializer/Encoder.scala
> https://github.com/apache/incubator-eagle/blob/bf35ede03a55df9c851669e16c59049f696e0b6d/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogKafkaDeserializer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to