public static StoreFileWriter createWriter(Configuration conf, FileSystem fs,
    ColumnFamilyDescriptor family, Path path, long maxKeyCount, Compression.Algorithm compression,
    CacheConfig cacheConfig, Encryption.Context cryptoContext, ChecksumType checksumType,
    int bytesPerChecksum, int blocksize, BloomType bloomType, boolean isCompaction,
    Consumer<Path> writerCreationTracker) throws IOException {
    if (compression == null) {
      compression = HFile.DEFAULT_COMPRESSION_ALGORITHM;
    }
    final CacheConfig writerCacheConf;
    if (isCompaction) {
      writerCacheConf = new CacheConfig(cacheConfig);
      writerCacheConf.setCacheDataOnWrite(false);
    } else {
      writerCacheConf = cacheConfig;
    }
    HFileContext hFileContext = new HFileContextBuilder().withCompression(compression)
      .withIncludesMvcc(true).withIncludesTags(true).withCompressTags(family.isCompressTags())
      .withChecksumType(checksumType).withBytesPerCheckSum(bytesPerChecksum)
      .withBlockSize(blocksize).withHBaseCheckSum(true)
      .withDataBlockEncoding(family.getDataBlockEncoding()).withEncryptionContext(cryptoContext)
      .withCreateTime(EnvironmentEdgeManager.currentTime()).build();

    StoreFileWriter w = new StoreFileWriter.Builder(conf, writerCacheConf, fs).withFilePath(path)
      .withBloomType(bloomType).withMaxKeyCount(maxKeyCount).withFileContext(hFileContext)
      .withWriterCreationTracker(writerCreationTracker).build();
    return w;
  }
Creates a writer for the mob file in temp directory.
@param conf                  The current configuration.
@param fs                    The current file system.
@param family                The descriptor of the current column family.
@param path                  The path for a temp directory.
@param maxKeyCount           The key count.
@param compression           The compression algorithm.
@param cacheConfig           The current cache config.
@param cryptoContext         The encryption context.
@param checksumType          The checksum type.
@param bytesPerChecksum      The bytes per checksum.
@param blocksize             The HFile block size.
@param bloomType             The bloom filter type.
@param isCompaction          If the writer is used in compaction.
@param writerCreationTracker to track the current writer in the store
@return The writer for the mob file.
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java