cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-5733) json2sstable can not read from a pipe even if -n and -s are specified.
Date Wed, 10 Jul 2013 20:27:48 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-5733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis updated CASSANDRA-5733:
--------------------------------------

    Assignee: Steven Lowenthal
    
> json2sstable can not read from a pipe even if -n and -s are specified.
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-5733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5733
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.2.6
>            Reporter: Steven Lowenthal
>            Assignee: Steven Lowenthal
>            Priority: Minor
>         Attachments: 5733.txt
>
>
> SSTableImport.importSorted always opens the file twice even if the number of keys are
specifed.  I changed this to only open the file a second time when -n is not specified.
> I moved the second parser = getparser ...  call inside the if (keyCountToImport == null)
block.
>         if (keyCountToImport == null)
>         {
>             keyCountToImport = 0;
>             System.out.println("Counting keys to import, please wait... (NOTE: to skip
this use -n <num_keys>)");
>             parser.nextToken(); // START_ARRAY
>             while (parser.nextToken() != null)
>             {
>                 parser.skipChildren();
>                 if (parser.getCurrentToken() == JsonToken.END_ARRAY)
>                     break;
>                 keyCountToImport++;
>             }
>           parser = getParser(jsonFile); // renewing parser only if we read the file already
- to support streaming.
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message