public static Unit getUnit(String key) { Unit unit; /* TTL for now, we can add more as we neeed */ if (key.equals(HColumnDescriptor.TTL)) { unit = Unit.TIME_INTERVAL; } else { unit = Unit.NONE; } return unit; }
public static Unit getUnit(String key) { /* TTL for now, we can add more as we need */ switch (key) { case TTL: return Unit.TIME_INTERVAL; default: return Unit.NONE; } }
public static Unit getUnit(String key) { return ColumnFamilyDescriptorBuilder.getUnit(key); }
/** * @param timeToLive Time-to-live of cell contents, in seconds. * @return this (for chained invocation) * @throws org.apache.hadoop.hbase.exceptions.HBaseException */ public ModifyableColumnFamilyDescriptor setTimeToLive(String timeToLive) throws HBaseException { return setTimeToLive(Integer.parseInt(PrettyPrinter.valueOf(timeToLive, Unit.TIME_INTERVAL))); }