Examples of compact()


Examples of org.apache.activemq.leveldb.LevelDBStoreViewMBean.compact()

        MessageProducer producer = session.createProducer(destination);
        producer.setDeliveryMode(DeliveryMode.PERSISTENT);

        LevelDBStoreViewMBean levelDBView = getLevelDBStoreMBean();
        assertNotNull(levelDBView);
        levelDBView.compact();

        final int SIZE = 6 * 1024 * 5;
        final int MSG_COUNT = 60000;
        final CountDownLatch done = new CountDownLatch(MSG_COUNT);

View Full Code Here

Examples of org.apache.activemq.util.ByteSequence.compact()

        resultEndpoint.assertIsSatisfied();

        List<Exchange> list = resultEndpoint.getReceivedExchanges();
        Exchange exchange = list.get(0);
        ByteSequence body = (ByteSequence)exchange.getIn().getBody();
        body.compact(); // trims the byte array to the actual size.
        assertEquals("body", new String(payload), new String(body.data));
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

Examples of org.apache.flink.test.recordJobs.util.Tuple.compact()

   
    Tuple t = new Tuple();
    t.addAttribute("Hello world!");
   
    Assert.assertTrue(t.getBytes().length == 256);
    t.compact();
    Assert.assertTrue(t.getBytes().length == 13);
   
    byte[] ba = new byte[1024];
    int[] of = {0};
    t = new Tuple(ba, of, 0);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Admin.compact()

        while (!(store.getStorefilesCount() > 2)) {
          Thread.sleep(10);
        }
      }
      result(fam, row, qual, row2, table, value, value2, row1, value1);
      admin.compact(tableName);
      while (admin.getCompactionState(tableName) != CompactionState.NONE) {
        Thread.sleep(10);
      }
      result(fam, row, qual, row2, table, value, value2, row1, value1);
    } finally {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.compact()

    LOG.info("Performing action: Compact table " + tableName + ", major=" + major);
    if (major) {
      admin.majorCompact(tableNameBytes);
    } else {
      admin.compact(tableNameBytes);
    }
    if (sleepTime > 0) {
      Thread.sleep(sleepTime);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.compact()

    if (major) {
      LOG.debug("Major compacting region " + region.getRegionNameAsString());
      admin.majorCompact(region.getRegionName());
    } else {
      LOG.debug("Compacting region " + region.getRegionNameAsString());
      admin.compact(region.getRegionName());
    }
    if (sleepTime > 0) {
      Thread.sleep(sleepTime);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.compact()

    HTable ht = null;
    try {
      ht = TEST_UTIL.createTable(table, family);
      HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
      try {
        admin.compact(table, fakecf);
      } catch (IOException ioe) {
        caughtMinorCompact = true;
      }
      try {
        admin.majorCompact(table, fakecf);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.compact()

      int countBeforeSingleFamily = countStoreFilesInFamily(regions, family);
      assertTrue(countBefore > 0); // there should be some data files
      HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
      if (expectedState == CompactionState.MINOR) {
        if (singleFamily) {
          admin.compact(table, family);
        } else {
          admin.compact(table);
        }
      } else {
        if (singleFamily) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.compact()

      HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
      if (expectedState == CompactionState.MINOR) {
        if (singleFamily) {
          admin.compact(table, family);
        } else {
          admin.compact(table);
        }
      } else {
        if (singleFamily) {
          admin.majorCompact(table, family);
        } else {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.compact()

      // should have a second StoreFile now
      assertEquals(2, fs.listStatus(storePath).length);

      // minor compactions shouldn't get rid of the file
      admin.compact(TABLE_NAME);
      try {
        quickPoll(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return fs.listStatus(storePath).length == 1;
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.