Tabnine Logo
ITupleIterator.close
Code IndexAdd Tabnine to your IDE (free)

How to use
close
method
in
org.apache.kylin.metadata.tuple.ITupleIterator

Best Java code snippets using org.apache.kylin.metadata.tuple.ITupleIterator.close (Showing top 13 results out of 315)

origin: apache/kylin

@Override
public void close() {
  for (ITupleIterator i : backends) {
    i.close();
  }
}
origin: apache/kylin

@Override
public void close() {
  if (cursor != null)
    cursor.close();
}
origin: apache/kylin

@Override
public boolean moveNext() {
  try {
    if (cursor == null) {
      cursor = queryStorage();
    }
    if (!cursor.hasNext()) {
      return false;
    }
    ITuple tuple = cursor.next();
    if (tuple == null) {
      return false;
    }
    convertCurrentRow(tuple);
    return true;
  } catch (Exception e) {
    try {
      if (cursor != null) {
        cursor.close();
      }
    } catch (Exception ee) {
      logger.info("Error when closing cursor, ignore it", ee);
    }
    throw e;
  }
}
origin: KylinOLAP/Kylin

@Override
public void close() {
  if (cursor != null) {
    cursor.close();
  }
}
origin: apache/kylin

@Test
public void testListAllTables() throws Exception {
  ITupleIterator it = ITupleIterator.EMPTY_TUPLE_ITERATOR;
  assertFalse(it.hasNext());
  assertNull(it.next());
  it.close(); // for coverage
}
origin: KylinOLAP/Kylin

  @Override
  public void close() {
    context.setTotalScanCount(scanCount);
    segmentIterator.close();
  }
}
origin: KylinOLAP/Kylin

@Override
public ITuple next() {
  ITuple t = null;
  while (hasNext()) {
    if (segmentIterator.hasNext()) {
      t = segmentIterator.next();
      scanCount++;
      break;
    } else {
      segmentIterator.close();
      segmentIterator = segmentIteratorIterator.next();
    }
  }
  return t;
}
origin: KylinOLAP/Kylin

private int search(List<TblColRef> groups, List<FunctionDesc> aggregations, TupleFilter filter, StorageContext context) {
  int count = 0;
  ITupleIterator iterator = null;
  try {
    SQLDigest sqlDigest = new SQLDigest("default.test_kylin_fact", filter, null, Collections.<TblColRef> emptySet(), groups, Collections.<TblColRef> emptySet(), Collections.<TblColRef> emptySet(), aggregations);
    iterator = storageEngine.search(context, sqlDigest);
    while (iterator.hasNext()) {
      ITuple tuple = iterator.next();
      System.out.println("Tuple = " + tuple);
      count++;
    }
  } catch (Exception e) {
    e.printStackTrace();
  } finally {
    if (iterator != null) {
      iterator.close();
    }
  }
  return count;
}
origin: org.apache.kylin/kylin-core-metadata

@Override
public void close() {
  for (ITupleIterator i : backends) {
    i.close();
  }
}
origin: org.apache.kylin/kylin-query

@Override
public void close() {
  if (cursor != null)
    cursor.close();
}
origin: org.apache.kylin/kylin-metadata

@Override
public void close() {
  for (ITupleIterator i : backends) {
    i.close();
  }
}
origin: KylinOLAP/Kylin

@Test
public void testListAllTables() throws Exception {
  ITupleIterator it = ITupleIterator.EMPTY_TUPLE_ITERATOR;
  assertFalse(it.hasNext());
  assertNull(it.next());
  it.close(); // for coverage
}
origin: org.apache.kylin/kylin-query

@Override
public boolean moveNext() {
  try {
    if (cursor == null) {
      cursor = queryStorage();
    }
    if (!cursor.hasNext()) {
      return false;
    }
    ITuple tuple = cursor.next();
    if (tuple == null) {
      return false;
    }
    convertCurrentRow(tuple);
    return true;
  } catch (Exception e) {
    try {
      if (cursor != null) {
        cursor.close();
      }
    } catch (Exception ee) {
      logger.info("Error when closing cursor, ignore it", ee);
    }
    throw e;
  }
}
org.apache.kylin.metadata.tupleITupleIteratorclose

Popular methods of ITupleIterator

  • hasNext
  • next

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JComboBox (javax.swing)
  • Top Sublime Text plugins
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