[ 
https://issues.apache.org/jira/browse/PHOENIX-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918522#comment-13918522
 ] 

James Violette commented on PHOENIX-53:
---------------------------------------

$ git log
commit 1190a54b252763b9373defa556f82b832cc87508
Author: James Taylor <[email protected]>
Date:   Mon Mar 3 10:38:00 2014 -0800

    PHOENIX-102 IndexMaintainer constructor doesn't set isMultiTenant correctly 
(JamesTaylor)

$ git apply  ~/incubator-phoenix-commons-csv-rev2-3.0.0.patch
/home/jviolette.adm/incubator-phoenix-commons-csv-rev2-3.0.0.patch:55: trailing 
whitespace.
                                CSVRecord record = parser.iterator().next();
/home/jviolette.adm/incubator-phoenix-commons-csv-rev2-3.0.0.patch:135: 
trailing whitespace.
 *
/home/jviolette.adm/incubator-phoenix-commons-csv-rev2-3.0.0.patch:136: 
trailing whitespace.
 *
/home/jviolette.adm/incubator-phoenix-commons-csv-rev2-3.0.0.patch:137: 
trailing whitespace.
 *
/home/jviolette.adm/incubator-phoenix-commons-csv-rev2-3.0.0.patch:164: 
trailing whitespace.

warning: squelched 57 whitespace errors
warning: 62 lines add whitespace errors.


> CSV loader fails on empty line
> ------------------------------
>
>                 Key: PHOENIX-53
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-53
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 2.2.3, 3.0.0
>            Reporter: James Violette
>              Labels: patch
>             Fix For: 2.2.3, 3.0.0
>
>         Attachments: commons-csv-1.0-SNAPSHOT.jar, 
> incubator-phoenix-commons-csv-rev1.patch, 
> incubator-phoenix-commons-csv-rev2-3.0.0.patch, 
> incubator-phoenix-commons-csv-rev2-3.0.0.patch, 
> incubator-phoenix-csv-commons.patch
>
>
> in org.apache.phoenix.util.CSVLoader, the upsert fails if it encounters an 
> empty line.  This occurs if all lines end with the new line character and the 
> reader returns an empty line at the end.
> A fix is to add a guard while reading the next line.
>       public void upsert(CSVReader reader) throws Exception {
>    ...
>               while ((nextLine = reader.readNext()) != null) {
>                       if (nextLine.length==0) {
>                               continue;
>                       }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to