----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55912/#review162910 -----------------------------------------------------------
intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java (line 46) <https://reviews.apache.org/r/55912/#comment234297> this initialization seems unnecessary, as this gets initialized on demand in addEntity(). intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java (line 93) <https://reviews.apache.org/r/55912/#comment234298> Consider the following little optimization: List<AtlasEntityHeader> opEntities = entitiesMutaged.get(op); if (opEntities == null) { opEntities = new ArrayList<>(); entitiesMutated.put(opEntities); } opEntities.add(header); intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java (line 105) <https://reviews.apache.org/r/55912/#comment234299> Consider replacing this "if" block with a call to: AtlasBaseTypeDef.dumpObjects(entitiesMutated) repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java (line 141) <https://reviews.apache.org/r/55912/#comment234296> "Invalid entity type " ==> "Invalid object type " repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java (line 182) <https://reviews.apache.org/r/55912/#comment234301> Consider moving this to line #184, as the variable is not referenced outside that "if" block. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java (line 185) <https://reviews.apache.org/r/55912/#comment234302> "b" is not used here. Please review and remove. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java (line 227) <https://reviews.apache.org/r/55912/#comment234308> structType.getStructDef().getAttributeDefs() will not get attributes of superTypes, right? This method is called with 'entity' as value from few places - line #135, line #237. Please review if structType.getAllAttributes() should be used here instead? Please review this test failure as well: Tests run: 9, Failures: 1, Errors: 0, Skipped: 6, Time elapsed: 11.297 sec <<< FAILURE! - in org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1Test testCreate(org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1Test) Time elapsed: 0.103 sec <<< FAILURE! java.lang.NullPointerException: null at org.apache.atlas.repository.graph.GraphHelper.vertexString(GraphHelper.java:357) at org.apache.atlas.repository.graph.GraphHelper.getOrCreateEdge(GraphHelper.java:203) at org.apache.atlas.repository.store.graph.v1.EntityGraphMapper.toGraph(EntityGraphMapper.java:98) at org.apache.atlas.repository.store.graph.v1.StructVertexMapper.mapToVertexByTypeCategory(StructVertexMapper.java:161) at org.apache.atlas.repository.store.graph.v1.StructVertexMapper.mapAttribute(StructVertexMapper.java:140) at org.apache.atlas.repository.store.graph.v1.StructVertexMapper.mapAttributestoVertex(StructVertexMapper.java:115) at org.apache.atlas.repository.store.graph.v1.EntityGraphMapper.mapAttributes(EntityGraphMapper.java:144) at org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1.createOrUpdate(AtlasEntityStoreV1.java:143) at org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1.createOrUpdate(AtlasEntityStoreV1.java:70) at org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1Test.testCreate(AtlasEntityStoreV1Test.java:133) - Madhan Neethiraj On Jan. 25, 2017, 2:55 a.m., Suma Shivaprasad wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55912/ > ----------------------------------------------------------- > > (Updated Jan. 25, 2017, 2:55 a.m.) > > > Review request for atlas. > > > Bugs: ATLAS-1498 > https://issues.apache.org/jira/browse/ATLAS-1498 > > > Repository: atlas > > > Description > ------- > > Fixed issues in entity discovery, collections etc found during testing > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/AtlasErrorCode.java e4f3dfd > > intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java > 8aba1fb > intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 4712508 > intg/src/test/java/org/apache/atlas/TestUtilsV2.java f9040f3 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java > b874c5d > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java > 18e397b > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java > 1947855 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java > 425bde9 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java > 174e490 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityMutationContext.java > f942a91 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/IDBasedEntityResolver.java > 488f141 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/MapVertexMapper.java > 9d219f5 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/StructVertexMapper.java > ae9ecc4 > > repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java > 0ff33ba > > Diff: https://reviews.apache.org/r/55912/diff/ > > > Testing > ------- > > > Thanks, > > Suma Shivaprasad > >
