class ConstantOccupancyWorkload extends CoreWorkload {
  private long disksize;
  private long storageages;
  private double occupancy;

  private long objectCount;

  public static final String STORAGE_AGE_PROPERTY = "storageages";
  public static final long STORAGE_AGE_PROPERTY_DEFAULT = 10;

  public static final String DISK_SIZE_PROPERTY = "disksize";
  public static final long DISK_SIZE_PROPERTY_DEFAULT = 100 * 1000 * 1000;

  public static final String OCCUPANCY_PROPERTY = "occupancy";
  public static final double OCCUPANCY_PROPERTY_DEFAULT = 0.9;

  @Override
  public void init(Properties p) throws WorkloadException {<FILL_FUNCTION_BODY>}

}

    disksize = Long.parseLong(p.getProperty(DISK_SIZE_PROPERTY, String.valueOf(DISK_SIZE_PROPERTY_DEFAULT)));
    storageages = Long.parseLong(p.getProperty(STORAGE_AGE_PROPERTY, String.valueOf(STORAGE_AGE_PROPERTY_DEFAULT)));
    occupancy = Double.parseDouble(p.getProperty(OCCUPANCY_PROPERTY, String.valueOf(OCCUPANCY_PROPERTY_DEFAULT)));

    if (p.getProperty(Client.RECORD_COUNT_PROPERTY) != null ||
        p.getProperty(Client.INSERT_COUNT_PROPERTY) != null ||
        p.getProperty(Client.OPERATION_COUNT_PROPERTY) != null) {
      System.err.println("Warning: record, insert or operation count was set prior to initting " +
          "ConstantOccupancyWorkload.  Overriding old values.");
    }
    NumberGenerator g = CoreWorkload.getFieldLengthGenerator(p);
    double fieldsize = g.mean();
    int fieldcount = Integer.parseInt(p.getProperty(FIELD_COUNT_PROPERTY, FIELD_COUNT_PROPERTY_DEFAULT));

    objectCount = (long) (occupancy * (disksize / (fieldsize * fieldcount)));
    if (objectCount == 0) {
      throw new IllegalStateException("Object count was zero.  Perhaps disksize is too low?");
    }
    p.setProperty(Client.RECORD_COUNT_PROPERTY, String.valueOf(objectCount));
    p.setProperty(Client.OPERATION_COUNT_PROPERTY, String.valueOf(storageages * objectCount));
    p.setProperty(Client.INSERT_COUNT_PROPERTY, String.valueOf(objectCount));

    super.init(p);
  
