APISonar


org.apache.sysml.lops.OutputParameters.Format.CSV

> org > apache > sysml > lops > OutputParameters > Format > CSV
org APIs apache APIs sysml APIs lops APIs OutputParameters APIs Format APIs CSV APIs

Example 1
public void setFileFormatAndProperties(FileFormatTypes type) throws LopsException 
	{
		this.formatType = type ;
		if(type == FileFormatTypes.BINARY)
			this.outParams.setFormat(Format.BINARY) ;
		else if(type == FileFormatTypes.TEXT)
			this.outParams.setFormat(Format.TEXT) ;
		else if (type == FileFormatTypes.MM)
			this.outParams.setFormat(Format.MM);
		else if (type == FileFormatTypes.CSV )
			this.outParams.setFormat(Format.CSV);
		else 
			throw new LopsException("Unexpected format: " + type);
		setLopProperties();
	}
Example 2
private static boolean sendWriteLopToMR(Lop node) 
	{
		if ( ConfigurationManager.getExecutionMode() == RUNTIME_PLATFORM.SINGLE_NODE )
			return false;
		Lop in = node.getInputs().get(0);
		Format nodeFormat = node.getOutputParameters().getFormat();
		
		//send write lop to MR if (1) it is marked with exec type MR (based on its memory estimate), or
		//(2) if the input lop is in MR and the write format allows to pack it into the same job (this does
		//not apply to csv write because MR csvwrite is a separate MR job type)
		return (node.getExecType() == ExecType.MR
			|| (in.getExecType() == ExecType.MR && nodeFormat != Format.CSV));
	}