Re: Review Request 47527: Hive view : Upload Table- marks column as INT since first 6 rows have INT values.

2016-05-20 Thread DIPAYAN BHOWMICK

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


Ship it!




Ship It!

- DIPAYAN BHOWMICK


On May 20, 2016, 6:58 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47527/
> ---
> 
> (Updated May 20, 2016, 6:58 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16418
> https://issues.apache.org/jira/browse/AMBARI-16418
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : datatype of a column was decided based on maximum number of 
> occurence of a datatype, even if other values do not have same datatype.
> 
> In this patch : even if 1 of the value in the preview rows do not conform to 
> a datatype then it is rejected.
> 
> 
> Diffs
> -
> 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/UploadService.java
>  b6b000a 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/DataParser.java
>  7eae679 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/IParser.java
>  6056e73 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
>  a17346f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/Parser.java
>  1644c13 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/csv/CSVParser.java
>  56cff58 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/json/JSONParser.java
>  1d61798 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
>  74bf272 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/CSVParserTest.java
>  fb4c4da 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserCSVTest.java
>  99f758b 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserJSONTest.java
>  79166bb 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserXMLTest.java
>  4199257 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/JsonParserTest.java
>  38ed225 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/XMLParserTest.java
>  d048a62 
> 
> Diff: https://reviews.apache.org/r/47527/diff/
> 
> 
> Testing
> ---
> 
> extra test cases added for this algorithm of detection of datatype. existing 
> test cases changed to conform new algorithm.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 47527: Hive view : Upload Table- marks column as INT since first 6 rows have INT values.

2016-05-20 Thread Nitiraj Rathore

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

(Updated May 20, 2016, 6:58 a.m.)


Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav Kulshreshtha, 
Rohit Choudhary, and Ashwin Rajeev.


Changes
---

implemented ashwins review comments.


Bugs: AMBARI-16418
https://issues.apache.org/jira/browse/AMBARI-16418


Repository: ambari


Description
---

Earlier : datatype of a column was decided based on maximum number of occurence 
of a datatype, even if other values do not have same datatype.

In this patch : even if 1 of the value in the preview rows do not conform to a 
datatype then it is rejected.


Diffs (updated)
-

  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/UploadService.java
 b6b000a 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/DataParser.java
 7eae679 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/IParser.java
 6056e73 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
 a17346f 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/Parser.java
 1644c13 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/csv/CSVParser.java
 56cff58 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/json/JSONParser.java
 1d61798 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
 74bf272 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/CSVParserTest.java
 fb4c4da 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserCSVTest.java
 99f758b 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserJSONTest.java
 79166bb 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserXMLTest.java
 4199257 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/JsonParserTest.java
 38ed225 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/XMLParserTest.java
 d048a62 

Diff: https://reviews.apache.org/r/47527/diff/


Testing
---

extra test cases added for this algorithm of detection of datatype. existing 
test cases changed to conform new algorithm.


Thanks,

Nitiraj Rathore



Re: Review Request 47527: Hive view : Upload Table- marks column as INT since first 6 rows have INT values.

2016-05-19 Thread Ashwin Rajeev

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


Ship it!




Fix it then ship it

- Ashwin Rajeev


On May 19, 2016, 10:23 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47527/
> ---
> 
> (Updated May 19, 2016, 10:23 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16418
> https://issues.apache.org/jira/browse/AMBARI-16418
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : datatype of a column was decided based on maximum number of 
> occurence of a datatype, even if other values do not have same datatype.
> 
> In this patch : even if 1 of the value in the preview rows do not conform to 
> a datatype then it is rejected.
> 
> 
> Diffs
> -
> 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/UploadService.java
>  b6b000a 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/DataParser.java
>  7eae679 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/IParser.java
>  6056e73 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
>  a17346f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/Parser.java
>  1644c13 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/csv/CSVParser.java
>  56cff58 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/json/JSONParser.java
>  1d61798 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
>  74bf272 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/CSVParserTest.java
>  fb4c4da 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserCSVTest.java
>  99f758b 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserJSONTest.java
>  79166bb 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserXMLTest.java
>  4199257 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/JsonParserTest.java
>  38ed225 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/XMLParserTest.java
>  d048a62 
> 
> Diff: https://reviews.apache.org/r/47527/diff/
> 
> 
> Testing
> ---
> 
> extra test cases added for this algorithm of detection of datatype. existing 
> test cases changed to conform new algorithm.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 47527: Hive view : Upload Table- marks column as INT since first 6 rows have INT values.

2016-05-19 Thread Ashwin Rajeev

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




contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/Parser.java
 (line 111)


IS this exception severe from the users perspective, if yes then log at the 
error level



contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/Parser.java
 (line 140)


Same here


- Ashwin Rajeev


On May 19, 2016, 10:23 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47527/
> ---
> 
> (Updated May 19, 2016, 10:23 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav 
> Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16418
> https://issues.apache.org/jira/browse/AMBARI-16418
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : datatype of a column was decided based on maximum number of 
> occurence of a datatype, even if other values do not have same datatype.
> 
> In this patch : even if 1 of the value in the preview rows do not conform to 
> a datatype then it is rejected.
> 
> 
> Diffs
> -
> 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/UploadService.java
>  b6b000a 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/DataParser.java
>  7eae679 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/IParser.java
>  6056e73 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
>  a17346f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/Parser.java
>  1644c13 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/csv/CSVParser.java
>  56cff58 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/json/JSONParser.java
>  1d61798 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
>  74bf272 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/CSVParserTest.java
>  fb4c4da 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserCSVTest.java
>  99f758b 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserJSONTest.java
>  79166bb 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserXMLTest.java
>  4199257 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/JsonParserTest.java
>  38ed225 
>   
> contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/XMLParserTest.java
>  d048a62 
> 
> Diff: https://reviews.apache.org/r/47527/diff/
> 
> 
> Testing
> ---
> 
> extra test cases added for this algorithm of detection of datatype. existing 
> test cases changed to conform new algorithm.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Review Request 47527: Hive view : Upload Table- marks column as INT since first 6 rows have INT values.

2016-05-18 Thread Nitiraj Rathore

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

Review request for Ambari, DIPAYAN BHOWMICK, Gaurav Nagar, Pallav Kulshreshtha, 
and Ashwin Rajeev.


Bugs: AMBARI-16418
https://issues.apache.org/jira/browse/AMBARI-16418


Repository: ambari


Description
---

Earlier : datatype of a column was decided based on maximum number of occurence 
of a datatype, even if other values do not have same datatype.

In this patch : even if 1 of the value in the preview rows do not conform to a 
datatype then it is rejected.


Diffs
-

  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/UploadService.java
 b6b000a 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/DataParser.java
 7eae679 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/IParser.java
 6056e73 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
 a17346f 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/Parser.java
 1644c13 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/csv/CSVParser.java
 56cff58 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/json/JSONParser.java
 1d61798 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
 74bf272 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/CSVParserTest.java
 fb4c4da 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserCSVTest.java
 99f758b 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserJSONTest.java
 79166bb 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/DataParserXMLTest.java
 4199257 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/JsonParserTest.java
 38ed225 
  
contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/XMLParserTest.java
 d048a62 

Diff: https://reviews.apache.org/r/47527/diff/


Testing
---

extra test cases added for this algorithm of detection of datatype. existing 
test cases changed to conform new algorithm.


Thanks,

Nitiraj Rathore