<methods>public non-sealed void <init>() ,public static java.lang.String buildKeyName(long, int, boolean) ,public boolean doInsert(site.ycsb.DB, java.lang.Object) ,public boolean doTransaction(site.ycsb.DB, java.lang.Object) ,public void doTransactionInsert(site.ycsb.DB) ,public void doTransactionRead(site.ycsb.DB) ,public void doTransactionReadModifyWrite(site.ycsb.DB) ,public void doTransactionScan(site.ycsb.DB) ,public void doTransactionUpdate(site.ycsb.DB) ,public void init(java.util.Properties) throws site.ycsb.WorkloadException<variables>public static final java.lang.String DATA_INTEGRITY_PROPERTY,public static final java.lang.String DATA_INTEGRITY_PROPERTY_DEFAULT,public static final java.lang.String FIELD_COUNT_PROPERTY,public static final java.lang.String FIELD_COUNT_PROPERTY_DEFAULT,public static final java.lang.String FIELD_LENGTH_DISTRIBUTION_PROPERTY,public static final java.lang.String FIELD_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT,public static final java.lang.String FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY,public static final java.lang.String FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY_DEFAULT,public static final java.lang.String FIELD_LENGTH_PROPERTY,public static final java.lang.String FIELD_LENGTH_PROPERTY_DEFAULT,public static final java.lang.String FIELD_NAME_PREFIX,public static final java.lang.String FIELD_NAME_PREFIX_DEFAULT,public static final java.lang.String HOTSPOT_DATA_FRACTION,public static final java.lang.String HOTSPOT_DATA_FRACTION_DEFAULT,public static final java.lang.String HOTSPOT_OPN_FRACTION,public static final java.lang.String HOTSPOT_OPN_FRACTION_DEFAULT,public static final java.lang.String INSERTION_RETRY_INTERVAL,public static final java.lang.String INSERTION_RETRY_INTERVAL_DEFAULT,public static final java.lang.String INSERTION_RETRY_LIMIT,public static final java.lang.String INSERTION_RETRY_LIMIT_DEFAULT,public static final java.lang.String INSERT_ORDER_PROPERTY,public static final java.lang.String INSERT_ORDER_PROPERTY_DEFAULT,public static final java.lang.String INSERT_PROPORTION_PROPERTY,public static final java.lang.String INSERT_PROPORTION_PROPERTY_DEFAULT,public static final java.lang.String MAX_SCAN_LENGTH_PROPERTY,public static final java.lang.String MAX_SCAN_LENGTH_PROPERTY_DEFAULT,public static final java.lang.String MIN_FIELD_LENGTH_PROPERTY,public static final java.lang.String MIN_FIELD_LENGTH_PROPERTY_DEFAULT,public static final java.lang.String MIN_SCAN_LENGTH_PROPERTY,public static final java.lang.String MIN_SCAN_LENGTH_PROPERTY_DEFAULT,public static final java.lang.String READMODIFYWRITE_PROPORTION_PROPERTY,public static final java.lang.String READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT,public static final java.lang.String READ_ALL_FIELDS_BY_NAME_PROPERTY,public static final java.lang.String READ_ALL_FIELDS_BY_NAME_PROPERTY_DEFAULT,public static final java.lang.String READ_ALL_FIELDS_PROPERTY,public static final java.lang.String READ_ALL_FIELDS_PROPERTY_DEFAULT,public static final java.lang.String READ_PROPORTION_PROPERTY,public static final java.lang.String READ_PROPORTION_PROPERTY_DEFAULT,public static final java.lang.String REQUEST_DISTRIBUTION_PROPERTY,public static final java.lang.String REQUEST_DISTRIBUTION_PROPERTY_DEFAULT,public static final java.lang.String SCAN_LENGTH_DISTRIBUTION_PROPERTY,public static final java.lang.String SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT,public static final java.lang.String SCAN_PROPORTION_PROPERTY,public static final java.lang.String SCAN_PROPORTION_PROPERTY_DEFAULT,public static final java.lang.String TABLENAME_PROPERTY,public static final java.lang.String TABLENAME_PROPERTY_DEFAULT,public static final java.lang.String UPDATE_PROPORTION_PROPERTY,public static final java.lang.String UPDATE_PROPORTION_PROPERTY_DEFAULT,public static final java.lang.String WRITE_ALL_FIELDS_PROPERTY,public static final java.lang.String WRITE_ALL_FIELDS_PROPERTY_DEFAULT,public static final java.lang.String ZERO_PADDING_PROPERTY,public static final java.lang.String ZERO_PADDING_PROPERTY_DEFAULT,private boolean dataintegrity,protected site.ycsb.generator.NumberGenerator fieldchooser,protected long fieldcount,protected site.ycsb.generator.NumberGenerator fieldlengthgenerator,private List<java.lang.String> fieldnames,protected int insertionRetryInterval,protected int insertionRetryLimit,protected site.ycsb.generator.NumberGenerator keychooser,protected site.ycsb.generator.NumberGenerator keysequence,private site.ycsb.measurements.Measurements measurements,protected site.ycsb.generator.DiscreteGenerator operationchooser,protected boolean orderedinserts,protected boolean readallfields,protected boolean readallfieldsbyname,protected long recordcount,protected site.ycsb.generator.NumberGenerator scanlength,protected java.lang.String table,protected site.ycsb.generator.AcknowledgedCounterGenerator transactioninsertkeysequence,protected boolean writeallfields,protected int zeropadding