Examples of ScanResult


Examples of com.amazonaws.services.dynamodb.model.ScanResult

    public <T> PaginatedScanList<T> scan(Class<T> clazz, DynamoDBScanExpression scanExpression, DynamoDBMapperConfig config) {
        config = mergeConfig(config);

        ScanRequest scanRequest = createScanRequestFromExpression(clazz, scanExpression, config);

        ScanResult scanResult = db.scan(applyUserAgent(scanRequest));
        return new PaginatedScanList<T>(this, clazz, db, scanRequest, scanResult);
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ScanResult

    public <T> PaginatedScanList<T> scan(Class<T> clazz, DynamoDBScanExpression scanExpression, DynamoDBMapperConfig config) {
        config = mergeConfig(config);

        ScanRequest scanRequest = createScanRequestFromExpression(clazz, scanExpression, config);

        ScanResult scanResult = db.scan(applyUserAgent(scanRequest));
        return new PaginatedScanList<T>(this, clazz, db, scanRequest, scanResult, config.getPaginationLoadingStrategy());
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ScanResult

    public <T> ScanResultPage<T> scanPage(Class<T> clazz, DynamoDBScanExpression scanExpression, DynamoDBMapperConfig config) {
        config = mergeConfig(config);

        ScanRequest scanRequest = createScanRequestFromExpression(clazz, scanExpression, config);

        ScanResult scanResult = db.scan(applyUserAgent(scanRequest));
        ScanResultPage<T> result = new ScanResultPage<T>();
        result.setResults(marshallIntoObjects(clazz, scanResult.getItems()));
        result.setLastEvaluatedKey(scanResult.getLastEvaluatedKey());

        return result;
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ScanResult

        ScanRequest scanRequest = createScanRequestFromExpression(clazz, scanExpression, config);
        scanRequest.setSelect(Select.COUNT);

        // Count scans can also be truncated for large datasets
        int count = 0;
        ScanResult scanResult = null;
        do {
            scanResult = db.scan(applyUserAgent(scanRequest));
            count += scanResult.getCount();
            scanRequest.setExclusiveStartKey(scanResult.getLastEvaluatedKey());
        } while (scanResult.getLastEvaluatedKey() != null);

        return count;
    }
View Full Code Here

Examples of org.apache.accumulo.core.data.thrift.ScanResult

    TInfo tinfo = Tracer.traceInfo();
    TabletClientService.Client client = ThriftUtil.getTServerClient(loc.tablet_location, conf);
   
    String old = Thread.currentThread().getName();
    try {
      ScanResult sr;
     
      if (scanState.prevLoc != null && !scanState.prevLoc.equals(loc))
        scanState.scanID = null;
     
      scanState.prevLoc = loc;
View Full Code Here

Examples of org.apache.accumulo.core.data.thrift.ScanResult

      scanSession.scanner = tablet.createScanner(new Range(range), batchSize, scanSession.columnSet, scanSession.auths, ssiList, ssio, isolated,
          scanSession.interruptFlag);
     
      long sid = sessionManager.createSession(scanSession, true);
     
      ScanResult scanResult;
      try {
        scanResult = continueScan(tinfo, sid, scanSession);
      } catch (NoSuchScanIDException e) {
        log.error("The impossible happened", e);
        throw new RuntimeException();
View Full Code Here

Examples of org.apache.accumulo.core.data.thrift.ScanResult

          throw new NoSuchScanIDException();
      } catch (TimeoutException e) {
        List<TKeyValue> param = Collections.emptyList();
        long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
        sessionManager.removeIfNotAccessed(scanID, timeout);
        return new ScanResult(param, true);
      } catch (Throwable t) {
        sessionManager.removeSession(scanID);
        log.warn("Failed to get next batch", t);
        throw new RuntimeException(t);
      }
     
      ScanResult scanResult = new ScanResult(Key.compress(bresult.results), bresult.more);
     
      scanSession.entriesReturned += scanResult.results.size();
     
      scanSession.batchCount++;
     
View Full Code Here

Examples of org.apache.accumulo.core.data.thrift.ScanResult

   
    TabletClientService.Iface client = ThriftUtil.getTServerClient(loc.tablet_location, conf);
   
    String old = Thread.currentThread().getName();
    try {
      ScanResult sr;
     
      if (scanState.prevLoc != null && !scanState.prevLoc.equals(loc))
        scanState.scanID = null;
     
      scanState.prevLoc = loc;
View Full Code Here

Examples of org.apache.accumulo.core.data.thrift.ScanResult

      scanSession.scanner = tablet.createScanner(new Range(range), batchSize, scanSession.columnSet, new Authorizations(authorizations), ssiList, ssio,
          isolated, scanSession.interruptFlag);

      long sid = sessionManager.createSession(scanSession, true);

      ScanResult scanResult;
      try {
        scanResult = continueScan(tinfo, sid, scanSession);
      } catch (NoSuchScanIDException e) {
        log.error("The impossible happened", e);
        throw new RuntimeException();
View Full Code Here

Examples of org.apache.accumulo.core.data.thrift.ScanResult

          throw new NoSuchScanIDException();
      } catch (TimeoutException e) {
        List<TKeyValue> param = Collections.emptyList();
        long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
        sessionManager.removeIfNotAccessed(scanID, timeout);
        return new ScanResult(param, true);
      } catch (Throwable t) {
        sessionManager.removeSession(scanID);
        log.warn("Failed to get next batch", t);
        throw new RuntimeException(t);
      }

      ScanResult scanResult = new ScanResult(Key.compress(bresult.results), bresult.more);

      scanSession.entriesReturned += scanResult.results.size();

      scanSession.batchCount++;
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.