Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.Result


    if (flush) {
      // Request a cache flush. Do it outside update lock.
      requestFlush();
    }

    return append.isReturnResults() ? new Result(allKVs) : null;
  }
View Full Code Here


    if (flush) {
      // Request a cache flush.  Do it outside update lock.
      requestFlush();
    }

    return new Result(allKVs);
  }
View Full Code Here

   * @throws IOException if an error occurred on the coprocessor
   */
  public Result preAppend(Append append)
      throws IOException {
    boolean bypass = false;
    Result result = null;
    ObserverContext<RegionCoprocessorEnvironment> ctx = null;
    for (RegionEnvironment env: coprocessors) {
      if (env.getInstance() instanceof RegionObserver) {
        ctx = ObserverContext.createAndPrepare(env, ctx);
        try {
View Full Code Here

   * @throws IOException if an error occurred on the coprocessor
   */
  public Result preIncrement(Increment increment)
      throws IOException {
    boolean bypass = false;
    Result result = null;
    ObserverContext<RegionCoprocessorEnvironment> ctx = null;
    for (RegionEnvironment env: coprocessors) {
      if (env.getInstance() instanceof RegionObserver) {
        ctx = ObserverContext.createAndPrepare(env, ctx);
        try {
View Full Code Here

      hbck.setFixSplitParents(true);
      hbck.onlineHbck();
      assertTrue(hbck.shouldRerun());

      Get get = new Get(hri.getRegionName());
      Result result = meta.get(get);
      assertTrue(result.getColumn(HConstants.CATALOG_FAMILY,
        HConstants.SPLITA_QUALIFIER).isEmpty());
      assertTrue(result.getColumn(HConstants.CATALOG_FAMILY,
        HConstants.SPLITB_QUALIFIER).isEmpty());
      TEST_UTIL.getHBaseAdmin().flush(HConstants.META_TABLE_NAME);

      // fix other issues
      doFsck(conf, true);
View Full Code Here

    // Need to set up a fake scan of meta for the servershutdown handler
    // Make an RS Interface implementation.  Make it so a scanner can go against it.
    HRegionInterface implementation = Mockito.mock(HRegionInterface.class);
    // Get a meta row result that has region up on SERVERNAME_A

    Result r = null;
    if (sn == null) {
      if (splitRegion) {
        r = getMetaTableRowResultAsSplitRegion(REGIONINFO, SERVERNAME_A);
      } else {
        r = getMetaTableRowResult(REGIONINFO, SERVERNAME_A);
      }
    } else {
      if (sn.equals(SERVERNAME_A)) {
        r = getMetaTableRowResult(REGIONINFO, SERVERNAME_A);
      } else if (sn.equals(SERVERNAME_B)) {
        r = new Result(new KeyValue[0]);
      }
    }

    Mockito.when(implementation.openScanner((byte [])Mockito.any(), (Scan)Mockito.any())).
      thenReturn(System.currentTimeMillis());
View Full Code Here

      HBaseFsck hbck = doFsck(conf, true, true, false, false, false, true, true, true, null);
      assertErrors(hbck, new ERROR_CODE[] {}); //no LINGERING_SPLIT_PARENT reported

      // assert that the split META entry is still there.
      Get get = new Get(hri.getRegionName());
      Result result = meta.get(get);
      assertNotNull(result);
      assertNotNull(MetaReader.parseCatalogResult(result).getFirst());

      assertEquals(ROWKEYS.length, countRows());
View Full Code Here

      HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER,
      Bytes.toBytes(sn.getHostAndPort())));
    kvs.add(new KeyValue(HConstants.EMPTY_BYTE_ARRAY,
      HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER,
      Bytes.toBytes(sn.getStartcode())));
    return new Result(kvs);
  }
View Full Code Here

      assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.NOT_IN_META_OR_DEPLOYED,
          ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.HOLE_IN_REGION_CHAIN});

      // assert that the split META entry is still there.
      Get get = new Get(hri.getRegionName());
      Result result = meta.get(get);
      assertNotNull(result);
      assertNotNull(MetaReader.parseCatalogResult(result).getFirst());

      assertEquals(ROWKEYS.length, countRows());
View Full Code Here

    if (enabling) {
      result = new Result[2];
      result[0] = getMetaTableRowResult(REGIONINFO, SERVERNAME_A);
      result[1] = getMetaTableRowResult(REGIONINFO_2, SERVERNAME_A);
    }
    Result r = getMetaTableRowResult(REGIONINFO, SERVERNAME_A);
    Mockito.when(ri .openScanner((byte[]) Mockito.any(), (Scan) Mockito.any())).
      thenReturn(System.currentTimeMillis());
   if (enabling) {
      Mockito.when(ri.next(Mockito.anyLong(), Mockito.anyInt())).thenReturn(result, result, result,
          (Result[]) null);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.Result

Copyright © 2018 www.massapicom. 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.