> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Classifications.java
> > Lines 89 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887948#file1887948line89>
> >
> >     suppext this calss extends List so you can use java iterator

These classes are all type specific implementations of java.util.Iterator.  
Creating type specific implementations simplifies the client programming model 
because there is no need to TypeCase from java.lan.Object.  In additiona, the 
OCF properties support cascading deep copies and detailed error reporting in 
the context of the parent asset.


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Classifications.java
> > Lines 140 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887948#file1887948line140>
> >
> >     if this class extends List then you can use size() so not need for this 
> > method.

This class is an iterator rather than a List.  The explicit method extends the 
capabilities of the Iterator, simplfying the programmming model.


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectedAssetProperties.java
> > Lines 95 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887952#file1887952line95>
> >
> >     I wonder why get Assetsummary returns the asset Universe properties. 
> > Surely it should bthe assetsummary subset.

AssetUniverse extends AssetSummary.  The type definition of the method means 
that the caller will see an AssetSummary object


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectedAssetProperties.java
> > Lines 104 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887952#file1887952line104>
> >
> >     I wonder why get AssetDetail returns the asset Universe properties. 
> > Surely it should bthe assetDetail subset.

AssetUniverse extends AssetDetail.  The type definition of the method means 
that the caller will see an AssetDetail object


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connection.java
> > Lines 64 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887953#file1887953line64>
> >
> >     I suggest you add toString, hashCode and equals methods to all objects.

Can do - but how/when are they used and what are we trying to get from their 
implementaiton over the default?


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connection.java
> > Lines 80 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887953#file1887953line80>
> >
> >     Default constructor usually means one with not arguments - I suggest 
> > not using this description. The same for the other instances

OK - can change the comment to "Usual Constructor"


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connection.java
> > Lines 99 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887953#file1887953line99>
> >
> >     I am unsure about this method. It appears that connections can be 
> > constructed with a parent asset. I would therefore assume that a clone 
> > constructor would copy the existing connections content including the 
> > parentAsset. I am unsure what we would supply a parentAsset parameter on 
> > the constructor unless we wanted to change the parent asset. If we want to 
> > change the parent asset and clone the connector then this should be 
> > explicit in the comments. 
> >     
> >     Going up the Connection(parentAsset) constructor it looks like the 
> > parentAsset is never stored.

This is a deep copy and so the parent asset object changes - if we keep the 
parent asset the same in the clone, it will point to the original parent asset 
not the new one.


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connection.java
> > Lines 153 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887953#file1887953line153>
> >
> >     I would have thought that this getter could be used in circumstances 
> > other than error message formatting.
> >     
> >     Error message formating inserts tend to use toString() for the object 
> > and spit out all of the parameters

I think that is true for debug logging - but not for the error messages inside 
the exceptions that may get printed externally.


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connection.java
> > Lines 180 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887953#file1887953line180>
> >
> >     when will this case occur. I thought all connections had to have a 
> > unique name.

The problem occures if FQName is not set (ie using display name) and the 
display name is pretty lame - eg "my database" - or 2 connections with FQNames 
are defined in different repositories and are only locally unique.  We have to 
expect that their may be clashes between repositories.  Only the GUIDs can be 
thought of as really unique (rather than aspirationally so :).  Even so we have 
code in the OMRS that also looks for clashing GUIDs - again just in case we are 
unlucky there - but that is much more unlikely and needs system action.


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connections.java
> > Lines 71 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887954#file1887954line71>
> >
> >     for (Connection templateConnection :templateConnections) would be neater

I don't know how to read the suggested syntax - it seems obscure - I know I am 
a rusty Java programmer - but is the suggested syntax understandable to the 
average Java programmer?


