@Test public void tableNameNotLoggableByDefault() { assertThat(BASE_DEFINITION.toTableMetadata().getNameLogSafety()).isEqualTo(LogSafety.UNSAFE); }
public TableMetadata toTableMetadata() { com.palantir.logsafe.Preconditions.checkState(!rowNameComponents.isEmpty(), "No row name components defined."); if (explicitCompressionRequested && explicitCompressionBlockSizeKb == 0) { if (rangeScanAllowed) { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_WITH_RANGESCANS_COMPRESSION_BLOCK_SIZE_KB; } else { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_COMPRESSION_BLOCK_SIZE_KB; } } return TableMetadata.builder() .rowMetadata(NameMetadataDescription.create(rowNameComponents, numberOfComponentsHashed)) .columns(getColumnMetadataDescription()) .conflictHandler(conflictHandler) .cachePriority(cachePriority) .rangeScanAllowed(rangeScanAllowed) .explicitCompressionBlockSizeKB(explicitCompressionBlockSizeKb) .negativeLookups(negativeLookups) .sweepStrategy(sweepStrategy) .appendHeavyAndReadLight(appendHeavyAndReadLight) .nameLogSafety(tableNameSafety) .build(); }
TableDefinition extends AbstractDefinition { public TableMetadata toTableMetadata() { com.palantir.logsafe.Preconditions.checkState(!rowNameComponents.isEmpty(), "No row name components defined."); if (explicitCompressionRequested && explicitCompressionBlockSizeKb == 0) { if (rangeScanAllowed) { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_WITH_RANGESCANS_COMPRESSION_BLOCK_SIZE_KB; } else { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_COMPRESSION_BLOCK_SIZE_KB; } } return TableMetadata.builder() .rowMetadata(NameMetadataDescription.create(rowNameComponents, numberOfComponentsHashed)) .columns(getColumnMetadataDescription()) .conflictHandler(conflictHandler) .cachePriority(cachePriority) .rangeScanAllowed(rangeScanAllowed) .explicitCompressionBlockSizeKB(explicitCompressionBlockSizeKb) .negativeLookups(negativeLookups) .sweepStrategy(sweepStrategy) .appendHeavyAndReadLight(appendHeavyAndReadLight) .nameLogSafety(tableNameSafety) .build(); } }
TableDefinition extends AbstractDefinition { public TableMetadata toTableMetadata() { com.palantir.logsafe.Preconditions.checkState(!rowNameComponents.isEmpty(), "No row name components defined."); if (explicitCompressionRequested && explicitCompressionBlockSizeKb == 0) { if (rangeScanAllowed) { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_WITH_RANGESCANS_COMPRESSION_BLOCK_SIZE_KB; } else { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_COMPRESSION_BLOCK_SIZE_KB; } } return TableMetadata.builder() .rowMetadata(NameMetadataDescription.create(rowNameComponents, numberOfComponentsHashed)) .columns(getColumnMetadataDescription()) .conflictHandler(conflictHandler) .cachePriority(cachePriority) .rangeScanAllowed(rangeScanAllowed) .explicitCompressionBlockSizeKB(explicitCompressionBlockSizeKb) .negativeLookups(negativeLookups) .sweepStrategy(sweepStrategy) .appendHeavyAndReadLight(appendHeavyAndReadLight) .nameLogSafety(tableNameSafety) .build(); }  }
TableDefinition extends AbstractDefinition { public TableMetadata toTableMetadata() { com.palantir.logsafe.Preconditions.checkState(!rowNameComponents.isEmpty(), "No row name components defined."); if (explicitCompressionRequested && explicitCompressionBlockSizeKb == 0) { if (rangeScanAllowed) { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_WITH_RANGESCANS_COMPRESSION_BLOCK_SIZE_KB; } else { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_COMPRESSION_BLOCK_SIZE_KB; } } return TableMetadata.builder() .rowMetadata(NameMetadataDescription.create(rowNameComponents, numberOfComponentsHashed)) .columns(getColumnMetadataDescription()) .conflictHandler(conflictHandler) .cachePriority(cachePriority) .rangeScanAllowed(rangeScanAllowed) .explicitCompressionBlockSizeKB(explicitCompressionBlockSizeKb) .negativeLookups(negativeLookups) .sweepStrategy(sweepStrategy) .appendHeavyAndReadLight(appendHeavyAndReadLight) .nameLogSafety(tableNameSafety) .build(); }  void rowName(); void columns(); void dynamicColumns(); void constraints(); void tableNameLogSafety(LogSafety logSafety); void namedComponentsSafeByDefault(); void allSafeForLoggingByDefault(); void column(String columnName, String shortName, Class<?> protoOrPersistable); void column(String columnName, String shortName, Class<?> protoOrPersistable, Compression compression); void column(
            String columnName,
            String shortName,
            Class<?> protoOrPersistable,
            Compression compression,
            LogSafety columnNameLoggable); void column(String columnName, String shortName, ValueType valueType); void column(String columnName, String shortName, ValueType valueType, LogSafety columnNameLoggable); void noColumns(); void hashFirstRowComponent(); void hashFirstNRowComponents(int numberOfComponents); int getNumberOfComponentsHashed(); void rowComponent(String componentName, ValueType valueType); void rowComponent(String componentName, ValueType valueType, ValueByteOrder valueByteOrder); void rowComponent(String componentName, ValueType valueType, LogSafety rowNameLoggable); void rowComponent(
            String componentName, ValueType valueType, ValueByteOrder valueByteOrder, LogSafety rowNameLoggable); void partition(RowNamePartitioner... partitioners); ExplicitRowNamePartitioner explicit(String... componentValues); ExplicitRowNamePartitioner explicit(long... componentValues); UniformRowNamePartitioner uniform(); void columnComponent(String componentName, ValueType valueType); void columnComponent(String componentName, ValueType valueType, ValueByteOrder valueByteOrder); void value(Class<?> protoOrPersistable); void value(Class<?> protoOrPersistable, Compression compression); void value(ValueType valueType); void tableConstraint(TableConstraint constraint); void rowConstraint(RowConstraintMetadata constraint); void foreignKeyConstraint(ForeignKeyConstraintMetadata constraint); void maxValueSize(int size); int getMaxValueSize(); void genericTableName(String name); String getGenericTableName(); void javaTableName(String name); String getJavaTableName(); boolean hasV2TableEnabled(); @Beta void enableV2Table(); void validate(); TableMetadata toTableMetadata(); ConstraintMetadata getConstraintMetadata(); }
