Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE40518BFB for ; Mon, 1 Feb 2016 11:37:52 +0000 (UTC) Received: (qmail 83705 invoked by uid 500); 1 Feb 2016 11:37:40 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 83655 invoked by uid 500); 1 Feb 2016 11:37:40 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 83557 invoked by uid 99); 1 Feb 2016 11:37:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2016 11:37:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CBCA42C1F5B for ; Mon, 1 Feb 2016 11:37:39 +0000 (UTC) Date: Mon, 1 Feb 2016 11:37:39 +0000 (UTC) From: "Anoop Sam John (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-15198) RPC client not using Codec and CellBlock for puts by default MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-15198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anoop Sam John updated HBASE-15198: ----------------------------------- Affects Version/s: 0.98.0 > RPC client not using Codec and CellBlock for puts by default > ------------------------------------------------------------ > > Key: HBASE-15198 > URL: https://issues.apache.org/jira/browse/HBASE-15198 > Project: HBase > Issue Type: Bug > Affects Versions: 0.98.0 > Reporter: Anoop Sam John > Assignee: Anoop Sam John > Priority: Critical > Attachments: HBASE-15198.patch > > > For puts we use MultiServerCallable. Here to decide whether to use cellBlock we have > {code} > private boolean isCellBlock() { > // This is not exact -- the configuration could have changed on us after connection was set up > // but it will do for now. > HConnection connection = getConnection(); > if (connection == null) return true; // Default is to do cellblocks. > Configuration configuration = connection.getConfiguration(); > if (configuration == null) return true; > String codec = configuration.get(HConstants.RPC_CODEC_CONF_KEY, ""); > return codec != null && codec.length() > 0; > } > {code} > By default in hbase-default.xml, we dont have any Codec being specified. > Where as in AbstractRpcClient we have > {code} > Codec getCodec() { > // For NO CODEC, "hbase.client.rpc.codec" must be configured with empty string AND > // "hbase.client.default.rpc.codec" also -- because default is to do cell block encoding. > String className = conf.get(HConstants.RPC_CODEC_CONF_KEY, getDefaultCodec(this.conf)); > if (className == null || className.length() == 0) return null; > try { > return (Codec)Class.forName(className).newInstance(); > } catch (Exception e) { > throw new RuntimeException("Failed getting codec " + className, e); > } > } > ..... > public static String getDefaultCodec(final Configuration c) { > // If "hbase.client.default.rpc.codec" is empty string -- you can't set it to null because > // Configuration will complain -- then no default codec (and we'll pb everything). Else > // default is KeyValueCodec > return c.get(DEFAULT_CODEC_CLASS, KeyValueCodec.class.getCanonicalName()); > } > {code} > Our aim is to by def use Codec and it is KeyValueCodec. > The codec finding in MultiServerCallable to be same way as in AbstractRpcClient and then only we will be doing cellblock stuff. -- This message was sent by Atlassian JIRA (v6.3.4#6332)