private void persistBloomFilter() throws StoreException {
      try {
        CrcOutputStream crcStream = new CrcOutputStream(new FileOutputStream(bloomFile));
        DataOutputStream stream = new DataOutputStream(crcStream);
        FilterFactory.serialize(bloomFilter, stream);
        long crcValue = crcStream.getValue();
        stream.writeLong(crcValue);
        stream.close();
        if (config.storeSetFilePermissionEnabled) {
          Files.setPosixFilePermissions(bloomFile.toPath(), config.storeDataFilePermission);
        }
      } catch (IOException e) {
        metrics.bloomPersistFailureCount.inc();
        StoreErrorCodes errorCode = StoreException.resolveErrorCode(e);
        throw new StoreException(errorCode.toString() + " while trying to persist bloom filter", e, errorCode);
      }
    }
Persist the bloom filter.
@throws StoreException
ambry-store/src/main/java/com/github/ambry/store/IndexSegment.java