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




intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Lines 171 (patched)
<https://reviews.apache.org/r/71482/#comment308099>

    "ATLAS-400-00-9B" => "ATLAS-400-00-098"



intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Lines 229 (patched)
<https://reviews.apache.org/r/71482/#comment308098>

    Duplicate error code - #228 & #229. Update to "ATLAS-500-00-016"



repository/src/main/java/org/apache/atlas/util/FileUtils.java
Lines 96 (patched)
<https://reviews.apache.org/r/71482/#comment308104>

    Is it necessary to write to a file, then read it into List<String[]>? Can't 
CSVReader (#119) directly read from InputStream?
    
      new CSVReader(new InputStreamReader(uploadedInputStream));



webapp/src/main/java/org/apache/atlas/web/rest/GlossaryREST.java
Lines 962 (patched)
<https://reviews.apache.org/r/71482/#comment308103>

    Is it necessary to return a 'File' here - given the template is not a large 
string? And, how are the files returned here deleted?
    
    Consider returning javax.ws.rs.core.StreamingOutput, like:
    
      public StreamingOutput produceTemplate() throws AtlasBaseException {
        return new StreamingOutput() {
            @Override
                public void write(OutputStream output) throws IOException, 
WebApplicationException {
                        
output.write(glossaryService.getGlossaryTermTemplateString());
                }
        }
      }


- Madhan Neethiraj


On March 9, 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 9, 2020, 10:07 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, keval bhatt, 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 7c0fd56 
>   dashboardv2/gruntfile.js fef4e08 
>   dashboardv2/package-lock.json 7f25b57 
>   dashboardv2/package.json e90040e 
>   dashboardv2/public/css/scss/theme.scss 0589e09 
>   dashboardv2/public/index.html.tpl a6a999e 
>   dashboardv2/public/js/main.js 75e16c3 
>   dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html 
> 1fa1e35 
>   dashboardv2/public/js/templates/glossary/ImportGlossaryLayoutView_tmpl.html 
> PRE-CREATION 
>   dashboardv2/public/js/utils/UrlLinks.js 6c67e8c 
>   dashboardv2/public/js/views/glossary/GlossaryLayoutView.js 9b386f3 
>   dashboardv2/public/js/views/glossary/ImportGlossaryLayoutView.js 
> PRE-CREATION 
>   dashboardv3/gruntfile.js f55ff0d 
>   dashboardv3/package-lock.json 3918ecc 
>   dashboardv3/package.json 5dc0510 
>   dashboardv3/public/css/scss/leftsidebar.scss bbdc5fb 
>   dashboardv3/public/css/scss/theme.scss 2b0c45d 
>   dashboardv3/public/index.html.tpl 2edbb65 
>   dashboardv3/public/js/main.js 26fd709 
>   dashboardv3/public/js/templates/glossary/ImportGlossaryLayoutView_tmpl.html 
> PRE-CREATION 
>   
> dashboardv3/public/js/templates/search/tree/GlossaryTreeLayoutView_tmpl.html 
> 83da9c5 
>   dashboardv3/public/js/utils/UrlLinks.js 2bbe679 
>   dashboardv3/public/js/views/glossary/ImportGlossaryLayoutView.js 
> PRE-CREATION 
>   dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js 28c6a9e 
>   intg/src/main/java/org/apache/atlas/AtlasConfiguration.java c5bf50d 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 04eb4a0 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasGlossaryHeader.java
>  660514b 
>   pom.xml f76c6a0 
>   repository/pom.xml 802d587 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java 
> 9229d2d 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryTermUtils.java 
> cdc3f07 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryUtils.java 
> 9625f94 
>   repository/src/main/java/org/apache/atlas/util/FileUtils.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/glossary/GlossaryServiceTest.java 
> 759dcdf 
>   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 151aa6b 
> 
> 
> Diff: https://reviews.apache.org/r/71482/diff/13/
> 
> 
> Testing
> -------
> 
> Tested both the endpoint with curl call.
> 
> Tested upload term csv with around 100 records from curl.
> 
> 
> Thanks,
> 
> mayank jain
> 
>

Reply via email to