Codota Logo
ResultIterator.close
Code IndexAdd Codota to your IDE (free)

How to use
close
method
in
org.apache.phoenix.iterate.ResultIterator

Best Java code snippets using org.apache.phoenix.iterate.ResultIterator.close (Showing top 20 results out of 315)

  • Common ways to obtain ResultIterator
private void myMethod () {
ResultIterator r =
  • Codota IconQueryPlan plan;plan.iterator()
  • Codota IconQueryPlan queryPlan;queryPlan.iterator(MapReduceParallelScanGrouper.getInstance())
  • Codota IconList concatIterators;ConcatResultIterator.newIterator(concatIterators)
  • Smart code suggestions by Codota
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  delegate.close();
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  if (!closed) {
    closed = true;
    iter.close();
    if (rhsIter != null) {
      rhsIter.close();
    }
  }
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  delegate.close();
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  delegate.close();
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  iterator.close();
}
origin: apache/phoenix

@Override
public void close() throws IOException {
  if(resultIterator != null) {
    try {
      resultIterator.close();
  } catch (SQLException e) {
    LOG.error(" Error closing resultset.");
    throw new RuntimeException(e);
  }
  }
}
origin: apache/phoenix

@Override
public void close() throws IOException {
  if (LOG.isInfoEnabled()) {
    LOG.info("Read Count : " + readCount);
  }
  if (resultIterator != null) {
    try {
      resultIterator.close();
    } catch (SQLException e) {
      LOG.error(" Error closing resultset.");
      throw new RuntimeException(e);
    }
  }
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  keyIterator = null;
  keyList = null;
  hash = null;
  try {
    memoryChunk.close();
  } finally {
    resultIterator.close();
  }
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
 closed = true; // ok to say closed even if the below code throws an exception
 try {
  scanIterator.close();
  fs.delete(this.restoreDir, true);
 } catch (IOException e) {
  throw ServerUtil.parseServerException(e);
 } finally {
  scanIterator = UNINITIALIZED_SCANNER;
 }
}
origin: apache/phoenix

  private void getEstimates() throws SQLException {
    getEstimatesCalled = true;
    // Initialize a dummy iterator to get the estimates based on stats.
    ResultIterator iterator = iterator();
    iterator.close();
  }
}
origin: apache/phoenix

private static SQLException closeIterators(ResultIterator lhsIterator, ResultIterator rhsIterator) {
  SQLException e = null;
  try {
    lhsIterator.close();
  } catch (Throwable e1) {
    e = e1 instanceof SQLException ? (SQLException)e1 : new SQLException(e1);
  }
  try {
    rhsIterator.close();
  } catch (Throwable e2) {
    SQLException e22 = e2 instanceof SQLException ? (SQLException)e2 : new SQLException(e2);
    if (e != null) {
      e.setNextException(e22);
    } else {
      e = e22;
    }
  }
  return e;
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  try {
    renewLeaseLock.lock();
    closed = true; // ok to say closed even if the below code throws an exception
    try {
      scanIterator.close();
    } finally {
      try {
        scanIterator = UNINITIALIZED_SCANNER;
        htable.close();
      } catch (IOException e) {
        throw ServerUtil.parseServerException(e);
      }
    }
  } finally {
    renewLeaseLock.unlock();
  }
}
origin: apache/phoenix

@Override
public Tuple next() throws SQLException {
 while (true) {
  if (!initSnapshotScanner())
   return null;
  try {
   lastTuple = scanIterator.next();
   if (lastTuple != null) {
    ImmutableBytesWritable ptr = new ImmutableBytesWritable();
    lastTuple.getKey(ptr);
    return lastTuple;
   }
  } finally {
   if (lastTuple == null) {
    scanIterator.close();
    scanIterator = UNINITIALIZED_SCANNER;
   }
  }
 }
}
origin: apache/phoenix

rhsCurrent = rhsIter.next();
if (rhsCurrent == null) {
  rhsIter.close();
  rhsIter = null;
} else if (isSingleValueOnly) {
if ((rhsCurrent == null && (joinType == JoinType.Inner || joinType == JoinType.Semi))
    || (rhsCurrent != null && joinType == JoinType.Anti)) {
  rhsIter.close();
  rhsIter = null;
rhsIter.close();
rhsIter = null;
origin: apache/phoenix

@Override
public ExplainPlan getExplainPlan() throws SQLException {
  if (context.getScanRanges() == ScanRanges.NOTHING) {
    return new ExplainPlan(Collections.singletonList("DEGENERATE SCAN OVER " + getTableRef().getTable().getName().getString()));
  }
  ResultIterator iterator = iterator();
  ExplainPlan explainPlan = new ExplainPlan(getPlanSteps(iterator));
  iterator.close();
  return explainPlan;
}
origin: apache/phoenix

@Override
public void close() throws SQLException {
  if (isClosed) { return; }
  try {
    scanner.close();
  } finally {
    isClosed = true;
    statement.getResultSets().remove(this);
    overAllQueryMetrics.endQuery();
    overAllQueryMetrics.stopResultSetWatch();
    if (!queryLogger.isSynced()) {
      if(this.exception==null){
        queryLogger.log(QueryLogInfo.QUERY_STATUS_I,QueryStatus.COMPLETED.toString());
      }
      queryLogger.log(QueryLogInfo.NO_OF_RESULTS_ITERATED_I, count);
      if (queryLogger.isDebugEnabled()) {
        queryLogger.log(QueryLogInfo.SCAN_METRICS_JSON_I,
            readMetricsQueue.getScanMetricsHolderList().toString());
        readMetricsQueue.getScanMetricsHolderList().clear();
      }
      // if not already synced , like closing before result set exhausted
      queryLogger.sync(getReadMetrics(), getOverAllRequestReadMetrics());
    }
  }
}
origin: apache/phoenix

public static void assertResults(ResultIterator scanner, AssertingIterator iterator) throws Exception {
  try {
    for (Tuple result = scanner.next(); result != null; result = scanner.next()) {
      iterator.assertNext(result);
    }
    iterator.assertDone();
  } finally {
    scanner.close();
  }
}

origin: apache/phoenix

  return mutationState;
} finally {
  iterator.close();
origin: apache/phoenix

iterator.close();
origin: apache/phoenix

iterator.close();
org.apache.phoenix.iterateResultIteratorclose

Popular methods of ResultIterator

  • explain
  • next
    Grab the next row's worth of values. The iterator will return a Tuple.

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • String (java.lang)
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now