Tabnine Logo
ResultIterator.close
Code IndexAdd Tabnine 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)

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

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • BoxLayout (javax.swing)
  • JOptionPane (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now