public int importJson ( String jsonFile , String keyspace , String cf , String ssTablePath ) throws IOException { ColumnFamily columnFamily = ArrayBackedSortedColumns . factory . create ( keyspace , cf ) ; IPartitioner partitioner = DatabaseDescriptor . getPartitioner ( ) ; int importedKeys = ( isSorted ) ? importSorted ( jsonFile , columnFamily , ssTablePath , partitioner ) : importUnsorted ( jsonFile , columnFamily , ssTablePath , partitioner ) ; if ( importedKeys != - 1 ) System . out . printf ( "%d keys imported successfully.%n" , importedKeys ) ; return importedKeys ; }
Convert a JSON formatted file to an SSTable .