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 54138200D22 for ; Sat, 7 Oct 2017 06:29:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 528EE160BDB; Sat, 7 Oct 2017 04:29:23 +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 BFEA71609E1 for ; Sat, 7 Oct 2017 06:29:22 +0200 (CEST) Received: (qmail 12808 invoked by uid 500); 7 Oct 2017 04:29:21 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 12793 invoked by uid 99); 7 Oct 2017 04:29:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Oct 2017 04:29:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5481BE8F1F; Sat, 7 Oct 2017 04:29:21 +0000 (UTC) From: prasadns14 To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #975: DRILL-5743: Handling column family and column scan ... Content-Type: text/plain Message-Id: <20171007042921.5481BE8F1F@git1-us-west.apache.org> Date: Sat, 7 Oct 2017 04:29:21 +0000 (UTC) archived-at: Sat, 07 Oct 2017 04:29:23 -0000 Github user prasadns14 commented on a diff in the pull request: https://github.com/apache/drill/pull/975#discussion_r143322352 --- Diff: contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestTableGenerator.java --- @@ -133,6 +133,43 @@ public static void generateHBaseDataset1(Connection conn, Admin admin, TableName table.close(); } + public static void generateHBaseDatasetSingleSchema(Connection conn, Admin admin, TableName tableName, int numberRegions) throws Exception { + if (admin.tableExists(tableName)) { + admin.disableTable(tableName); + admin.deleteTable(tableName); + } + + HTableDescriptor desc = new HTableDescriptor(tableName); + desc.addFamily(new HColumnDescriptor("f")); + if (numberRegions > 1) { + admin.createTable(desc, Arrays.copyOfRange(SPLIT_KEYS, 0, numberRegions - 1)); + } else { + admin.createTable(desc); + } + + BufferedMutator table = conn.getBufferedMutator(tableName); + + Put p = new Put("a1".getBytes()); + p.addColumn("f".getBytes(), "c1".getBytes(), "21".getBytes()); + p.addColumn("f".getBytes(), "c2".getBytes(), "22".getBytes()); + p.addColumn("f".getBytes(), "c3".getBytes(), "23".getBytes()); + table.mutate(p); + + p = new Put("a2".getBytes()); + p.addColumn("f".getBytes(), "c1".getBytes(), "11".getBytes()); --- End diff -- We currently assume encoding to be UTF-8. Support for different encoding can be addressed through DRILL-5825. ---