[
https://issues.apache.org/jira/browse/HBASE-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lars George updated HBASE-1766:
-------------------------------
Attachment: HBASE-1766.patch
Patch extends main() to have those options:
{code}
$ /usr/local/hbase/bin/hbase org.apache.hadoop.hbase.io.hfile.HFile
usage: HFile [-f <arg>] [-v] [-r <arg>] [-a] [-p] [-m] [-k]
-a,--checkfamily enable family check
-f,--file <arg> file to scan
-k,--checkkey enable key order check
-m,--printmeta print meta data of file
-p,--printkv print key/value pairs
-r,--region <arg> region to scan
-v,--verbose verbose output
{code}
It allows to scan all files of a region in one fell swoop. Also reports various
issues if requested. For example if keys (rows) are out of order and also if
column families are mismatching.
Example:
{code}
$ /usr/local/hbase/bin/hbase org.apache.hadoop.hbase.io.hfile.HFile -r
"storedata,10ee02a22b05dfd,1247877829376" -a -k
Number of region files found -> 160
Start scan of files...
WARNING, filename does not match kv family,
filename ->
hdfs://foo.bar.net:9000/hbase/storedata/1872850629/assoc/6750107734870830278
keyvalue ->
\x00\x0F10ee02b27f9426a\x06origin9222130889769974505_cm_default\x00\x00\x01\x22\xA1\x8B\xBCQ\x04
WARNING, previous kv has different family compared to current key
filename ->
hdfs://foo.bar.net:9000/hbase/storedata/1872850629/assoc/6750107734870830278
previous ->
\x00\x0F10ee02b26ac93e7\x05assoc9222124272300324701_bz\x00\x00\x01\x22\xD5\x1E6\xAA\x04
current ->
\x00\x0F10ee02b27f9426a\x06origin9222130889769974505_cm_default\x00\x00\x01\x22\xA1\x8B\xBCQ\x04
WARNING, previous kv has different family compared to current key
filename ->
hdfs://foo.bar.net:9000/hbase/storedata/1872850629/assoc/6750107734870830278
previous ->
\x00\x0F10ee02b27f9426a\x06origin9222130889769974505_cm_default\x00\x00\x01\x22\xA1\x8B\xBCQ\x04
current ->
\x00\x0F10ee02b296d017f\x05assoc9222130848644929908_na\x00\x00\x01\x22l\x22X\x90\x04
WARNING, filename does not match kv family,
filename ->
hdfs://foo.bar.collective-media.net:9000/hbase/storedata/1872850629/network/2478457462667232065
keyvalue ->
\x00\x0F10ee02b27f9426a\x06origin9222130889769974505_cm_default\x00\x00\x01\x22\xA1\x8B\xBCQ\x04
Done.
{code}
> Add advanced features to HFile.main() to be able to analyze storefile problems
> ------------------------------------------------------------------------------
>
> Key: HBASE-1766
> URL: https://issues.apache.org/jira/browse/HBASE-1766
> Project: Hadoop HBase
> Issue Type: Improvement
> Components: io
> Reporter: Lars George
> Assignee: Lars George
> Priority: Minor
> Fix For: 0.20.1
>
> Attachments: HBASE-1766.patch
>
>
> I have various regions that report the following error:
> ERROR org.apache.hadoop.hbase.regionserver.CompactSplitThread: Compaction
> failed for region storedata,10edd32a3fa217e,1247877829376
> java.lang.RuntimeException: ScanWildcardColumnTracker.checkColumn ran into a
> column actually smaller than the previous column!
> at
> org.apache.hadoop.hbase.regionserver.ScanWildcardColumnTracker.checkColumn(ScanWildcardColumnTracker.java:89)
> at
> org.apache.hadoop.hbase.regionserver.ScanQueryMatcher.match(ScanQueryMatcher.java:162)
> They are most likely remnants of HBASE-1715 and its linked issues?
> Add more features to HFile.main() to be able to figure the files that are
> broken (as the error above only reports the region) and how.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.