> On April 6, 2016, 2:05 p.m., Hemanth Yamijala wrote:
> > notification/src/main/java/org/apache/atlas/notification/VersionedMessageDeserializer.java,
> >  line 34
> > <https://reviews.apache.org/r/45720/diff/2/?file=1325396#file1325396line34>
> >
> >     I see we have two different types, one for Hook messages and one for 
> > Entity messages.. But isn't a versioned message a container that can 
> > contain a message of Type T and thus be of only one type?
> 
> Tom Beerbower wrote:
>     When we deserialize the versioned message, the deserializer needs to know 
> what T is.  Because of erasure the only way to let it know is to pass in the 
> Type...
>     
>     Type HOOK_VERSIONED_MESSAGE_TYPE   = new 
> TypeToken<VersionedMessage<HookNotification.HookNotificationMessage>>(){}.getType();
>     Type ENTITY_VERSIONED_MESSAGE_TYPE = new 
> TypeToken<VersionedMessage<EntityNotification>>(){}.getType();

Since we have a knowledge of the message type through the first parameter to 
the VersionedMessageDeserializer constructor, and the second parameter seems to 
be a VersionedMessage type that can contain objects of type indicated by the 
first parameter, is it possible to not have the second parameter explicitly 
specified, but derive it from the first? I am just wondering if there is 
redundant information being passed. Maybe I am not understanding this fully - 
so please feel free to ignore this comment and proceed - we can take it up 
later if at all required.


- Hemanth


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45720/#review127308
-----------------------------------------------------------


On April 6, 2016, 6:17 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45720/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 6:17 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-631
>     https://issues.apache.org/jira/browse/ATLAS-631
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> 1. Introduce Versioning to Atlas Notification Payload (both ways)
> 2. For any messages that are not able to be processed, log the message do a 
> separate log file for unprocessed messages.
> 
> 
> Diffs
> -----
> 
>   distro/src/conf/atlas-log4j.xml 1ac4082 
>   notification/src/main/java/org/apache/atlas/kafka/KafkaConsumer.java 
> 029a072 
>   notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java 
> 889af11 
>   
> notification/src/main/java/org/apache/atlas/notification/AbstractMessageDeserializer.java
>  PRE-CREATION 
>   
> notification/src/main/java/org/apache/atlas/notification/AbstractNotification.java
>  596f988 
>   
> notification/src/main/java/org/apache/atlas/notification/AbstractNotificationConsumer.java
>  1cadb99 
>   
> notification/src/main/java/org/apache/atlas/notification/IncompatibleVersionException.java
>  PRE-CREATION 
>   
> notification/src/main/java/org/apache/atlas/notification/MessageDeserializer.java
>  PRE-CREATION 
>   
> notification/src/main/java/org/apache/atlas/notification/MessageVersion.java 
> PRE-CREATION 
>   
> notification/src/main/java/org/apache/atlas/notification/NotificationInterface.java
>  ac285aa 
>   
> notification/src/main/java/org/apache/atlas/notification/VersionedMessage.java
>  PRE-CREATION 
>   
> notification/src/main/java/org/apache/atlas/notification/VersionedMessageDeserializer.java
>  PRE-CREATION 
>   
> notification/src/main/java/org/apache/atlas/notification/entity/EntityMessageDeserializer.java
>  PRE-CREATION 
>   
> notification/src/main/java/org/apache/atlas/notification/hook/HookMessageDeserializer.java
>  PRE-CREATION 
>   notification/src/test/java/org/apache/atlas/kafka/KafkaConsumerTest.java 
> PRE-CREATION 
>   
> notification/src/test/java/org/apache/atlas/kafka/KafkaNotificationTest.java 
> db34815 
>   
> notification/src/test/java/org/apache/atlas/notification/AbstractNotificationConsumerTest.java
>  PRE-CREATION 
>   
> notification/src/test/java/org/apache/atlas/notification/AbstractNotificationTest.java
>  PRE-CREATION 
>   
> notification/src/test/java/org/apache/atlas/notification/MessageVersionTest.java
>  PRE-CREATION 
>   
> notification/src/test/java/org/apache/atlas/notification/VersionedMessageTest.java
>  PRE-CREATION 
>   
> notification/src/test/java/org/apache/atlas/notification/entity/EntityMessageDeserializerTest.java
>  PRE-CREATION 
>   
> notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java
>  385c41f 
>   
> notification/src/test/java/org/apache/atlas/notification/hook/HookMessageDeserializerTest.java
>  PRE-CREATION 
>   
> notification/src/test/java/org/apache/atlas/notification/hook/HookNotificationTest.java
>  11b7a53 
>   typesystem/src/main/resources/atlas-log4j.xml 2bb49d3 
> 
> Diff: https://reviews.apache.org/r/45720/diff/
> 
> 
> Testing
> -------
> 
> New unit tests added.
> 
> mvn clean test.  
> 
> Additional testing in progress.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>

Reply via email to