OrcOutputMetaBase 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(); String getFilename(); boolean isOverrideOutput(); void setOverrideOutput( boolean overrideOutput ); void setFilename( String filename ); List<OrcOutputField> getOutputFields(); void setOutputFields( List<OrcOutputField> outputFields ); int getStripeSize(); void setStripeSize( int stripeSize ); int getCompressSize(); void setCompressSize( int compressSize ); int getRowsBetweenEntries(); void setRowsBetweenEntries( int rowsBetweenEntries ); 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 id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void resolve(); String getCompressionType(); void setCompressionType( String value ); CompressionType getCompressionType( VariableSpace vspace ); String[] getCompressionTypes(); String constructOutputFilename(); static final int DEFAULT_ROWS_BETWEEN_ENTRIES; static final int DEFAULT_STRIPE_SIZE; static final int DEFAULT_COMPRESS_SIZE; }
@Test public void setCompressionType() { metaBase.setCompressionType( "snappy" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.SNAPPY.toString() ) ); metaBase.setCompressionType( "Snappy" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.SNAPPY.toString() ) ); metaBase.setCompressionType( "SNAPPY" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.SNAPPY.toString() ) ); metaBase.setCompressionType( "zlib" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.ZLIB.toString() ) ); metaBase.setCompressionType( "Zlib" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.ZLIB.toString() ) ); metaBase.setCompressionType( "ZLIB" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.ZLIB.toString() ) ); metaBase.setCompressionType( "lzo" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.LZO.toString() ) ); metaBase.setCompressionType( "Lzo" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.LZO.toString() ) ); metaBase.setCompressionType( "LZO" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.LZO.toString() ) ); metaBase.setCompressionType( "None" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.NONE.toString() ) ); metaBase.setCompressionType( "none" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.NONE.toString() ) ); metaBase.setCompressionType( "NONE" ); Assert.assertTrue( metaBase.getCompressionType().equals( OrcOutputMetaBase.CompressionType.NONE.toString() ) ); }