Note that there are some explanatory texts on larger screens.

plurals
  1. POHbase read performance varying abnormally
    text
    copied!<p>I've installed HBase 0.94.0. I had to improve my read performance through scan. I've inserted random 100000 records.</p> <p>When I set <code>setCache(100);</code> my performance was 16 secs for 100000 records.</p> <p>When I set it to <code>setCache(50)</code> my performance was 90 secs for 100000 records.</p> <p>When I set it to <code>setCache(10);</code> my performance was 16 secs for 100000 records</p> <pre><code>public class Test { public static void main(String[] args) { long start, middle, end; HTableDescriptor descriptor = new HTableDescriptor("Student7"); descriptor.addFamily(new HColumnDescriptor("No")); descriptor.addFamily(new HColumnDescriptor("Subject")); try { HBaseConfiguration config = new HBaseConfiguration(); HBaseAdmin admin = new HBaseAdmin(config); admin.createTable(descriptor); HTable table = new HTable(config, "Student7"); System.out.println("Table created !"); start = System.currentTimeMillis(); for(int i =1;i&lt;100000;i++) { String s=Integer.toString(i); Put p = new Put(Bytes.toBytes(s)); p.add(Bytes.toBytes("No"), Bytes.toBytes("IDCARD"),Bytes.toBytes("i+10")); p.add(Bytes.toBytes("No"), Bytes.toBytes("PHONE"),Bytes.toBytes("i+20")); p.add(Bytes.toBytes("No"), Bytes.toBytes("PAN"),Bytes.toBytes("i+30")); p.add(Bytes.toBytes("No"), Bytes.toBytes("ACCT"),Bytes.toBytes("i+40")); p.add(Bytes.toBytes("Subject"), Bytes.toBytes("English"),Bytes.toBytes("50")); p.add(Bytes.toBytes("Subject"), Bytes.toBytes("Science"),Bytes.toBytes("60")); p.add(Bytes.toBytes("Subject"), Bytes.toBytes("History"),Bytes.toBytes("70")); table.put(p); } middle = System.currentTimeMillis(); Scan s = new Scan(); s.setCaching(100); ResultScanner scanner = table.getScanner(s); try { for (Result rr = scanner.next(); rr != null; rr=scanner.next()) { System.out.println("Found row: " + rr); } end = System.currentTimeMillis(); } finally { scanner.close(); } System.out.println("TableCreation-Time: " + (middle - start)); System.out.println("Scan-Time: " + (middle - end)); } catch (IOException e) { System.out.println("IOError: cannot create Table."); e.printStackTrace(); } } } </code></pre> <p>Why is this happening? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload