Package org.apache.blur.thrift.generated

Examples of org.apache.blur.thrift.generated.FetchResult


          @Override
          public BlurResult next() throws BlurException {
            BlurResult result = iterator.next();
            String locationId = result.getLocationId();
            FetchResult fetchResult = new FetchResult();
            Selector s = new Selector(selector);
            s.setLocationId(locationId);
            fetchRow(table, s, fetchResult);
            result.setFetchResult(fetchResult);
            return result;
View Full Code Here


      Selector selector = new Selector();
      selector.setRowId(_rowId);
      IndexManager.populateSelector(searcher, _shard, _table, selector);
      Row row = null;
      if (!selector.getLocationId().equals(IndexManager.NOT_FOUND)) {
        FetchResult fetchResult = new FetchResult();
        IndexManager.fetchRow(searcher.getIndexReader(), _table, _shard, selector, fetchResult, null, null, _maxHeap,
            _tableContext, null);
        FetchRowResult rowResult = fetchResult.getRowResult();
        if (rowResult != null) {
          row = rowResult.getRow();
        }
      }
      for (UpdateRowAction action : _actions) {
View Full Code Here

  public void testMutationDeleteRow() throws Exception {
    RowMutation mutation = newRowMutation(DELETE_ROW, TABLE, "row-2");
    indexManager.mutate(mutation);

    Selector selector = new Selector().setRowId("row-2");
    FetchResult fetchResult = new FetchResult();
    indexManager.fetchRow(TABLE, selector, fetchResult);
    assertNull("row should be deleted", fetchResult.rowResult);
  }
View Full Code Here

  public void testMutationDeleteMissingRow() throws Exception {
    RowMutation mutation = newRowMutation(DELETE_ROW, TABLE, "row-6");
    indexManager.mutate(mutation);

    Selector selector = new Selector().setRowId("row-6");
    FetchResult fetchResult = new FetchResult();
    indexManager.fetchRow(TABLE, selector, fetchResult);
    assertNull("row should not exist", fetchResult.rowResult);
  }
View Full Code Here

    RowMutation rowMutation = newRowMutation(UPDATE_ROW, TABLE, "row-3", rm);

    indexManager.mutate(rowMutation);

    Selector selector = new Selector().setRowId("row-3");
    FetchResult fetchResult = new FetchResult();
    indexManager.fetchRow(TABLE, selector, fetchResult);
    assertNull("row should not exist", fetchResult.rowResult);
  }
View Full Code Here

    RowMutation rowMutation = newRowMutation(UPDATE_ROW, TABLE, "row-5", rm);
    indexManager.mutate(rowMutation);

    Selector selector = new Selector().setRowId("row-5");
    FetchResult fetchResult = new FetchResult();
    indexManager.fetchRow(TABLE, selector, fetchResult);
    assertNotNull("row should exist", fetchResult.rowResult);
    assertNotNull("row should exist", fetchResult.rowResult.row);
    assertEquals("row should have one record", 1, fetchResult.rowResult.row.getRecordsSize());
  }
View Full Code Here

    RowMutation rowMutation = newRowMutation(UPDATE_ROW, TABLE, "row-5", rm1, rm2);
    indexManager.mutate(rowMutation);

    Selector selector = new Selector().setRowId("row-5");
    FetchResult fetchResult = new FetchResult();
    indexManager.fetchRow(TABLE, selector, fetchResult);
    Row r = fetchResult.rowResult.row;
    assertNotNull("row should exist", r);
    assertEquals("only 3 records in row", 3, r.getRecordsSize());
    int rm1Matches = 0;
View Full Code Here

    RowMutation rowMutation = newRowMutation(UPDATE_ROW, TABLE, rowId, recordMutations);
    indexManager.mutate(rowMutation);

    Selector selector = new Selector().setRowId(rowId).setRecordId(recordId);
    selector.setRecordOnly(true);
    FetchResult fetchResult = new FetchResult();
    indexManager.fetchRow(TABLE, selector, fetchResult);
    return (fetchResult.recordResult != null ? fetchResult.recordResult.record : null);
  }
View Full Code Here

    Iface client = getClient();
    try {
      BlurResults results = client.query(tableName, blurQuery);
      List<String> rowIds = new ArrayList<String>();
      for (BlurResult result : results.getResults()) {
        FetchResult fetchResult = result.getFetchResult();
        FetchRowResult rowResult = fetchResult.getRowResult();
        String id = rowResult.getRow().getId();
        rowIds.add(id);
      }
      return rowIds;
    } catch (BlurException e) {
View Full Code Here

        @Override
        public void run() {
          for (int t = 0; t < 50; t++) {
            // Trace.setupTrace(rowId);
            Selector selector = new Selector().setRowId(rowId);
            FetchResult fetchResult = new FetchResult();
            long s = System.nanoTime();
            try {
              indexManager.fetchRow(TABLE, selector, fetchResult);
            } catch (BlurException e1) {
              e1.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.blur.thrift.generated.FetchResult

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.