[ https://issues.apache.org/jira/browse/HBASE-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450826#comment-13450826 ]
Jonathan Hsieh commented on HBASE-5631: --------------------------------------- For this: {code} + private Set<String> getColumnFamilyList(Set<String> columns, HbckInfo hbi) throws IOException { + Path regionDir = hbi.getHdfsRegionDir(); + FileSystem fs = regionDir.getFileSystem(conf); + FileStatus[] subDirs = fs.listStatus(regionDir); + for (FileStatus subdir : subDirs) { + String columnfamily = subdir.getPath().getName(); + if(subdir.isDir() && !columnfamily.startsWith(".")){ + columns.add(columnfamily); + } + } + return columns; + } + {code} Let's do this: {code} + private Set<String> getColumnFamilyList(Set<String> columns, HbckInfo hbi) throws IOException { + Path regionDir = hbi.getHdfsRegionDir(); + FileSystem fs = regionDir.getFileSystem(conf); // FileStatus[] subDirs = fs.listStatus(regionDir, new FamilyDirFilter()) + for (FileStatus subdir : subDirs) { + String columnfamily = subdir.getPath().getName(); // columns.add(columnfamily); + } + return columns; + } + {code} It is relatively new but it actually uses the exact bounds for valid column family names. > hbck should handle case where .tableinfo file is missing. > --------------------------------------------------------- > > Key: HBASE-5631 > URL: https://issues.apache.org/jira/browse/HBASE-5631 > Project: HBase > Issue Type: Improvement > Components: hbck > Affects Versions: 0.92.2, 0.94.0, 0.96.0 > Reporter: Jonathan Hsieh > Assignee: Jie Huang > Attachments: hbase-5631.patch, hbase-5631-v1.patch > > > 0.92+ branches have a .tableinfo file which could be missing from hdfs. hbck > should be able to detect and repair this properly. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira