private GridTable newGridTableByCuboidID(long cuboidID) throws IOException { GTInfo info = CubeGridTable.newGTInfo(Cuboid.findForMandatory(cubeDesc, cuboidID), new CubeDimEncMap(cubeDesc, dictionaryMap) ); // Below several store implementation are very similar in performance. The ConcurrentDiskStore is the simplest. // MemDiskStore store = new MemDiskStore(info, memBudget == null ? MemoryBudgetController.ZERO_BUDGET : memBudget); // MemDiskStore store = new MemDiskStore(info, MemoryBudgetController.ZERO_BUDGET); IGTStore store = new ConcurrentDiskStore(info); GridTable gridTable = new GridTable(info, store); return gridTable; }
private GridTable newGridTableByCuboidID(long cuboidID) throws IOException { GTInfo info = CubeGridTable.newGTInfo(Cuboid.findForMandatory(cubeDesc, cuboidID), new CubeDimEncMap(cubeDesc, dictionaryMap)); // Below several store implementation are very similar in performance. The ConcurrentDiskStore is the simplest. // MemDiskStore store = new MemDiskStore(info, memBudget == null ? MemoryBudgetController.ZERO_BUDGET : memBudget); // MemDiskStore store = new MemDiskStore(info, MemoryBudgetController.ZERO_BUDGET); IGTStore store = new ConcurrentDiskStore(info); GridTable gridTable = new GridTable(info, store); return gridTable; }
private void verifyOneTableWriteAndRead() throws IOException { MemDiskStore store = new MemDiskStore(info, budgetCtrl); GridTable table = new GridTable(info, store); verifyWriteAndRead(table); }
private void verifyOneTableWriteAndRead(int readThreads) throws IOException, InterruptedException { ConcurrentDiskStore store = new ConcurrentDiskStore(info); GridTable table = new GridTable(info, store); verifyWriteAndRead(table, readThreads); }
private static GridTable newTable(GTInfo info) throws IOException { GTSimpleMemStore store = new GTSimpleMemStore(info); GridTable table = new GridTable(info, store); GTRecord record = new GTRecord(info); Random rand = new Random(); GTBuilder builder = table.rebuild(); expUserRet.clear(); Map<String, List<BigDecimal>> contents = Maps.newHashMap(); for (String date : dateList) { for (String user : userList) { List<BigDecimal> innerList = contents.get(user); if (innerList == null) { innerList = Lists.newArrayList(); contents.put(user, innerList); } BigDecimal value = priceList.get(rand.nextInt(priceList.size())); innerList.add(value); builder.write(record.setValues(date, user, value, new BigDecimal(0))); } } for (String user : contents.keySet()) { BigDecimal sum = new BigDecimal(0); for (BigDecimal innerValue : contents.get(user)) { sum = sum.add(innerValue); } expUserRet.put(user, sum); } builder.close(); return table; }
public static GridTable newTestTable() throws IOException { GTInfo info = newInfo(); GTSimpleMemStore store = new GTSimpleMemStore(info); GridTable table = new GridTable(info, store); GTRecord r = new GTRecord(table.getInfo()); GTBuilder builder = table.rebuild(); builder.write(r.setValues("2015-01-14", "30", "Yang", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-14", "30", "Luke", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-15", "20", "Dong", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-15", "20", "Jason", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-15", "30", "Xu", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-16", "20", "Mahone", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-16", "20", "Qianhao", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-16", "30", "George", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-16", "30", "Shaofeng", new Long(10), new BigDecimal("10.5"))); builder.write(r.setValues("2015-01-17", "10", "Kejia", new Long(10), new BigDecimal("10.5"))); builder.close(); return table; }
@Test public void testAggregate() throws IOException { GTInfo info = UnitTestSupport.advancedInfo(); GTSimpleMemStore store = new GTSimpleMemStore(info); GridTable table = new GridTable(info, store); GTBuilder builder = rebuild(table); IGTScanner scanner = scanAndAggregate(table); }
@Test public void testAppend() throws IOException { GTInfo info = UnitTestSupport.advancedInfo(); GTSimpleMemStore store = new GTSimpleMemStore(info); GridTable table = new GridTable(info, store); rebuildViaAppend(table); IGTScanner scanner = scan(table); }
@Test public void testAdvanced() throws IOException { GTInfo info = UnitTestSupport.advancedInfo(); GTSimpleMemStore store = new GTSimpleMemStore(info); GridTable table = new GridTable(info, store); GTBuilder builder = rebuild(table); IGTScanner scanner = scan(table); }
@Test public void testBasics() throws IOException { GTInfo info = UnitTestSupport.basicInfo(); GTSimpleMemStore store = new GTSimpleMemStore(info); GridTable table = new GridTable(info, store); GTBuilder builder = rebuild(table); IGTScanner scanner = scan(table); }
static GridTable newTestPerfTable() throws IOException { GTInfo info = newInfo(); GTSimpleMemStore store = new GTSimpleMemStore(info); GridTable table = new GridTable(info, store);
private GridTable newGridTableByCuboidID(long cuboidID) throws IOException { GTInfo info = CubeGridTable.newGTInfo(Cuboid.findForMandatory(cubeDesc, cuboidID), new CubeDimEncMap(cubeDesc, dictionaryMap) ); // Below several store implementation are very similar in performance. The ConcurrentDiskStore is the simplest. // MemDiskStore store = new MemDiskStore(info, memBudget == null ? MemoryBudgetController.ZERO_BUDGET : memBudget); // MemDiskStore store = new MemDiskStore(info, MemoryBudgetController.ZERO_BUDGET); IGTStore store = new ConcurrentDiskStore(info); GridTable gridTable = new GridTable(info, store); return gridTable; }
private GridTable newGridTableByCuboidID(long cuboidID) throws IOException { GTInfo info = CubeGridTable.newGTInfo(Cuboid.findForMandatory(cubeDesc, cuboidID), new CubeDimEncMap(cubeDesc, dictionaryMap)); // Below several store implementation are very similar in performance. The ConcurrentDiskStore is the simplest. // MemDiskStore store = new MemDiskStore(info, memBudget == null ? MemoryBudgetController.ZERO_BUDGET : memBudget); // MemDiskStore store = new MemDiskStore(info, MemoryBudgetController.ZERO_BUDGET); IGTStore store = new ConcurrentDiskStore(info); GridTable gridTable = new GridTable(info, store); return gridTable; }