drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasadns14 <...@git.apache.org>
Subject [GitHub] drill pull request #975: DRILL-5743: Handling column family and column scan ...
Date Sat, 07 Oct 2017 04:29:21 GMT
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.


---

Mime
View raw message