From user-return-56454-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Sat Jan 25 18:35:11 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1562718061A for ; Sat, 25 Jan 2020 19:35:10 +0100 (CET) Received: (qmail 38708 invoked by uid 500); 25 Jan 2020 18:35:09 -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 38696 invoked by uid 99); 25 Jan 2020 18:35:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jan 2020 18:35:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 190FCC0B44 for ; Sat, 25 Jan 2020 18:35:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.201 X-Spam-Level: X-Spam-Status: No, score=-0.201 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id J2Mkwm8lPwbB for ; Sat, 25 Jan 2020 18:35:06 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.222.179; helo=mail-qk1-f179.google.com; envelope-from=vitaliy.se@gmail.com; receiver= Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 5FDEEBC510 for ; Sat, 25 Jan 2020 18:35:06 +0000 (UTC) Received: by mail-qk1-f179.google.com with SMTP id x1so5536230qkl.12 for ; Sat, 25 Jan 2020 10:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ASy1iUFSwQUEb00akStu9ndlWuivlideVnL9dgUwMOk=; b=HKaZtQSLwzsemzLNUtZ2XHex2FTXSrBO3rdIQNT1vH42JnISyg2nLiIb++84NG6MlG UsId03KUPwJ4zMtXiym4DLQwhKhfY7a2B2C2nVxbHld0Ti9ovZZH1okidQQZwSGY4WXN jyLevfowjAhYTTTAZ/Ly6P0zQ7vxQyDUpsZZ0/jt7f2DNEQCyfRF3DbU6XCYy6u21q7L u0huUPtFExVRqe8WodDpG79Wjn8diGxH16qZ+y4p5aVDKlVzD0LmyYU/O/H30DX/7gK2 4T8tefCDrKZZ96LCf5uFQZ9KPK+7yEXilZAdiadI5reT/LkrGA+3dkGYOnAlrVs4MDk3 a3Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ASy1iUFSwQUEb00akStu9ndlWuivlideVnL9dgUwMOk=; b=aYDB20T4qKBgAMARK73Q5PndSuLCQ1xKvtBBNOtZ7bVJ/i/f3yl2tv+5AICTm6Y2V0 tCOf+y3yEDpn09oIe1/9mazSFUhRczfwDgYGcfCNz/zij2WW1OoFTqvtpNeDX8F6E2sH teRg2dhGurMEdDoY7yFrvc1CDhs2aKqgiv4bmpq9f3gWYjQZZCOcC3taSJ6J3p1B0Uv7 jxUQKRigce8hJXtQ7nsaGmvb4eien64wHIeTDDkgfIwKyP2J5/UXAFYN0wqAB4C0GEqF nK+IdkBF+kL3Qoug7y1lsZvc8aEOGTueaqpNC7/fZHjK/zYhQyWCQ/B1oK3oD/kn1nih V6Wg== X-Gm-Message-State: APjAAAWXgDR3NtGrLr8rcI6LxTDd6jEGZuXeuSLl9qqf7nlcKSyGNE1a TgABoq9Cely758iV5T9fwKlpW8zM6wiZ1g2wRbipWfo= X-Google-Smtp-Source: APXvYqy6nGIaa1rMKHdPTSQ6RCFUL8aT7IxSnV/t4AM6BQU75dC6Q6MGPW8PG31bj9J2LXlFsIL4fubOzdbq5bd8mTc= X-Received: by 2002:ae9:f40b:: with SMTP id y11mr1456691qkl.378.1579977300149; Sat, 25 Jan 2020 10:35:00 -0800 (PST) MIME-Version: 1.0 From: Vitaliy Semochkin Date: Sat, 25 Jan 2020 21:34:49 +0300 Message-ID: Subject: Connection Managment in a single JVM To: user@hbase.apache.org Content-Type: text/plain; charset="UTF-8" Hi, If I create a single jvm mulththreaded application, that creates thousands of HBase requests in parallel (gets,puts, scans), which connection management approach should I use? Can I create just one connection and use it in parallel threads as Connection java doc suggests? What will be consequences of not closing connections if the object that instantiated connection was garbage collected together with connection reference? Does ConnectionFactory maintains a pool of connection and acts as jdbc data source, i.e. one should use createConnection and that close after usage in order to let others to use connection, if so how to manage the size of the pool? What is the purpose of a pool in ConnectionFactory? Regards, Vitaliy