Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4241118295 for ; Fri, 17 Jul 2015 13:37:24 +0000 (UTC) Received: (qmail 28141 invoked by uid 500); 17 Jul 2015 13:37:22 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 28062 invoked by uid 500); 17 Jul 2015 13:37:22 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 28050 invoked by uid 99); 17 Jul 2015 13:37:22 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2015 13:37:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 88CDD1A7268 for ; Fri, 17 Jul 2015 13:37:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.65 X-Spam-Level: *** X-Spam-Status: No, score=3.65 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, KAM_INFOUSMEBIZ=0.75, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 0AuFeao9TVmj for ; Fri, 17 Jul 2015 13:37:16 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 4729F43CD3 for ; Fri, 17 Jul 2015 13:37:16 +0000 (UTC) Received: by oihq81 with SMTP id q81so70681166oih.2 for ; Fri, 17 Jul 2015 06:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Pu/kz3JfMd5m+YttSznMx0Kix6uGi1fxR1QEd2BJEk4=; b=KpRQQuca8y7ykd5esF0fN2TgpEcpvAvjNR5J5uQtLl5i+E0HR185jsk2t3s8uMyZn/ MRBe1AT6yhUyxZdPvo35/jFTqbJnQs9aKszdkfZR13vaqi2U+x7jgrIOwWtl5s3L7apf Iipu3giZD5TLLQnrcSIv2TOS4ObKtE4BLT1kIqFsKngBAj1sV5fNg+Y/FpAxpftwgSlz dsaPB40R5iGCbqkEeMvjPNl5jVtYBSS9KZtutQLUJcg/V6qbiYm+6Li+K/PsciWLx0fq U1zISlrUz356l5l/UOr/zjhWhNXf5UTIXSrKE+EhdxJ/vLxhiEEUqYxhM08ykNLKl/Ma nN4Q== X-Received: by 10.202.204.78 with SMTP id c75mr13174597oig.12.1437140184852; Fri, 17 Jul 2015 06:36:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.225.8 with HTTP; Fri, 17 Jul 2015 06:36:05 -0700 (PDT) From: Dmitry Minkovsky Date: Fri, 17 Jul 2015 09:36:05 -0400 Message-ID: Subject: How can I tell when a client is connected and ready to go? To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a1134e4d235f101051b1246c2 --001a1134e4d235f101051b1246c2 Content-Type: text/plain; charset=UTF-8 I am using HBase 1.1.0 and create HBase client connections like this: try { Configuration config = HBaseConfiguration.create(); connection = ConnectionFactory.createConnection(config); } catch (IOException e) { logger.info("Error {}", e); } However, I noticed that when ZooKeeper and HBase Master/Region servers are down, the catch clause is never reached. The code runs as if the connection is made, and connection.isClosed() returns false. So: - What happens when I use this connection? Are the RPC calls buffered and retried at some interval in background? - How can I tell whether the connection is actually ready for use? Should I try to do this, or just use it? My inclination is not to run a client service without the underlying datastores all actually ready, but perhaps this is not the idea with the new HBase API. - Under what conditions is the IOException catch actually reached? My goal is to be able to fail fast. Is that the wrong idea with this client? Thanks, Dmitry --001a1134e4d235f101051b1246c2--