Here it is (the simplest one): HColumnDescriptor fam = new HColumnDescriptor(familyName); fam.setCompressionType(Algorithm.SNAPPY); HTableDescriptor table = new HTableDescriptor(tableName); table.addFamily(fam); HBaseAdmin admin = new HBaseAdmin(HBaseConfiguration.create()); admin.createTable(table);
Best regards, Vladimir Rodionov Principal Platform Engineer Carrier IQ, www.carrieriq.com e-mail: vrodio...@carrieriq.com ________________________________________ From: Flavio Pompermaier [pomperma...@okkam.it] Sent: Tuesday, July 16, 2013 6:08 AM To: user@hbase.apache.org Subject: Programmatically create HTable with snappy-compressed columns Hi to all, I have to programmatically create HTable (from Java) with a compressed (snappy) column. Is it possible to do it from code or do I have to manually create them via hbase shell? If it is possible could someone show me a snippet? Best, Flavio Confidentiality Notice: The information contained in this message, including any attachments hereto, may be confidential and is intended to be read only by the individual or entity to whom this message is addressed. If the reader of this message is not the intended recipient or an agent or designee of the intended recipient, please note that any review, use, disclosure or distribution of this message or its attachments, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and/or notificati...@carrieriq.com and delete or destroy any copy of this message and its attachments.