S3FileSystem extends S3CommonFileSystem { protected long parsePartSize( String partSizeString ) { long parsePartSize = convertToLong( partSizeString ); if ( parsePartSize < convertToLong( MIN_PART_SIZE ) ) { consoleLog.logBasic( BaseMessages.getString( PKG, "WARN.S3MultiPart.DefaultPartSize", partSizeString, MIN_PART_SIZE ) ); parsePartSize = convertToLong( MIN_PART_SIZE ); } if ( parsePartSize > convertToLong( MAX_PART_SIZE ) ) { consoleLog.logBasic( BaseMessages.getString( PKG, "WARN.S3MultiPart.MaximumPartSize", partSizeString, MAX_PART_SIZE ) ); } return parsePartSize; } protected  S3FileSystem( final FileName rootName, final FileSystemOptions fileSystemOptions ); protected  S3FileSystem( final FileName rootName, final FileSystemOptions fileSystemOptions,
                          final StorageUnitConverter storageUnitConverter, final S3KettleProperty s3KettleProperty ); int getPartSize();  }
@Test public void testParsePartSize() throws Exception { S3FileSystem s3FileSystem = getTestInstance(); s3FileSystem.storageUnitConverter = new StorageUnitConverter(); long _5MBLong = 5L * 1024L * 1024L; long _124MBLong = 124L * 1024L * 1024L; long _5GBLong = 5L * 1024L * 1024L * 1024L; long _12GBLong = 12L * 1024L * 1024L * 1024L; long minimumPartSize = _5MBLong; long maximumPartSize = _5GBLong; assertEquals( minimumPartSize, s3FileSystem.parsePartSize( "1MB" ) ); assertEquals( minimumPartSize, s3FileSystem.parsePartSize( "5MB" ) ); assertEquals( _124MBLong, s3FileSystem.parsePartSize( "124MB" ) ); assertEquals( maximumPartSize, s3FileSystem.parsePartSize( "5GB" ) ); assertEquals( _12GBLong, s3FileSystem.parsePartSize( "12GB" ) ); }