> On Nov. 30, 2017, 10:29 a.m., David Radley wrote:
> > om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connections.java
> > Lines 88 (patched)
> > <https://reviews.apache.org/r/63503/diff/2/?file=1887954#file1887954line88>
> >
> >     I would think that if this class was a java List then we could just get 
> > the iterator from the list and use inbuilt java iterators to supply the 
> > next and hasNext methods.
> >     
> >     for example 
> > http://crunchify.com/how-to-iterate-through-java-list-4-way-to-iterate-through-loop/

The enumerations are type specific implementaitons of Iterator.  They are 
designed to reduce the need for the client to type cast from Object, support 
details error reporting and cascading deep copies.  We loose all of that if we 
use the default implementations which is why I opted to do the type specific 
implementaitons - they are a pain to build byt they resulted in a cleaner 
programming model for novice programmers.


- Mandy


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


On Nov. 10, 2017, 12:48 p.m., Mandy Chessell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63503/
> -----------------------------------------------------------
> 
> (Updated Nov. 10, 2017, 12:48 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> This patch contains the open connector framework code.  This code is located 
> in the om-fwk-ocf component and is described in JIRA 
> https://issues.apache.org/jira/browse/ATLAS-1095
> 
> I have added a new patch to the Jira with fixes from Yao's comments.  
> Upgraded Maven to 352 and rebuilt/rerun tests.
> 
> 
> Diffs
> -----
> 
>   om-fwk-ocf/README.md PRE-CREATION 
>   om-fwk-ocf/pom.xml PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/Connector.java PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ConnectorBase.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ConnectorBroker.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ConnectorProvider.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ConnectorProviderBase.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectionCheckedException.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectorCheckedException.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/OCFCheckedExceptionBase.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/OCFErrorCode.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/OCFRuntimeException.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/PropertyServerException.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/README.md PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/AdditionalProperties.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Analysis.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Annotation.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/AnnotationStatus.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Annotations.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/AssetDescriptor.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/AssetDetail.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/AssetPropertyBase.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/AssetSummary.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/AssetUniverse.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Certification.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Certifications.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Classification.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Classifications.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Comment.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/CommentType.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Comments.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectedAssetProperties.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connection.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connections.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectorType.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/DerivedSchemaElement.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementHeader.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementType.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnection.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnections.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Endpoint.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifiers.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReference.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReferences.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Feedback.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTag.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTags.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/KeyPattern.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/License.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Licenses.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Like.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Likes.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Lineage.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Location.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Locations.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/MapSchemaElement.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Meaning.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Meanings.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Note.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/NoteLog.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/NoteLogs.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Notes.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/PrimitiveSchemaElement.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/PropertyBase.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Rating.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Ratings.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Referenceable.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedAsset.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedAssetProperties.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedAssets.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedMediaReference.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedMediaReferences.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedMediaType.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedMediaUsage.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Schema.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaAttribute.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaAttributeGUIDs.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaAttributes.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaElement.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaImplementationQueries.java
>  PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaImplementationQuery.java
>  PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaLink.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/SchemaLinks.java 
> PRE-CREATION 
>   om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/StarRating.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/VirtualConnection.java
>  PRE-CREATION 
>   om-fwk-ocf/src/test/java/org/apache/atlas/ocf/test/QuickTest.java 
> PRE-CREATION 
>   om-fwk-ocf/src/test/java/org/apache/atlas/ocf/test/TestConnector.java 
> PRE-CREATION 
>   
> om-fwk-ocf/src/test/java/org/apache/atlas/ocf/test/TestConnectorProvider.java 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/63503/diff/2/
> 
> 
> Testing
> -------
> 
> Simple sniff test to create connectors.
> 
> 
> File Attachments
> ----------------
> 
> 0001-ATLAS-1095-initial-code-drop-for-OCF-with-fixes-from.patch
>   
> https://reviews.apache.org/media/uploaded/files/2017/11/10/ad9eae3c-bb68-4bdc-b6b9-62ba12f651a0__0001-ATLAS-1095-initial-code-drop-for-OCF-with-fixes-from.patch
> 
> 
> Thanks,
> 
> Mandy Chessell
> 
>

Reply via email to