当前位置: 首页>>代码示例>>Java>>正文


Java HFile.DEFAULT_COMPRESSION_ALGORITHM属性代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.io.hfile.HFile.DEFAULT_COMPRESSION_ALGORITHM属性的典型用法代码示例。如果您正苦于以下问题:Java HFile.DEFAULT_COMPRESSION_ALGORITHM属性的具体用法?Java HFile.DEFAULT_COMPRESSION_ALGORITHM怎么用?Java HFile.DEFAULT_COMPRESSION_ALGORITHM使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.hadoop.hbase.io.hfile.HFile的用法示例。


在下文中一共展示了HFile.DEFAULT_COMPRESSION_ALGORITHM属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFileContext

private HFileContext createFileContext(Compression.Algorithm compression,
                                       boolean includeMVCCReadpoint, boolean includesTag, Encryption.Context cryptoContext) {
    if (compression == null) {
        compression = HFile.DEFAULT_COMPRESSION_ALGORITHM;
    }
    HFileContext hFileContext = new HFileContextBuilder()
            .withIncludesMvcc(includeMVCCReadpoint)
            .withIncludesTags(includesTag)
            .withCompression(compression)
            .withCompressTags(family.isCompressTags())
            .withChecksumType(checksumType)
            .withBytesPerCheckSum(bytesPerChecksum)
            .withBlockSize(blocksize)
            .withHBaseCheckSum(true)
            .withDataBlockEncoding(family.getDataBlockEncoding())
            .withEncryptionContext(cryptoContext)
            .build();
    return hFileContext;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:19,代码来源:HStore.java

示例2: createFileContext

private HFileContext createFileContext(Compression.Algorithm compression,
    boolean includeMVCCReadpoint, boolean includesTag, Encryption.Context cryptoContext) {
  if (compression == null) {
    compression = HFile.DEFAULT_COMPRESSION_ALGORITHM;
  }
  HFileContext hFileContext = new HFileContextBuilder()
                              .withIncludesMvcc(includeMVCCReadpoint)
                              .withIncludesTags(includesTag)
                              .withCompression(compression)
                              .withCompressTags(family.shouldCompressTags())
                              .withChecksumType(checksumType)
                              .withBytesPerCheckSum(bytesPerChecksum)
                              .withBlockSize(blocksize)
                              .withHBaseCheckSum(true)
                              .withDataBlockEncoding(family.getDataBlockEncoding())
                              .withEncryptionContext(cryptoContext)
                              .build();
  return hFileContext;
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:19,代码来源:HStore.java

示例3: createFileContext

private HFileContext createFileContext(Compression.Algorithm compression,
    boolean includeMVCCReadpoint, boolean includesTag, Encryption.Context cryptoContext) {
  if (compression == null) {
    compression = HFile.DEFAULT_COMPRESSION_ALGORITHM;
  }
  HFileContext hFileContext = new HFileContextBuilder().withIncludesMvcc(includeMVCCReadpoint)
      .withIncludesTags(includesTag).withCompression(compression)
      .withCompressTags(family.isCompressTags()).withChecksumType(checksumType)
      .withBytesPerCheckSum(bytesPerChecksum).withBlockSize(blocksize).withHBaseCheckSum(true)
      .withDataBlockEncoding(family.getDataBlockEncoding()).withEncryptionContext(cryptoContext)
      .withCreateTime(EnvironmentEdgeManager.currentTime()).build();
  return hFileContext;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:13,代码来源:HStore.java

示例4: build

/**
 * Create a store file writer. Client is responsible for closing file when done. If metadata,
 * add BEFORE closing using {@link Writer#appendMetadata}.
 */
public Writer build() throws IOException {
  if ((dir == null ? 0 : 1) + (filePath == null ? 0 : 1) != 1) {
    throw new IllegalArgumentException("Either specify parent directory " + "or file path");
  }

  if (dir == null) {
    dir = filePath.getParent();
  }

  if (!fs.exists(dir)) {
    HBaseFileSystem.makeDirOnFileSystem(fs, dir);
  }

  if (filePath == null) {
    filePath = getUniqueFile(fs, dir);
    if (!BloomFilterFactory.isGeneralBloomEnabled(conf)) {
      bloomType = BloomType.NONE;
    }
  }

  if (compressAlgo == null) {
    compressAlgo = HFile.DEFAULT_COMPRESSION_ALGORITHM;
  }
  if (comparator == null) {
    comparator = KeyValue.COMPARATOR;
  }
  return new Writer(fs, filePath, blockSize, compressAlgo, dataBlockEncoder, conf, cacheConf,
      comparator, bloomType, maxKeyCount, checksumType, bytesPerChecksum, includeMVCCReadpoint);
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:33,代码来源:StoreFile.java


注:本文中的org.apache.hadoop.hbase.io.hfile.HFile.DEFAULT_COMPRESSION_ALGORITHM属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。