AvroOutputMetaBase extends BaseStepMeta implements StepMetaInterface,  ResolvableResource { public void setCompressionType( String value ) { compressionType = StringUtil.isVariable( value ) ? value : parseFromToString( value, CompressionType.values(), CompressionType.NONE ).name(); }  @Override void setDefault(); boolean isOverrideOutput(); void setOverrideOutput( boolean overrideOutput ); String getFilename(); void setFilename( String filename ); List<AvroOutputField> getOutputFields(); void setOutputFields( List<AvroOutputField> outputFields ); boolean isDateInFileName(); void setDateInFileName( boolean dateInFileName ); boolean isTimeInFileName(); void setTimeInFileName( boolean timeInFileName ); String getDateTimeFormat(); void setDateTimeFormat( String dateTimeFormat ); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); @Override String getXML(); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId stepId, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId transformationId, ObjectId stepId ); @Override void resolve(); String getSchemaFilename(); void setSchemaFilename( String schemaFilename ); String getNamespace(); void setNamespace( String namespace ); String getRecordName(); void setRecordName( String recordName ); String getDocValue(); void setDocValue( String docValue ); String getCompressionType(); void setCompressionType( String value ); CompressionType getCompressionType( VariableSpace vspace ); String[] getCompressionTypes(); String constructOutputFilename( String file );  }
@Test public void setCompressionType() { metaBase.setCompressionType( "snappy" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.SNAPPY.toString() ) ); metaBase.setCompressionType( "Snappy" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.SNAPPY.toString() ) ); metaBase.setCompressionType( "SNAPPY" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.SNAPPY.toString() ) ); metaBase.setCompressionType( "deflate" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.DEFLATE.toString() ) ); metaBase.setCompressionType( "Deflate" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.DEFLATE.toString() ) ); metaBase.setCompressionType( "DEFLATE" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.DEFLATE.toString() ) ); metaBase.setCompressionType( "DEFLATE124" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.NONE.toString() ) ); metaBase.setCompressionType( "None" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.NONE.toString() ) ); metaBase.setCompressionType( "NONE" ); Assert.assertTrue( metaBase.getCompressionType().equals( AvroOutputMetaBase.CompressionType.NONE.toString() ) ); }