/** * Getting data from memstore and files * @throws IOException */ @Test public void testGet_FromMemStoreAndFiles() throws IOException { init(this.name.getMethodName()); //Put data in memstore this.store.add(new KeyValue(row, family, qf1, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf2, 1, (byte[])null), null); //flush flush(1); //Add more data this.store.add(new KeyValue(row, family, qf3, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf4, 1, (byte[])null), null); //flush flush(2); //Add more data this.store.add(new KeyValue(row, family, qf5, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf6, 1, (byte[])null), null); //Get result = HBaseTestingUtility.getFromStoreFile(store, get.getRow(), qualifiers); //Need to sort the result since multiple files Collections.sort(result, CellComparatorImpl.COMPARATOR); //Compare assertCheck(); }
/** * Getting data from memstore only * @throws IOException */ @Test public void testGet_FromMemStoreOnly() throws IOException { init(this.name.getMethodName()); //Put data in memstore this.store.add(new KeyValue(row, family, qf1, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf2, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf3, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf4, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf5, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf6, 1, (byte[])null), null); //Get result = HBaseTestingUtility.getFromStoreFile(store, get.getRow(), qualifiers); //Compare assertCheck(); }
/** * Getting data from memstore and files * @throws IOException */ @Test public void testGet_FromMemStoreAndFiles() throws IOException { init(this.name.getMethodName()); //Put data in memstore this.store.add(new KeyValue(row, family, qf1, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf2, 1, (byte[])null), null); //flush flush(1); //Add more data this.store.add(new KeyValue(row, family, qf3, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf4, 1, (byte[])null), null); //flush flush(2); //Add more data this.store.add(new KeyValue(row, family, qf5, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf6, 1, (byte[])null), null); //Get result = HBaseTestingUtility.getFromStoreFile(store, get.getRow(), qualifiers); //Need to sort the result since multiple files Collections.sort(result, CellComparatorImpl.COMPARATOR); //Compare assertCheck(); }
/** * Getting data from memstore only * @throws IOException */ @Test public void testGet_FromMemStoreOnly() throws IOException { init(this.name.getMethodName()); //Put data in memstore this.store.add(new KeyValue(row, family, qf1, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf2, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf3, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf4, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf5, 1, (byte[])null), null); this.store.add(new KeyValue(row, family, qf6, 1, (byte[])null), null); //Get result = HBaseTestingUtility.getFromStoreFile(store, get.getRow(), qualifiers); //Compare assertCheck(); }