----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71482/#review219772 -----------------------------------------------------------
intg/src/main/java/org/apache/atlas/AtlasConfiguration.java Line 66 (original), 66 (patched) <https://reviews.apache.org/r/71482/#comment307968> Empty string as default value for 'atlas.import.temp.directory' is by-design. Why should the default be changed? intg/src/main/java/org/apache/atlas/AtlasErrorCode.java Lines 171 (patched) <https://reviews.apache.org/r/71482/#comment307969> "File Type" => "file type" intg/src/main/java/org/apache/atlas/AtlasErrorCode.java Lines 195 (patched) <https://reviews.apache.org/r/71482/#comment307970> "No Data" => "No data" repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java Lines 1107 (patched) <https://reviews.apache.org/r/71482/#comment307975> Avoid prefix 'atlas' to variables/members. repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java Lines 1122 (patched) <https://reviews.apache.org/r/71482/#comment307974> Contents of failedTermMsgList don't seem to be used here; how are the failures reported back to the caller? repository/src/main/java/org/apache/atlas/util/FileUtils.java Lines 59 (patched) <https://reviews.apache.org/r/71482/#comment307971> - which directory does this file, named 'template', get created? In webapp directory or the directory from which Atlas server was launched? - when does this file get cleaned up (i.e. deleted)? - if this method is called simultaneously from mutiple threads, the file contents will be overwritten. What is the impact? repository/src/main/java/org/apache/atlas/util/FileUtils.java Lines 86 (patched) <https://reviews.apache.org/r/71482/#comment307972> Error message doesn't have enough details to troubleshoot the issue. Please review and update. webapp/src/main/java/org/apache/atlas/web/rest/GlossaryREST.java Lines 957 (patched) <https://reviews.apache.org/r/71482/#comment307973> I suggest to use replace '/template' with '/import/template'. - Madhan Neethiraj On March 4, 2020, 10:07 a.m., mayank jain wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71482/ > ----------------------------------------------------------- > > (Updated March 4, 2020, 10:07 a.m.) > > > Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, > and Sarath Subramanian. > > > Bugs: ATLAS-3423 > https://issues.apache.org/jira/browse/ATLAS-3423 > > > Repository: atlas > > > Description > ------- > > This patch consists implementation for 2 end points first for template > download and other for csv file upload with term details also the Unit Test > cases for both the end points. > > * The 1st endpoint {glossary/template} return template file this would be > type of format of data that shows how the data needs to be populated by user > in the file. > > http://localhost:21000/api/atlas/v2/glossary/importHeaderRow > > Template structure:- > > GlossaryName, TermName, ShortDescription, LongDescription, Examples, > Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor, > Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, > TranslatedTerms, IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms > Fruits,Apple5,SD4,LD4,"EXAMPLE","ABBREVIATION","USAGE",,"Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4","Footwear:B4" > > > * The 2nd endpoint {glossary/importGlossaryData} (file upload) would actually > parse the Data into AtlasObjects and further create the AtlasGlossaryTerms > inside Glossary. > > curl -v -g POST -u admin:admin -H "Content-Type: multipart/form-data" -H > "Cache-Control: no-cache" -F file=@template_6.csv > "http://localhost:21000/api/atlas/v2/glossary/import > > > Note:- > > While populating the data in the csv file each record should be maintained > in single Line (enter command within the record would result in parsing the > second line as a new record). > > The downloaded template needs to be saved as whateverTheFileNameIs.csv > explicitly. > > If the file is been succefully uploaded then the AtlasGlossaryTerm would be > returned or else List of Errors would returned for user to rectify them > further. > > > Diffs > ----- > > common/src/main/java/org/apache/atlas/repository/Constants.java 7c0fd5601 > dashboardv2/gruntfile.js fef4e08c3 > dashboardv2/package-lock.json 7f25b5752 > dashboardv2/package.json e90040edb > dashboardv2/public/css/scss/theme.scss 0589e0920 > dashboardv2/public/index.html.tpl a6a999e53 > dashboardv2/public/js/main.js 75e16c3aa > dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html > 1fa1e3540 > dashboardv2/public/js/templates/glossary/ImportGlossaryLayoutView_tmpl.html > PRE-CREATION > dashboardv2/public/js/utils/UrlLinks.js 6c67e8c37 > dashboardv2/public/js/views/glossary/GlossaryLayoutView.js 9b386f326 > dashboardv2/public/js/views/glossary/ImportGlossaryLayoutView.js > PRE-CREATION > dashboardv3/gruntfile.js f55ff0d5e > dashboardv3/package-lock.json 3918eccaa > dashboardv3/package.json 5dc05104f > dashboardv3/public/css/scss/leftsidebar.scss bbdc5fb26 > dashboardv3/public/css/scss/theme.scss 2b0c45d6b > dashboardv3/public/index.html.tpl 2edbb659d > dashboardv3/public/js/main.js 26fd70991 > dashboardv3/public/js/templates/glossary/ImportGlossaryLayoutView_tmpl.html > PRE-CREATION > > dashboardv3/public/js/templates/search/tree/GlossaryTreeLayoutView_tmpl.html > 83da9c57c > dashboardv3/public/js/utils/UrlLinks.js 2bbe6796f > dashboardv3/public/js/views/glossary/ImportGlossaryLayoutView.js > PRE-CREATION > dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js 28c6a9e4a > intg/src/main/java/org/apache/atlas/AtlasConfiguration.java c5bf50dca > intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 04eb4a08e > > intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasGlossaryHeader.java > 660514bc2 > pom.xml f76c6a05e > repository/pom.xml 802d587a8 > repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java > 9229d2d58 > repository/src/main/java/org/apache/atlas/glossary/GlossaryTermUtils.java > cdc3f073f > repository/src/main/java/org/apache/atlas/glossary/GlossaryUtils.java > 9625f9409 > repository/src/main/java/org/apache/atlas/util/FileUtils.java PRE-CREATION > repository/src/test/java/org/apache/atlas/glossary/GlossaryServiceTest.java > 759dcdf42 > repository/src/test/resources/csvFiles/empty.csv PRE-CREATION > repository/src/test/resources/csvFiles/incorrectFile.csv PRE-CREATION > repository/src/test/resources/csvFiles/template_1.csv PRE-CREATION > repository/src/test/resources/excelFiles/template_1.xlsx PRE-CREATION > webapp/src/main/java/org/apache/atlas/web/rest/GlossaryREST.java 151aa6bce > > > Diff: https://reviews.apache.org/r/71482/diff/12/ > > > Testing > ------- > > Tested both the endpoint with curl call. > > Tested upload term csv with around 100 records from curl. > > > Thanks, > > mayank jain > >
