You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Nitiraj Singh Rathore (JIRA)" <ji...@apache.org> on 2018/06/13 10:06:00 UTC
[jira] [Updated] (AMBARI-23179) Hive view 2.0 does not parse the
TAB delimited CSV files while using 'Upload Table'
[ https://issues.apache.org/jira/browse/AMBARI-23179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nitiraj Singh Rathore updated AMBARI-23179:
-------------------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
> Hive view 2.0 does not parse the TAB delimited CSV files while using 'Upload Table'
> -----------------------------------------------------------------------------------
>
> Key: AMBARI-23179
> URL: https://issues.apache.org/jira/browse/AMBARI-23179
> Project: Ambari
> Issue Type: Bug
> Components: ambari-views
> Affects Versions: 2.6.0
> Environment: HDP 2.6.3
> Ambari 2.6.0
> Reporter: Sindhu Subhas
> Assignee: Nitiraj Singh Rathore
> Priority: Major
> Labels: pull-request-available
> Attachments: Screen Shot 2018-02-28 at 1.02.44 AM.png, Screen Shot 2018-02-28 at 5.05.55 PM.png, Screen Shot 2018-02-28 at 5.06.47 PM.png, Screen Shot 2018-02-28 at 5.07.30 PM.png, datatab.tsv
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Problem:
> When trying to Upload table from Hive view 2.0 from a TAB delimited file, the data is not parsed as expected.
> Same feature works as expected in Hive view 1.5.0.
> Attached output from Hive view 2.0 and output from Hive view 1.5.0.
> From the code, we do see difference in the code for src/main/java/org/apache/ambari/view/hive20/resources/uploads/UploadService.java.
> Debug from Hive view 2.0:
> {code:java}
> 27 Feb 2018 20:27:28,169 DEBUG [HiveViewActorSystem-akka.actor.default-dispatcher-4] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] OperationController:53 - } java.util.HashMap
> 27 Feb 2018 20:27:28,169 DEBUG [HiveViewActorSystem-akka.actor.default-dispatcher-4] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] HiveActor:41 - Message submitted: 927343c0-5ed6-435c-be60-37448ac1a8b0
> 27 Feb 2018 20:27:30,925 INFO [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] UploadService:484 - isFirstRowHeader : false, inputFileType : CSV
> 27 Feb 2018 20:27:30,934 INFO [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] OpenCSVParser:50 - setting delimiter as T
> 27 Feb 2018 20:27:30,934 INFO [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] OpenCSVParser:56 - setting Quote char : "
> 27 Feb 2018 20:27:30,934 INFO [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] OpenCSVParser:62 - setting escapeChar : \
> 27 Feb 2018 20:27:30,939 INFO [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] Parser:75 - generating preview for : ParseOptions{options={OPTIONS_CSV_QUOTE=", OPTIONS_CSV_DELIMITER=T, HEADER=NONE, FILE_TYPE=CSV, OPTIONS_CSV_ESCAPE_CHAR=\}}
> 27 Feb 2018 20:27:30,939 DEBUG [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] Parser:83 - Illegal number of preview columns supplied null
> 27 Feb 2018 20:27:30,943 DEBUG [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] ParseUtils:152 - error while parsing as timestamp string column1 column2 column3
> java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
> at java.sql.Timestamp.valueOf(Timestamp.java:204)
> .....
> 27 Feb 2018 20:27:30,948 INFO [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] Parser:149 - datatype detected for column 0 : STRING
> 27 Feb 2018 20:27:30,949 DEBUG [ambari-client-thread-38] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] Parser:159 - return headers : [ColumnInfo{name='column1', type='STRING', precision=null, scale=null, comment='null'}]
> {code}
> Debug from Hive view 1.5.0:
> {code:java}
> 27 Feb 2018 20:13:15,881 INFO [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] UploadService:499 - isFirstRowHeader : true, inputFileType : CSV
> 27 Feb 2018 20:13:15,918 INFO [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] OpenCSVParser:50 - setting delimiter as
> 27 Feb 2018 20:13:15,919 INFO [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] OpenCSVParser:56 - setting Quote char : "
> 27 Feb 2018 20:13:15,919 INFO [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] OpenCSVParser:62 - setting escapeChar : \
> 27 Feb 2018 20:13:15,928 INFO [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] Parser:75 - generating preview for : ParseOptions{options={OPTIONS_CSV_QUOTE=", OPTIONS_CSV_DELIMITER= , HEADER=FIRST_RECORD, FILE_TYPE=CSV, OPTIONS_CSV_ESCAPE_CHAR=\}}
> 27 Feb 2018 20:13:15,929 DEBUG [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] Parser:83 - Illegal number of preview columns supplied null
> 27 Feb 2018 20:13:15,936 DEBUG [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] ParseUtils:152 - error while parsing as timestamp string AD
> java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
> at java.sql.Timestamp.valueOf(Timestamp.java:204)
> .........
> 27 Feb 2018 20:13:15,961 INFO [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] Parser:149 - datatype detected for column 2 : STRING
> 27 Feb 2018 20:13:15,962 DEBUG [ambari-client-thread-38] [HIVE 1.5.0 AUTO_HIVE_INSTANCE] Parser:159 - return headers : [ColumnDescriptionImpl[name : column1, type : STRING, position : 0, precision : null, scale : null], ColumnDescriptionImpl[name : column2, type : STRING, position : 1, precision : null, scale : null], ColumnDescriptionImpl[name : column3, type : STRING, position : 2, precision : null, scale : null]]
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)