Tabnine Logo
StorageContext.setThreshold
Code IndexAdd Tabnine to your IDE (free)

How to use
setThreshold
method
in
org.apache.kylin.storage.StorageContext

Best Java code snippets using org.apache.kylin.storage.StorageContext.setThreshold (Showing top 3 results out of 315)

origin: KylinOLAP/Kylin

  private void setConnectionProperties() {
    OptiqConnection conn = (OptiqConnection) optiqContext.getQueryProvider();
    Properties connProps = conn.getProperties();

    String propThreshold = connProps.getProperty(OLAPQuery.PROP_SCAN_THRESHOLD);
    int threshold = Integer.valueOf(propThreshold);
    olapContext.storageContext.setThreshold(threshold);
  }
}
origin: KylinOLAP/Kylin

private void setThreshold(Collection<TblColRef> dimensions, List<RowValueDecoder> valueDecoders, StorageContext context) {
  if (RowValueDecoder.hasMemHungryCountDistinct(valueDecoders) == false) {
    return;
  }
  int rowSizeEst = dimensions.size() * 3;
  for (RowValueDecoder decoder : valueDecoders) {
    MeasureDesc[] measures = decoder.getMeasures();
    BitSet projectionIndex = decoder.getProjectionIndex();
    for (int i = projectionIndex.nextSetBit(0); i >= 0; i = projectionIndex.nextSetBit(i + 1)) {
      FunctionDesc func = measures[i].getFunction();
      rowSizeEst += func.getReturnDataType().getSpaceEstimate();
    }
  }
  long rowEst = MEM_BUDGET_PER_QUERY / rowSizeEst;
  context.setThreshold((int) rowEst);
}
origin: KylinOLAP/Kylin

@Test(expected = ScanOutOfLimitException.class)
@Ignore
public void testScanOutOfLimit() {
  context.setThreshold(1);
  List<TblColRef> groups = buildGroups();
  List<FunctionDesc> aggregations = buildAggregations();
  search(groups, aggregations, null, context);
}
org.apache.kylin.storageStorageContextsetThreshold

Popular methods of StorageContext

  • <init>
  • getCuboid
  • getLimit
  • hasSort
  • isExactAggregation
  • isLimitEnabled
  • setConnUrl
  • setCuboid
  • setExactAggregation
  • applyLimitPushDown
  • enableCoprocessor
  • enableLimit
  • enableCoprocessor,
  • enableLimit,
  • enableStreamAggregate,
  • getAliasMap,
  • getConnUrl,
  • getFinalPushDownLimit,
  • getMapping,
  • getOffset,
  • getProcessedRowCount

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Permission (java.security)
    Legacy security code; do not use.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • IsNull (org.hamcrest.core)
    Is the value null?
  • CodeWhisperer alternatives
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