TableDefinition extends AbstractDefinition { public TableMetadata toTableMetadata() { com.palantir.logsafe.Preconditions.checkState(!rowNameComponents.isEmpty(), "No row name components defined."); if (explicitCompressionRequested && explicitCompressionBlockSizeKb == 0) { if (rangeScanAllowed) { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_WITH_RANGESCANS_COMPRESSION_BLOCK_SIZE_KB; } else { explicitCompressionBlockSizeKb = AtlasDbConstants.DEFAULT_TABLE_COMPRESSION_BLOCK_SIZE_KB; } } return TableMetadata.builder() .rowMetadata(NameMetadataDescription.create(rowNameComponents, numberOfComponentsHashed)) .columns(getColumnMetadataDescription()) .conflictHandler(conflictHandler) .cachePriority(cachePriority) .rangeScanAllowed(rangeScanAllowed) .explicitCompressionBlockSizeKB(explicitCompressionBlockSizeKb) .negativeLookups(negativeLookups) .sweepStrategy(sweepStrategy) .appendHeavyAndReadLight(appendHeavyAndReadLight) .nameLogSafety(tableNameSafety) .build(); }  void rowName(); void columns(); void dynamicColumns(); void constraints(); void tableNameLogSafety(LogSafety logSafety); void namedComponentsSafeByDefault(); void allSafeForLoggingByDefault(); void column(String columnName, String shortName, Class<?> protoOrPersistable); void column(String columnName, String shortName, Class<?> protoOrPersistable, Compression compression); void column(
            String columnName,
            String shortName,
            Class<?> protoOrPersistable,
            Compression compression,
            LogSafety columnNameLoggable); void column(String columnName, String shortName, ValueType valueType); void column(String columnName, String shortName, ValueType valueType, LogSafety columnNameLoggable); void noColumns(); void hashFirstRowComponent(); void hashFirstNRowComponents(int numberOfComponents); int getNumberOfComponentsHashed(); void rowComponent(String componentName, ValueType valueType); void rowComponent(String componentName, ValueType valueType, ValueByteOrder valueByteOrder); void rowComponent(String componentName, ValueType valueType, LogSafety rowNameLoggable); void rowComponent(
            String componentName, ValueType valueType, ValueByteOrder valueByteOrder, LogSafety rowNameLoggable); void partition(RowNamePartitioner... partitioners); ExplicitRowNamePartitioner explicit(String... componentValues); ExplicitRowNamePartitioner explicit(long... componentValues); UniformRowNamePartitioner uniform(); void columnComponent(String componentName, ValueType valueType); void columnComponent(String componentName, ValueType valueType, ValueByteOrder valueByteOrder); void value(Class<?> protoOrPersistable); void value(Class<?> protoOrPersistable, Compression compression); void value(ValueType valueType); void tableConstraint(TableConstraint constraint); void rowConstraint(RowConstraintMetadata constraint); void foreignKeyConstraint(ForeignKeyConstraintMetadata constraint); void maxValueSize(int size); int getMaxValueSize(); void genericTableName(String name); String getGenericTableName(); void javaTableName(String name); String getJavaTableName(); boolean hasV2TableEnabled(); @Beta void enableV2Table(); void validate(); TableMetadata toTableMetadata(); ConstraintMetadata getConstraintMetadata();  }