> On Oct. 22, 2019, 9:38 p.m., Le Ma wrote: > > intg/src/main/java/org/apache/atlas/model/typedef/AtlasNamespaceDef.java > > Lines 106 (patched) > > <https://reviews.apache.org/r/71649/diff/1/?file=2169832#file2169832line106> > > > > instead of using a variable i, Why not using for (int i = 0; i < > > xx.size(); i++), it would be cleaner and more intitive, only when i is the > > laste index, you can stop appending ","
so since attributeDefs is a Set, cannot iterate over a set using this kind of construct for (int i = 0; i < xx.size(); i++). We will have to use an iterator for that. Hence I am dropping this comment. > On Oct. 22, 2019, 9:38 p.m., Le Ma wrote: > > intg/src/main/java/org/apache/atlas/model/typedef/AtlasNamespaceDef.java > > Lines 207 (patched) > > <https://reviews.apache.org/r/71649/diff/1/?file=2169832#file2169832line207> > > > > Consider using the result of toString() to get hashcode. updated the hashcode to include all the attibutes of the object > On Oct. 22, 2019, 9:38 p.m., Le Ma wrote: > > intg/src/main/java/org/apache/atlas/model/typedef/AtlasNamespaceDef.java > > Lines 211 (patched) > > <https://reviews.apache.org/r/71649/diff/1/?file=2169832#file2169832line211> > > > > Why not merging two toString() functions? create the stringbuilder > > inside, and return sb.toString() ? So we want to have both methods because the class AtlasBaseTypeDef only overrides toString(StringBuilder) - Aadarsh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71649/#review218343 ----------------------------------------------------------- On Oct. 22, 2019, 9:08 p.m., Aadarsh Jajodia wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71649/ > ----------------------------------------------------------- > > (Updated Oct. 22, 2019, 9:08 p.m.) > > > Review request for atlas, Ashutosh Mestry, Sridhar K, Le Ma, Madhan > Neethiraj, and Sarath Subramanian. > > > Bugs: ATLAS-3486 > https://issues.apache.org/jira/browse/ATLAS-3486 > > > Repository: atlas > > > Description > ------- > > This change is the first part of the bigger task defined as part of > ATLAS-3485. > This adds the data model needed for supporting namespaces and namespace > attributes > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/model/typedef/AtlasNamespaceDef.java > PRE-CREATION > intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java > e10965b870c4a300b41e93ee046b5f6d6b722728 > > intg/src/test/java/org/apache/atlas/model/typedef/TestAtlasNamespaceDef.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/71649/diff/1/ > > > Testing > ------- > > Added unit tests > > > Thanks, > > Aadarsh Jajodia > >
