Yup. You need to set your 'hbase.regionserver.class' and 'hbase.regionserver.impl' accordingly with thte Indexed types.
/john On 14/05/09 9:15 AM, "Sasha Dolgy" <[email protected]> wrote: ah, see this is what i was seeing. i look in the tables and they are empty...cheers for the hint, i'll go look for the IndexedRegionServer -sd On Thu, May 14, 2009 at 12:13 AM, Clint Morgan <[email protected]>wrote: > One thing to be sure is that you are starting up the IndexedRegionServer. > See the package.html java doc in the client.tableindexed. This is what does > the maintenance of the index tables. > > You can see if anything got in the indexes by doing a normal scan of the > index table (EG scan 'foo-ip') > > -clint > > On Wed, May 13, 2009 at 4:06 PM, Sasha Dolgy <[email protected]> wrote: > > > Hi John, > > > > tableName is the name of the table the indexes were created from - foo > > ip is the index ... > > > > HTableDescriptor desc = new HTableDescriptor(tableName); > > IndexedTable table = new IndexedTable(getConfig(), desc.getName()); > > Scanner scanner = > table.getIndexedScanner("ip",HConstants.EMPTY_START_ROW, > > null, null, null); > > > > Basically, following some other threads I went to see how it all works by > > looking at the TestIndexedTable test case and implemented it pretty much > as > > is. > > > > -sd > > > > On Thu, May 14, 2009 at 12:02 AM, John Ellis (MELBOURNE-AU) < > > [email protected]> wrote: > > > > > Hi - > > > > > > This is kinda silly, but you are using > > IndexedTable.getIndexedScanner(...)? > > > > > > /john > > > > > > > > > On 14/05/09 8:51 AM, "Sasha Dolgy" <[email protected]> wrote: > > > > > > Hi there, > > > > > > I have the following table created, with indexes. > > > > > > {NAME => 'foo', IS_ROOT => 'false', IS_META => 'false', FAMILIES => > > [{NAME > > > => 'entry', BLOOMFILTER => 'false', > > > COMPRESSION => 'NONE', VERSIONS => '3', LENGTH => '2147483647', TTL => > > > '-1', > > > IN_MEMORY => 'false', BLOCKCACHE > > > => 'false'}], INDEXES => [ID => hostname, ID => msg, ID => char_count, > ID > > > => > > > ip]} > > > > > > Now this in turn will create new 'tables' in HBase: > > > > > > hbase(main):033:0> list > > > foo-char_count > > > foo-hostname > > > foo-msg > > > foo-ip > > > > > > hbase(main):037:0> describe 'foo-ip' > > > {NAME => 'foo-ip', IS_ROOT => 'false', IS_META => 'false', FAMILIES => > > > [{NAME => 'entry', BLOOMFILTER => 'false > > > ', COMPRESSION => 'NONE', VERSIONS => '3', LENGTH => '2147483647', TTL > => > > > '-1', IN_MEMORY => 'false', BLOCKCAC > > > HE => 'false'}, {NAME => '__INDEX__', BLOOMFILTER => 'false', > COMPRESSION > > > => > > > 'NONE', VERSIONS => '3', LENGTH = > > > > '2147483647', TTL => '-1', IN_MEMORY => 'false', BLOCKCACHE => > > 'false'}], > > > INDEXES => []} > > > > > > > > > Great. So this works so far. I then insert a few thousand rows into > the > > > 'foo' table and then run a normal scan: > > > > > > Scanner search = hbaseTableName.getScanner(searchString, "", > > > Long.MAX_VALUE, > > > filter); > > > ... > > > > > > This works fine, but when I try an indexed scan i receive back no > > results. > > > > > > Does another process need to encourage the indexes to function? > > > > > > Thanks in advance, and apologies if this is something simple...big > > learning > > > curve > > > -sd > > > > > > -- > > > Sasha Dolgy > > > [email protected] > > > > > > -- Sasha Dolgy [email protected]
