Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public void initializeSchema() throws SQLException {
*/
private void createContainerHistoryTable() {
dslContext.createTableIfNotExists(CONTAINER_HISTORY_TABLE_NAME)
.column(CONTAINER_ID, SQLDataType.BIGINT)
.column("datanode_host", SQLDataType.VARCHAR(1024))
.column(CONTAINER_ID, SQLDataType.BIGINT.nullable(false))
.column("datanode_host", SQLDataType.VARCHAR(766).nullable(false))
.column("first_report_timestamp", SQLDataType.BIGINT)
.column("last_report_timestamp", SQLDataType.BIGINT)
.constraint(DSL.constraint("pk_container_id_datanode_host")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void initializeSchema() throws SQLException {
*/
private void createReconTaskStatusTable(Connection conn) {
DSL.using(conn).createTableIfNotExists(RECON_TASK_STATUS_TABLE_NAME)
.column("task_name", SQLDataType.VARCHAR(1024))
.column("task_name", SQLDataType.VARCHAR(768).nullable(false))
.column("last_updated_timestamp", SQLDataType.BIGINT)
.column("last_updated_seq_number", SQLDataType.BIGINT)
.constraint(DSL.constraint("pk_task_name")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void initializeSchema() throws SQLException {
*/
private void createGlobalStatsTable() {
dslContext.createTableIfNotExists(GLOBAL_STATS_TABLE_NAME)
.column("key", SQLDataType.VARCHAR(255))
.column("key", SQLDataType.VARCHAR(255).nullable(false))
.column("value", SQLDataType.BIGINT)
.column("last_updated_timestamp", SQLDataType.TIMESTAMP)
.constraint(DSL.constraint("pk_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public void initializeSchema() throws SQLException {

private void createClusterGrowthTable() {
dslContext.createTableIfNotExists(CLUSTER_GROWTH_DAILY_TABLE_NAME)
.column("timestamp", SQLDataType.TIMESTAMP)
.column("datanode_id", SQLDataType.INTEGER)
.column("timestamp", SQLDataType.TIMESTAMP.nullable(false))
.column("datanode_id", SQLDataType.INTEGER.nullable(false))
.column("datanode_host", SQLDataType.VARCHAR(1024))
.column("rack_id", SQLDataType.VARCHAR(1024))
.column("available_size", SQLDataType.BIGINT)
Expand All @@ -87,9 +87,9 @@ private void createClusterGrowthTable() {

private void createFileSizeCountTable() {
dslContext.createTableIfNotExists(FILE_COUNT_BY_SIZE_TABLE_NAME)
.column("volume", SQLDataType.VARCHAR(64))
.column("bucket", SQLDataType.VARCHAR(64))
.column("file_size", SQLDataType.BIGINT)
.column("volume", SQLDataType.VARCHAR(64).nullable(false))
.column("bucket", SQLDataType.VARCHAR(64).nullable(false))
.column("file_size", SQLDataType.BIGINT.nullable(false))
.column("count", SQLDataType.BIGINT)
.constraint(DSL.constraint("pk_volume_bucket_file_size")
.primaryKey("volume", "bucket", "file_size"))
Expand Down