You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Esteban Gutierrez (JIRA)" <ji...@apache.org> on 2012/06/22 23:43:43 UTC
[jira] [Commented] (HBASE-6262) Row Count hangs due to printing raw
without filtering for control codes/non-displayable characters
[ https://issues.apache.org/jira/browse/HBASE-6262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399632#comment-13399632 ]
Esteban Gutierrez commented on HBASE-6262:
------------------------------------------
I think the fix is basically this in hbase/table.rb
{code}
def _count_internal(interval = 1000, caching_rows = 10)
...
yield(count, org.apache.hadoop.hbase.util.Bytes::toStringBinary(row.getRow)
...
{code}
> Row Count hangs due to printing raw without filtering for control codes/non-displayable characters
> --------------------------------------------------------------------------------------------------
>
> Key: HBASE-6262
> URL: https://issues.apache.org/jira/browse/HBASE-6262
> Project: HBase
> Issue Type: Bug
> Components: shell
> Reporter: Kevin Odell
> Attachments: hbase-shell.log
>
>
> The problem is the key is printed raw without filtering for control codes/non-displayable characters. Consequently, row 264000's row key includes the data <ESC>P (hex: 1B 50) which initiates a VT100/ANSI DCS sequence, which normally must be terminated by a DCS string terminator code, <ESC>\ (hex: 1B 5C) (cf.
> At row 264000, <ESC>P appears, but is not followed by the <ESC>\ termination code -- so instead of data being output to the display, it is getting buffered by the terminal to complete the DCS command. Result: the data is not displayed (xterminal) or the terminal locks up (gnome-terminal).
> Note that this is a potential for abusing this "feature" to hide/alter information displayed on the screen, since an arbitrary terminal control codes could potentially be constructed and injected into a rowkey.
> If you open a VT100-emulating terminal window can cat the attached file, as-is, it would hang after displaying the starting portion of the line for row 264000.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira