hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars George <lars.geo...@gmail.com>
Subject Thrift DemoClient Fails
Date Tue, 24 May 2011 09:50:53 GMT
Hi,

I am running the PHP DemoClient and it is supposed to bail out on an
invalid UTF-8 string, but that now passes and triggers the Jedi "You
should not be here!" waving.

The string is

#
# Test UTF-8 handling
#
$invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1";
$valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB";

and the code

# non-utf8 is not allowed in row names
try {
  $mutations = array(
    new Mutation( array(
      'column' => 'entry:foo',
      'value' => $invalid
    ) ),
  );
  $client->mutateRow( $t, $invalid, $mutations );
  throw new Exception( "shouldn't get here!" );
} catch ( IOError $e ) {
  echo( "expected error: {$e->message}\n" );
}

Looking at the shell I see:

hbase(main):006:0> scan 'demo_table'
ROW                                     COLUMN+CELL
                                        column=entry:,
timestamp=1306229854784, value=
 foo                                    column=entry:foo,
timestamp=1306229854782, value=foo-\xFC\xA1\xA1\xA1\xA1\xA1
 foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\x column=entry:foo,
timestamp=1306229854787,
value=foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB
 BC\xE3\x83\xAB
 foo-\xFC\xA1\xA1\xA1\xA1\xA1           column=entry:foo,
timestamp=1306229854789, value=foo-\xFC\xA1\xA1\xA1\xA1\xA1
4 row(s) in 0.0430 seconds

So it happily created the row key. Did we "fix" the allowed character handling?

Lars

Mime
View raw message