{"record":{"id":"aa4de559f0ca88f6","repo":"pinpoint-apm/pinpoint","slug":"table-name-must-not-be-empty","errorCode":null,"errorMessage":"Table name must not be empty","messagePattern":"Table name must not be empty","errorType":"validation","errorClass":"InvalidHbaseSchemaException","httpStatus":null,"severity":"error","filePath":"hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/reader/xml/mapper/TableChangeMapper.java","lineNumber":48,"sourceCode":"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\n\n/**\n * @author HyunGil Jeong\n */\npublic class TableChangeMapper {\n\n    ColumnFamilyChangeMapper columnFamilyChangeMapper = new ColumnFamilyChangeMapper();\n    TableConfigurationMapper tableConfigurationMapper = new TableConfigurationMapper();\n    SplitOptionMapper splitOptionMapper = new SplitOptionMapper();\n\n    public TableChange map(ChangeSet.ModifyTable modifyTable) {\n        String tableName = modifyTable.getName();\n        if (StringUtils.isEmpty(tableName)) {\n            throw new InvalidHbaseSchemaException(\"Table name must not be empty\");\n        }\n\n        List<ColumnFamilyChange> columnFamilyChanges = mapColumnFamilies(modifyTable.getCreateColumnFamily());\n\n        return new ModifyTableChange(tableName, TableConfiguration.EMPTY_CONFIGURATION, columnFamilyChanges);\n    }\n\n    public TableChange map(ChangeSet.CreateTable createTable) {\n        String tableName = createTable.getName();\n        if (StringUtils.isEmpty(tableName)) {\n            throw new InvalidHbaseSchemaException(\"Table name must not be empty\");\n        }\n\n        TableConfiguration tableConfiguration = tableConfigurationMapper.mapConfiguration(createTable.getConfiguration());\n        List<ColumnFamilyChange> columnFamilyChanges = mapColumnFamilies(createTable.getCreateColumnFamily());\n        CreateTableChange.SplitOption splitOption = splitOptionMapper.mapSplitOption(createTable.getSplit());\n\n        return new CreateTableChange(tableName, tableConfiguration, columnFamilyChanges, splitOption);","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/reader/xml/mapper/TableChangeMapper.java#L30-L66","documentation":"Thrown by TableChangeMapper.map(ChangeSet.ModifyTable) when a <modifyTable> changeSet has an empty or missing name attribute. A table name is mandatory to locate the table to alter in HBase. This is XML schema validation performed before any HBase call is made.","triggerScenarios":"Mapping a changeSet containing <modifyTable> with name=\"\" or no name attribute.","commonSituations":"Hand-editing schema XML and deleting the name attribute; a templating/build step that fails to substitute a table-name placeholder; typo in the attribute name (e.g. tableName instead of name).","solutions":["Set the name attribute on the <modifyTable> element to the exact HBase table name.","Check for unfilled placeholders in generated schema XML (e.g. ${table.name}).","Confirm the attribute is spelled name, matching the ChangeSet.ModifyTable binding."],"exampleFix":"<!-- before -->\n<modifyTable>\n  <createColumnFamily name=\"AgentInfo\"/>\n</modifyTable>\n<!-- after -->\n<modifyTable name=\"AgentInfo\">\n  <createColumnFamily name=\"AgentInfo\"/>\n</modifyTable>","handlingStrategy":"validation","validationCode":"if (modifyTable.getName() == null || modifyTable.getName().isBlank()) {\n    throw new IllegalArgumentException(\"modifyTable requires a name attribute\");\n}","typeGuard":null,"tryCatchPattern":"try { tableChangeMapper.map(modifyTable); } catch (InvalidHbaseSchemaException e) { log.error(\"Invalid <modifyTable>: {}\", e.getMessage()); }","preventionTips":["Always set name on modifyTable elements","Check generated XML for unresolved placeholders","Validate schema XML in CI"],"tags":["schema-validation","empty-value","hbase"],"backgroundTag":"empty-required-field","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}