@ SuppressWarnings ( "unused" ) // called through reflection by RequestServer public ParseV3 parse ( int version , ParseV3 parse ) { ParserInfo parserInfo = ParserService . INSTANCE . getByName ( parse . parse_type ) . info ( ) ; ParseSetup setup = new ParseSetup ( parserInfo , parse . separator , parse . single_quotes , parse . check_header , parse . number_columns , delNulls ( parse . column_names ) , ParseSetup . strToColumnTypes ( parse . column_types ) , parse . domains , parse . na_strings , null , new ParseWriter . ParseErr [ 0 ] , parse . chunk_size , parse . decrypt_tool != null ? parse . decrypt_tool . key ( ) : null , parse . skipped_columns , parse . custom_non_data_line_markers != null ? parse . custom_non_data_line_markers . getBytes ( ) : null ) ; if ( parse . source_frames == null ) throw new H2OIllegalArgumentException ( "Data for Frame '" + parse . destination_frame . name + "' is not available. Please check that the path is valid (for all H2O nodes).'" ) ; Key [ ] srcs = new Key [ parse . source_frames . length ] ; for ( int i = 0 ; i < parse . source_frames . length ; i ++ ) srcs [ i ] = parse . source_frames [ i ] . key ( ) ; if ( ( setup . getParseType ( ) . name ( ) . toLowerCase ( ) . equals ( "svmlight" ) || ( setup . getParseType ( ) . name ( ) . toLowerCase ( ) . equals ( "avro" ) ) ) && ( ( setup . getSkippedColumns ( ) != null ) && ( setup . getSkippedColumns ( ) . length > 0 ) ) ) throw new H2OIllegalArgumentException ( "Parser: skipped_columns are not supported for SVMlight or Avro parsers." ) ; if ( setup . getSkippedColumns ( ) != null && ( ( setup . get_parse_columns_indices ( ) == null ) || ( setup . get_parse_columns_indices ( ) . length == 0 ) ) ) throw new H2OIllegalArgumentException ( "Parser: all columns in the file are skipped and no H2OFrame" + " can be returned." ) ; // Need this to send error message to R parse . job = new JobV3 ( ParseDataset . parse ( parse . destination_frame . key ( ) , srcs , parse . delete_on_done , setup , parse . blocking ) . _job ) ; if ( parse . blocking ) { Frame fr = DKV . getGet ( parse . destination_frame . key ( ) ) ; parse . rows = fr . numRows ( ) ; } return parse ; }
Entry point for parsing .