/** Returns a view of the configuration of the compressor used to compress this type */ public CompressionConfig getCompressionConfig() { // CompressionConfig accepts a percentage (but exposes a factor) ... float compressionThresholdPercentage = (float)compressor.compressionThresholdFactor() * 100; return new CompressionConfig(compressor.type(), compressor.level(), compressionThresholdPercentage, compressor.compressMinSizeBytes()); }
/** Set the config to the compressor used to compress data of this type */ public void setCompressionConfig(CompressionConfig config) { CompressionType type = config.type; compressor = new Compressor(type, config.compressionLevel, config.thresholdFactor(), (int)config.minsize); }
/** * Creates a new document type. * The document type id will be generated as a hash from the document type name. * * @param name The name of the new document type * @param search check for type ID collisions in this search definition */ @SuppressWarnings("deprecation") public SDDocumentType(String name, Search search) { docType = new DocumentType(name); docType.contentStruct().setCompressionConfig(new CompressionConfig()); docType.getBodyType().setCompressionConfig(new CompressionConfig()); validateId(search); inherit(VESPA_DOCUMENT); }
private static CompressionConfig makeCompressionConfig(DocumentmanagerConfig.Datatype.Structtype cfg) { return new CompressionConfig(toCompressorType(cfg.compresstype()), cfg.compresslevel(), cfg.compressthreshold(), cfg.compressminsize()); }
final public void compression(SDDocumentType document, String name) throws ParseException {CompressionConfig cfg = new CompressionConfig(CompressionType.LZ4); jj_consume_token(COMPRESSION); lbrace();
jj_consume_token(COLON); jj_consume_token(LZ4); cfg = new CompressionConfig(CompressionType.LZ4, cfg.compressionLevel, cfg.threshold); break;