Tabnine Logo
EstimateProvider.getEstimatedNumRecords
Code IndexAdd Tabnine to your IDE (free)

How to use
getEstimatedNumRecords
method
in
org.apache.flink.optimizer.dag.EstimateProvider

Best Java code snippets using org.apache.flink.optimizer.dag.EstimateProvider.getEstimatedNumRecords (Showing top 5 results out of 315)

origin: apache/flink

@Override
public void addStreamedNestedLoopsCosts(EstimateProvider outerSide, EstimateProvider innerSide, long bufferSize, Costs costs, int costWeight) {
  long is = innerSide.getEstimatedOutputSize(); 
  long oc = outerSide.getEstimatedNumRecords();
  
  if (is > 0 && oc >= 0) {
    // costs, if the inner side cannot be cached
    if (is > bufferSize) {
      costs.addDiskCost(oc * is);
    }
    costs.addCpuCost((long) (oc * is * MATERIALIZATION_CPU_FACTOR));
  } else {
    costs.setDiskCost(Costs.UNKNOWN);
    costs.setCpuCost(Costs.UNKNOWN);
  }
  
  // hack: assume 100k loops (should be expensive enough)
  costs.addHeuristicDiskCost(HEURISTIC_COST_BASE * 100000);
  costs.addHeuristicCpuCost((long) (HEURISTIC_COST_BASE * 100000 * MATERIALIZATION_CPU_FACTOR));
  costs.multiplyWith(costWeight);
}
origin: org.apache.flink/flink-optimizer_2.10

@Override
public void addStreamedNestedLoopsCosts(EstimateProvider outerSide, EstimateProvider innerSide, long bufferSize, Costs costs, int costWeight) {
  long is = innerSide.getEstimatedOutputSize(); 
  long oc = outerSide.getEstimatedNumRecords();
  
  if (is > 0 && oc >= 0) {
    // costs, if the inner side cannot be cached
    if (is > bufferSize) {
      costs.addDiskCost(oc * is);
    }
    costs.addCpuCost((long) (oc * is * MATERIALIZATION_CPU_FACTOR));
  } else {
    costs.setDiskCost(Costs.UNKNOWN);
    costs.setCpuCost(Costs.UNKNOWN);
  }
  
  // hack: assume 100k loops (should be expensive enough)
  costs.addHeuristicDiskCost(HEURISTIC_COST_BASE * 100000);
  costs.addHeuristicCpuCost((long) (HEURISTIC_COST_BASE * 100000 * MATERIALIZATION_CPU_FACTOR));
  costs.multiplyWith(costWeight);
}
origin: org.apache.flink/flink-optimizer_2.11

@Override
public void addStreamedNestedLoopsCosts(EstimateProvider outerSide, EstimateProvider innerSide, long bufferSize, Costs costs, int costWeight) {
  long is = innerSide.getEstimatedOutputSize(); 
  long oc = outerSide.getEstimatedNumRecords();
  
  if (is > 0 && oc >= 0) {
    // costs, if the inner side cannot be cached
    if (is > bufferSize) {
      costs.addDiskCost(oc * is);
    }
    costs.addCpuCost((long) (oc * is * MATERIALIZATION_CPU_FACTOR));
  } else {
    costs.setDiskCost(Costs.UNKNOWN);
    costs.setCpuCost(Costs.UNKNOWN);
  }
  
  // hack: assume 100k loops (should be expensive enough)
  costs.addHeuristicDiskCost(HEURISTIC_COST_BASE * 100000);
  costs.addHeuristicCpuCost((long) (HEURISTIC_COST_BASE * 100000 * MATERIALIZATION_CPU_FACTOR));
  costs.multiplyWith(costWeight);
}
origin: org.apache.flink/flink-optimizer

@Override
public void addStreamedNestedLoopsCosts(EstimateProvider outerSide, EstimateProvider innerSide, long bufferSize, Costs costs, int costWeight) {
  long is = innerSide.getEstimatedOutputSize(); 
  long oc = outerSide.getEstimatedNumRecords();
  
  if (is > 0 && oc >= 0) {
    // costs, if the inner side cannot be cached
    if (is > bufferSize) {
      costs.addDiskCost(oc * is);
    }
    costs.addCpuCost((long) (oc * is * MATERIALIZATION_CPU_FACTOR));
  } else {
    costs.setDiskCost(Costs.UNKNOWN);
    costs.setCpuCost(Costs.UNKNOWN);
  }
  
  // hack: assume 100k loops (should be expensive enough)
  costs.addHeuristicDiskCost(HEURISTIC_COST_BASE * 100000);
  costs.addHeuristicCpuCost((long) (HEURISTIC_COST_BASE * 100000 * MATERIALIZATION_CPU_FACTOR));
  costs.multiplyWith(costWeight);
}
origin: com.alibaba.blink/flink-optimizer

@Override
public void addStreamedNestedLoopsCosts(EstimateProvider outerSide, EstimateProvider innerSide, long bufferSize, Costs costs, int costWeight) {
  long is = innerSide.getEstimatedOutputSize(); 
  long oc = outerSide.getEstimatedNumRecords();
  
  if (is > 0 && oc >= 0) {
    // costs, if the inner side cannot be cached
    if (is > bufferSize) {
      costs.addDiskCost(oc * is);
    }
    costs.addCpuCost((long) (oc * is * MATERIALIZATION_CPU_FACTOR));
  } else {
    costs.setDiskCost(Costs.UNKNOWN);
    costs.setCpuCost(Costs.UNKNOWN);
  }
  
  // hack: assume 100k loops (should be expensive enough)
  costs.addHeuristicDiskCost(HEURISTIC_COST_BASE * 100000);
  costs.addHeuristicCpuCost((long) (HEURISTIC_COST_BASE * 100000 * MATERIALIZATION_CPU_FACTOR));
  costs.multiplyWith(costWeight);
}
org.apache.flink.optimizer.dagEstimateProvidergetEstimatedNumRecords

Javadoc

Gets the estimated number of records in the output of this node.

Popular methods of EstimateProvider

  • getEstimatedOutputSize
    Gets the estimated output size from this node.

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • String (java.lang)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JButton (javax.swing)
  • Best plugins for Eclipse
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