Package org.apache.blur.thrift.generated

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


      out.println("    score : " + score);
      if (Main.debug) {
        String locationId = result.getLocationId();
        out.println("locationId : " + locationId);
      }
      FetchResult fetchResult = result.getFetchResult();
      if (Main.debug) {
        out.println("deleted : " + fetchResult.isDeleted());
        out.println("exists  : " + fetchResult.isExists());
        out.println("table   : " + fetchResult.getTable());
      }
      FetchRowResult rowResult = fetchResult.getRowResult();
      if (rowResult != null) {
        Row row = rowResult.getRow();
        if (row != null) {
          GetRowCommand.format(out, row, maxWidth);
        }
View Full Code Here


    String tablename = args[1];
    String rowId = args[2];

    Selector selector = new Selector(Main.selector);
    selector.setRowId(rowId);
    FetchResult fetchRow = client.fetchRow(tablename, selector);
    FetchRowResult rowResult = fetchRow.getRowResult();
    if (rowResult == null) {
      out.println("Row [" + rowId + "] not found.");
      return;
    }
    Row row = rowResult.getRow();
View Full Code Here

  @Override
  public FetchResult fetchRow(String table, Selector selector) throws BlurException, TException {
    try {
      checkTable(_cluster, table);
      checkSelectorFetchSize(selector);
      FetchResult fetchResult = new FetchResult();
      _indexManager.fetchRow(table, selector, fetchResult);
      return fetchResult;
    } catch (Exception e) {
      LOG.error("Unknown error while trying to get fetch row [table={0},selector={1}]", e, table, selector);
      if (e instanceof BlurException) {
View Full Code Here

    String lastValue = null;
    long totalFetched = 0;
    do {
      for (BlurResult blurResult : resultsRow.getResults()) {
        FetchResult fetchResult = blurResult.getFetchResult();
        Record record = fetchResult.getRecordResult().getRecord();
        if (lastValue == null) {
          lastValue = getColumnValue(record, "facet");
        } else {
          String currentValue = getColumnValue(record, "facet");
          if (currentValue.compareTo(lastValue) < 0) {
View Full Code Here

    String tablename = args[1];
    String rowId = args[2];

    Selector selector = new Selector(Main.selector);
    selector.setRowId(rowId);
    FetchResult fetchRow = client.fetchRow(tablename, selector);
    FetchRowResult rowResult = fetchRow.getRowResult();
    if (rowResult == null) {
      out.println("Row [" + rowId + "] not found.");
      return;
    }
    Row row = rowResult.getRow();
View Full Code Here

      out.println("    score : " + score);
      if (Main.debug) {
        String locationId = result.getLocationId();
        out.println("locationId : " + locationId);
      }
      FetchResult fetchResult = result.getFetchResult();
      if (Main.debug) {
        out.println("deleted : " + fetchResult.isDeleted());
        out.println("exists  : " + fetchResult.isExists());
        out.println("table   : " + fetchResult.getTable());
      }
      FetchRowResult rowResult = fetchResult.getRowResult();
      if (rowResult != null) {
        Row row = rowResult.getRow();
        if (row != null) {
          GetRowCommand.format(out, rowResult, maxWidth);
        }
View Full Code Here

    AtomicInteger recordCount = new AtomicInteger();
    AtomicInteger columnCount = new AtomicInteger();
    AtomicInteger columnSize = new AtomicInteger();

    for (BlurResult blurResult : blurResults.getResults()) {
      FetchResult fetchResult = blurResult.getFetchResult();
      FetchRecordResult recordResult = fetchResult.getRecordResult();
      if (recordResult != null) {
        Record record = recordResult.getRecord();
        count(record, recordCount, columnCount, columnSize);
      }
      FetchRowResult rowResult = fetchResult.getRowResult();
      if (rowResult != null) {
        Row row = rowResult.getRow();
        count(row, rowCount, recordCount, columnCount, columnSize);
      }
    }
View Full Code Here

    tableDisplay.setHeader(1, highlight(getTruncatedVersion("rowid")));
    tableDisplay.setHeader(2, highlight(getTruncatedVersion("recordid")));
    List<String> columnsLabels = new ArrayList<String>();
    int result = 0;
    for (BlurResult blurResult : blurResults.getResults()) {
      FetchResult fetchResult = blurResult.getFetchResult();
      FetchRowResult rowResult = fetchResult.getRowResult();
      if (rowResult == null) {
        FetchRecordResult recordResult = fetchResult.getRecordResult();
        String rowid = recordResult.getRowid();
        Record record = recordResult.getRecord();
        String family = record.getFamily();
        if (record.getColumns() != null) {
          for (Column column : record.getColumns()) {
View Full Code Here

    tableDisplay.setHeader(1, highlight(getTruncatedVersion("rowid")));
    tableDisplay.setHeader(2, highlight(getTruncatedVersion("recordid")));
    Map<String, List<String>> columnOrder = new HashMap<String, List<String>>();
    int result = 0;
    for (BlurResult blurResult : blurResults.getResults()) {
      FetchResult fetchResult = blurResult.getFetchResult();
      FetchRowResult rowResult = fetchResult.getRowResult();
      if (rowResult != null) {
        Row row = rowResult.getRow();
        String id = row.getId();
        tableDisplay.set(1, line.get(), white(getTruncatedVersion(toStringBinary(id))));
        List<Record> records = order(row.getRecords());
        String currentFamily = "#";
        for (Record record : records) {
          currentFamily = displayRecordInRowMultiFamilyView(result, tableDisplay, line, columnOrder, currentFamily,
              record);
        }
      } else {
        String currentFamily = "#";
        FetchRecordResult recordResult = fetchResult.getRecordResult();
        Record record = recordResult.getRecord();
        currentFamily = displayRecordInRowMultiFamilyView(result, tableDisplay, line, columnOrder, currentFamily,
            record);
      }
      result++;
View Full Code Here

    for (Selector s : selectors) {
      final Selector selector = s;
      futures.add(_executor.submit(new Callable<FetchResult>() {
        @Override
        public FetchResult call() throws Exception {
          FetchResult fetchResult = new FetchResult();
          fetchRow(table, selector, fetchResult);
          return fetchResult;
        }
      }));
    }
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.