Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6542A200B55 for ; Sun, 17 Jul 2016 00:12:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 63DD7160A7C; Sat, 16 Jul 2016 22:12:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D34F1160A6C for ; Sun, 17 Jul 2016 00:12:21 +0200 (CEST) Received: (qmail 71432 invoked by uid 500); 16 Jul 2016 22:12:21 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 71418 invoked by uid 99); 16 Jul 2016 22:12:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jul 2016 22:12:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 825E32C0031 for ; Sat, 16 Jul 2016 22:12:20 +0000 (UTC) Date: Sat, 16 Jul 2016 22:12:20 +0000 (UTC) From: "Mario Pastorelli (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 16 Jul 2016 22:12:22 -0000 Mario Pastorelli created ACCUMULO-4375: ------------------------------------------ Summary: Add missing Key constructors taking array of bytes as argument Key: ACCUMULO-4375 URL: https://issues.apache.org/jira/browse/ACCUMULO-4375 Project: Accumulo Issue Type: Improvement Components: core Reporter: Mario Pastorelli In my company we use {{Key}} built directly from {{byte[]}} instead of {{Text}}. Currently {{Key}} has many constructors working with {{Text}} and only few working with {{byte[]}}. You can still use the {{Text}}-based constructor to create a {{Key}} from a {{byte[]}} by wrapping it into a {{Text}}, but this requires to box a {{byte[]}} into {{Text}} without any good reason. I propose to add the missing {{byte[]}}-based {{Key}} constructors, which are: {code:java} Key(byte[] row) Key(byte[] row, long ts) Key(byte[] row, byte[] cf) Key(byte[] row, byte[] cf, byte[] cq) Key(byte[] row, byte[] cf, byte[] cq, byte[] cv) Key(byte[] row, byte[] cf, byte[] cq, long ts) Key(byte[] row, byte[] cf, byte[] cq, ColumnVisibility cv, long ts) {code} The new constructor should behave like the {{Text}}-based counterpart, for instance: {code:java} byte[] row = new byte[] {0}; assertEquals(new Key(row), new Key(new Text(row))); {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)