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 F3BD5FF67 for ; Thu, 13 Nov 2014 22:51:34 +0000 (UTC) Received: (qmail 83792 invoked by uid 500); 13 Nov 2014 22:51:34 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 83743 invoked by uid 500); 13 Nov 2014 22:51:34 -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 83731 invoked by uid 99); 13 Nov 2014 22:51:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2014 22:51:34 +0000 Date: Thu, 13 Nov 2014 22:51:34 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-12404) Task 5 from parent: Replace internal HTable constructor use with HConnection#getTable (0.98, 0.99) 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-12404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14211411#comment-14211411 ] stack commented on HBASE-12404: ------------------------------- Posted rb here: https://reviews.apache.org/r/28009/ Here are a few notes on the patch: Replaced HTable under hbase-*/src/main/java. Skipped tests. Would take till end of time to do all and some cases are cryptic. Also skipped some mapreduce where HTable comes through in API. Can do both of these stragglers in another issue. Generally, if a utility class or standalone class, tried to pass in a Connection rather than have the utility or standalone create its own connection on each invocation; e.g. the Quota stuff. Where not possible, noted where invocation comes from... if test or hbck, didn't worry about it. Some classes are just standalone and nothing to be done to avoid a Connection setup per invocation (this is probably how it worked in the new HTable...days anyways). Some classes are not used: AggregationClient, FavoredNodes... we should just purge this stuff. Doc on what short circuit connection does (I can just use it... I thought it was just for short circuit but no, it switches dependent on where you are connecting). Changed HConnection to super Interface ClusterConnection where safe ( internal usage by private classes only). Doc cleanup in example usage so we do new mode rather than the old fashion. Used java7 idiom that allows you avoid writing out finally to call close on implementations of Closeable. Added a RegistryFactory.. moved it out from being inner class. Added a utility createGetClosestRowOrBeforeReverseScan method to Scan to create a Scan that can ... Renamed getShortCircuitConnection as getConnection -- users don't need to know what implementation does (that it can short-circuit RPC). The old name gave pause. I was frightened to use it thinking it only for short-circuit reading -- that it would not do remote too. > Task 5 from parent: Replace internal HTable constructor use with HConnection#getTable (0.98, 0.99) > -------------------------------------------------------------------------------------------------- > > Key: HBASE-12404 > URL: https://issues.apache.org/jira/browse/HBASE-12404 > Project: HBase > Issue Type: Sub-task > Reporter: stack > Assignee: stack > Fix For: 0.99.2 > > Attachments: 0001-HBASE-12404-Task-5-from-parent-Replace-internal-HTab.patch, 12404.txt, 12404v2.txt, 12404v3.txt, 12404v5.txt > > > Do the step 5. from the [~ndimiduk] list in parent issue. Go through src code and change all new HTable to instead be connection.getTable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)