Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Advice on setting default HBase table mapping attributes within Apache Gora


Copy link to this message
-
Advice on setting default HBase table mapping attributes within Apache Gora
Hi,

Currently in Gora, we support the following table attributes, which we
specify when mapping data into HBase;
compression, blockCache, blockSize, bloomFilter, maxVersions, timeToLive,
inMemory .
These expand to the following

 HColumnDescriptor columnDescriptor = getOrCreateFamily(familyName, families);

      if(compression != null)
        columnDescriptor.setCompressionType(Algorithm.valueOf(compression));
      if(blockCache != null)
        columnDescriptor.setBlockCacheEnabled(Boolean.parseBoolean(blockCache));
      if(blockSize != null)
        columnDescriptor.setBlocksize(Integer.parseInt(blockSize));
      if(bloomFilter != null)
        columnDescriptor.setBloomFilterType(BloomType.valueOf(bloomFilter));
      if(maxVersions != null)
        columnDescriptor.setMaxVersions(Integer.parseInt(maxVersions));
      if(timeToLive != null)
        columnDescriptor.setTimeToLive(Integer.parseInt(timeToLive));
      if(inMemory != null)
        columnDescriptor.setInMemory(Boolean.parseBoolean(inMemory));
    }

Within GORA-218[0], it is our intention to add default values for such
attributes and document a bit about them as well. Currently an example of
our hbase mapping file is here [1]. As you can see, the table block only
has the name attribute, the remaining ones below are missing.

Some guidance on setting these defaults and a brief explanation of what
they do would be very much appreciated.

Thank you very much in advance for anyone able to help us out on this one.

Lewis

[0] https://issues.apache.org/jira/browse/GORA-218
[1]
http://svn.apache.org/repos/asf/gora/trunk/gora-hbase/src/test/conf/gora-hbase-mapping.xml

--
*Lewis*