public static CompactionInfoStruct compactionInfoToStruct(CompactionInfo ci) {
    if (ci == null) {
      return null;
    }
    CompactionInfoStruct cr = new CompactionInfoStruct(ci.id, ci.dbname, ci.tableName, ci.type);
    cr.setPartitionname(ci.partName);
    cr.setRunas(ci.runAs);
    cr.setProperties(ci.properties);
    cr.setToomanyaborts(ci.tooManyAborts);
    cr.setHasoldabort(ci.hasOldAbort);
    cr.setStart(ci.start);
    cr.setState(Character.toString(ci.state));
    cr.setType(ci.type);
    cr.setWorkerId(ci.workerId);
    cr.setHighestWriteId(ci.highestWriteId);
    cr.setErrorMessage(ci.errorMessage);
    cr.setEnqueueTime(ci.enqueueTime);
    cr.setRetryRetention(ci.retryRetention);
    cr.setPoolname(ci.poolName);
    cr.setNumberOfBuckets(ci.numberOfBuckets);
    cr.setOrderByClause(ci.orderByClause);
    return cr;
  }
loads object from a row in Select * from COMPACTION_QUEUE
@param rs ResultSet after call to rs.next()
@throws SQLException
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/entities/CompactionInfo.java