@Test public void ttlIsPreservedInGcRule() { int ttl = 86400; descriptor.setTimeToLive(ttl); ColumnFamily result = adapter.adapt(descriptor); GCRules.GCRule expected = GCRULES.union().rule(GCRULES.maxAge(Duration.ofSeconds(ttl))).rule(GCRULES.maxVersions(1)); Assert.assertEquals(expected.toProto(), result.getGcRule()); }
public ColumnFamily adapt(HColumnDescriptor columnDescriptor) { throwIfRequestingUnknownFeatures(columnDescriptor); throwIfRequestingUnsupportedFeatures(columnDescriptor); ColumnFamily.Builder resultBuilder = ColumnFamily.newBuilder(); GCRule gcRule = buildGarbageCollectionRule(columnDescriptor); if (gcRule != null) { resultBuilder.setGcRule(gcRule.toProto()); } return resultBuilder.build(); }
ColumnDescriptorAdapter { public ColumnFamily adapt(HColumnDescriptor columnDescriptor) { throwIfRequestingUnknownFeatures(columnDescriptor); throwIfRequestingUnsupportedFeatures(columnDescriptor); ColumnFamily.Builder resultBuilder = ColumnFamily.newBuilder(); GCRule gcRule = buildGarbageCollectionRule(columnDescriptor); if (gcRule != null) { resultBuilder.setGcRule(gcRule.toProto()); } return resultBuilder.build(); } }
ColumnDescriptorAdapter { public ColumnFamily adapt(HColumnDescriptor columnDescriptor) { throwIfRequestingUnknownFeatures(columnDescriptor); throwIfRequestingUnsupportedFeatures(columnDescriptor); ColumnFamily.Builder resultBuilder = ColumnFamily.newBuilder(); GCRule gcRule = buildGarbageCollectionRule(columnDescriptor); if (gcRule != null) { resultBuilder.setGcRule(gcRule.toProto()); } return resultBuilder.build(); }  }
ColumnDescriptorAdapter { public ColumnFamily adapt(HColumnDescriptor columnDescriptor) { throwIfRequestingUnknownFeatures(columnDescriptor); throwIfRequestingUnsupportedFeatures(columnDescriptor); ColumnFamily.Builder resultBuilder = ColumnFamily.newBuilder(); GCRule gcRule = buildGarbageCollectionRule(columnDescriptor); if (gcRule != null) { resultBuilder.setGcRule(gcRule.toProto()); } return resultBuilder.build(); }  static List<String> getUnknownFeatures(HColumnDescriptor columnDescriptor); static Map<String, String> getUnsupportedFeatures(HColumnDescriptor columnDescriptor); static void throwIfRequestingUnknownFeatures(HColumnDescriptor columnDescriptor); static void throwIfRequestingUnsupportedFeatures(HColumnDescriptor columnDescriptor); static GCRule buildGarbageCollectionRule(HColumnDescriptor columnDescriptor); ColumnFamily adapt(HColumnDescriptor columnDescriptor); HColumnDescriptor adapt(
      com.google.cloud.bigtable.admin.v2.models.ColumnFamily columnFamily); }
ColumnDescriptorAdapter { public ColumnFamily adapt(HColumnDescriptor columnDescriptor) { throwIfRequestingUnknownFeatures(columnDescriptor); throwIfRequestingUnsupportedFeatures(columnDescriptor); ColumnFamily.Builder resultBuilder = ColumnFamily.newBuilder(); GCRule gcRule = buildGarbageCollectionRule(columnDescriptor); if (gcRule != null) { resultBuilder.setGcRule(gcRule.toProto()); } return resultBuilder.build(); }  static List<String> getUnknownFeatures(HColumnDescriptor columnDescriptor); static Map<String, String> getUnsupportedFeatures(HColumnDescriptor columnDescriptor); static void throwIfRequestingUnknownFeatures(HColumnDescriptor columnDescriptor); static void throwIfRequestingUnsupportedFeatures(HColumnDescriptor columnDescriptor); static GCRule buildGarbageCollectionRule(HColumnDescriptor columnDescriptor); ColumnFamily adapt(HColumnDescriptor columnDescriptor); HColumnDescriptor adapt(
      com.google.cloud.bigtable.admin.v2.models.ColumnFamily columnFamily); static final ColumnDescriptorAdapter INSTANCE; static final Set<String> SUPPORTED_OPTION_KEYS; static final Set<String> IGNORED_OPTION_KEYS; static final Map<String, String> SUPPORTED_OPTION_VALUES; }