Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.UnknownScannerException


    @Override
    public synchronized boolean next(List<KeyValue> outResults, int limit,
        String metric) throws IOException {
      if (this.filterClosed) {
        throw new UnknownScannerException("Scanner was closed (timed out?) " +
            "after we renewed it. Could be caused by a very slow scanner " +
            "or a lengthy garbage collection");
      }
      startRegionOperation();
      readRequestsCount.increment();
View Full Code Here


    @Override
    public synchronized boolean next(List<KeyValue> outResults, int limit,
        String metric) throws IOException {
      if (this.filterClosed) {
        throw new UnknownScannerException("Scanner was closed (timed out?) " +
            "after we renewed it. Could be caused by a very slow scanner " +
            "or a lengthy garbage collection");
      }
      startRegionOperation();
      readRequestsCount.increment();
View Full Code Here

  public Result[] next(final long scannerId, int nbRows) throws IOException {
    String scannerName = String.valueOf(scannerId);
    RegionScanner s = this.scanners.get(scannerName);
    if (s == null) {
      LOG.info("Client tried to access missing scanner " + scannerName);
      throw new UnknownScannerException("Name: " + scannerName);
    }
    try {
      checkOpen();
    } catch (IOException e) {
      // If checkOpen failed, server not running or filesystem gone,
      // cancel this lease; filesystem is gone or we're closing or something.
      try {
        this.leases.cancelLease(scannerName);
      } catch (LeaseException le) {
        LOG.info("Server shutting down and client tried to access missing scanner " +
          scannerName);
      }
      throw e;
    }
    Leases.Lease lease = null;
    try {
      // Remove lease while its being processed in server; protects against case
      // where processing of request takes > lease expiration time.
      try {
        lease = this.leases.removeLease(scannerName);
      } catch (LeaseException le) {
        // What it really means is that there's no such scanner.
        LOG.info("Client tried to access missing scanner " + scannerName + " (no lease)");
        throw new UnknownScannerException("No lease for " + scannerName + ": " + le.getMessage());
      }
      List<Result> results = new ArrayList<Result>(nbRows);
      long currentScanResultSize = 0;
      List<KeyValue> values = new ArrayList<KeyValue>();
View Full Code Here

    ArrayList<RowResult> resultSets = new ArrayList<RowResult>();
    try {
      String scannerName = String.valueOf(scannerId);
      InternalScanner s = scanners.get(scannerName);
      if (s == null) {
        throw new UnknownScannerException("Name: " + scannerName);
      }
      this.leases.renewLease(scannerName);
      for(int i = 0; i < nbRows; i++) {
        requestCount.incrementAndGet();
        // Collect values to be returned here
View Full Code Here

      InternalScanner s = null;
      synchronized(scanners) {
        s = scanners.remove(scannerName);
      }
      if(s == null) {
        throw new UnknownScannerException(scannerName);
      }
      s.close();
      this.leases.cancelLease(scannerName);
    } catch (Throwable t) {
      throw convertThrowableToIOE(cleanup(t));
View Full Code Here

      }
      if (request.hasScannerId()) {
        rsh = scanners.get(scannerName);
        if (rsh == null) {
          LOG.info("Client tried to access missing scanner " + scannerName);
          throw new UnknownScannerException(
            "Name: " + scannerName + ", already closed?");
        }
        scanner = rsh.s;
        HRegionInfo hri = scanner.getRegionInfo();
        region = regionServer.getRegion(hri.getRegionName());
View Full Code Here

    }

    @Override
    public synchronized boolean next(List<Cell> outResults, int limit) throws IOException {
      if (this.filterClosed) {
        throw new UnknownScannerException("Scanner was closed (timed out?) " +
            "after we renewed it. Could be caused by a very slow scanner " +
            "or a lengthy garbage collection");
      }
      startRegionOperation(Operation.SCAN);
      readRequestsCount.increment();
View Full Code Here

      }
      if (request.hasScannerId()) {
        rsh = scanners.get(scannerName);
        if (rsh == null) {
          LOG.info("Client tried to access missing scanner " + scannerName);
          throw new UnknownScannerException(
            "Name: " + scannerName + ", already closed?");
        }
        scanner = rsh.s;
        HRegionInfo hri = scanner.getRegionInfo();
        region = getRegion(hri.getRegionName());
View Full Code Here

    }

    @Override
    public synchronized boolean next(List<Cell> outResults, int limit) throws IOException {
      if (this.filterClosed) {
        throw new UnknownScannerException("Scanner was closed (timed out?) " +
            "after we renewed it. Could be caused by a very slow scanner " +
            "or a lengthy garbage collection");
      }
      startRegionOperation(Operation.SCAN);
      readRequestsCount.increment();
View Full Code Here

  public Result[] next(final long scannerId, int nbRows) throws IOException {
    try {
      String scannerName = String.valueOf(scannerId);
      InternalScanner s = this.scanners.get(scannerName);
      if (s == null) {
        throw new UnknownScannerException("Name: " + scannerName);
      }
      try {
        checkOpen();
      } catch (IOException e) {
        // If checkOpen failed, server not running or filesystem gone,
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.UnknownScannerException

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.