Tabnine Logo
GTInfo.getMaxColumnLength
Code IndexAdd Tabnine to your IDE (free)

How to use
getMaxColumnLength
method
in
org.apache.kylin.gridtable.GTInfo

Best Java code snippets using org.apache.kylin.gridtable.GTInfo.getMaxColumnLength (Showing top 19 results out of 315)

origin: apache/kylin

public int getMaxRecordLength() {
  return getMaxColumnLength(colAll);
}
origin: apache/kylin

public GTConvertDecorator(Set<TblColRef> unevaluatableColumnCollector, Map<TblColRef, Integer> colMapping,
    GTInfo info, boolean encodeConstants) {
  this.unevaluatableColumnCollector = unevaluatableColumnCollector;
  this.colMapping = colMapping;
  this.info = info;
  this.useEncodeConstants = encodeConstants;
  buf = ByteBuffer.allocate(info.getMaxColumnLength());
}
origin: apache/kylin

private boolean isMemoryHungry(ImmutableBitSet selectedColBlocks) {
  ImmutableBitSet selectColumns = fullGTInfo.selectColumns(selectedColBlocks);
  return fullGTInfo.getMaxColumnLength(selectColumns) > 1024;
}
origin: apache/kylin

public FilterResultCache(GTInfo info, TupleFilter filter) {
  colsInFilter = collectColumnsInFilter(filter);
  lastValues = new byte[info.getMaxColumnLength(colsInFilter)];
  lastResult = new boolean[1];
}
origin: apache/kylin

/** create a row block, allocate memory, get ready for writing */
public static GTRowBlock allocate(GTInfo info) {
  GTRowBlock b = new GTRowBlock(info);
  byte[] array = new byte[info.getMaxColumnLength(info.primaryKey)];
  b.primaryKey.reset(array, 0, array.length);
  int maxRows = info.isRowBlockEnabled() ? info.rowBlockSize : 1;
  for (int i = 0; i < b.cellBlocks.length; i++) {
    array = new byte[info.getMaxColumnLength(info.colBlocks[i]) * maxRows];
    b.cellBlocks[i].reset(array, 0, array.length);
  }
  return b;
}
origin: apache/kylin

private void setMetricsValues(GTRecord record, Object[] metricsValues) {
  ImmutableBitSet metrics = getMetricsColumns(record);
  if (reuseMetricsSpace == null) {
    reuseMetricsSpace = new ByteArray(record.getInfo().getMaxColumnLength(metrics));
  }
  record.setValues(metrics, reuseMetricsSpace, metricsValues);
}
origin: apache/kylin

private void setMetricsValues(GTRecord record, Object[] metricsValues) {
  ImmutableBitSet metrics = getMetricsColumns(record);
  if (reuseMetricsSpace == null) {
    reuseMetricsSpace = new ByteArray(record.getInfo().getMaxColumnLength(metrics));
  }
  record.setValues(metrics, reuseMetricsSpace, metricsValues);
}
origin: apache/kylin

public static ByteArray enc(GTInfo info, int col, String value) {
  ByteBuffer buf = ByteBuffer.allocate(info.getMaxColumnLength());
  info.getCodeSystem().encodeColumnValue(col, value, buf);
  return ByteArray.copyOf(buf.array(), buf.arrayOffset(), buf.position());
}
origin: apache/kylin

public BufferedMeasureCodec createMeasureCodec() {
  DataType[] metricTypes = new DataType[aggrMetrics.trueBitCount()];
  for (int i = 0; i < metricTypes.length; i++) {
    metricTypes[i] = info.getColumnType(aggrMetrics.trueBitAt(i));
  }
  BufferedMeasureCodec codec = new BufferedMeasureCodec(metricTypes);
  codec.setBufferSize(info.getMaxColumnLength(aggrMetrics));
  return codec;
}
origin: apache/kylin

  private ByteArray encodeTime(long ts, int index, int roundingFlag) {
    String value;
    DataType partitionColType = info.getColumnType(index);
    if (partitionColType.isDate()) {
      value = DateFormat.formatToDateStr(ts);
    } else if (partitionColType.isTimeFamily()) {
      value = DateFormat.formatToTimeWithoutMilliStr(ts);
    } else if (partitionColType.isStringFamily() || partitionColType.isIntegerFamily()) {//integer like 20160101
      String partitionDateFormat = segment.getModel().getPartitionDesc().getPartitionDateFormat();
      if (StringUtils.isEmpty(partitionDateFormat)) {
        value = "" + ts;
      } else {
        value = DateFormat.formatToDateStr(ts, partitionDateFormat);
      }
    } else {
      throw new RuntimeException("Type " + partitionColType + " is not valid partition column type");
    }

    ByteBuffer buffer = ByteBuffer.allocate(info.getMaxColumnLength());
    info.getCodeSystem().encodeColumnValue(index, value, roundingFlag, buffer);

    return ByteArray.copyOf(buffer.array(), 0, buffer.position());
  }
}
origin: org.apache.kylin/kylin-core-cube

public int getMaxRecordLength() {
  return getMaxColumnLength(colAll);
}
origin: org.apache.kylin/kylin-core-cube

public GTConvertDecorator(Set<TblColRef> unevaluatableColumnCollector, Map<TblColRef, Integer> colMapping,
    GTInfo info, boolean encodeConstants) {
  this.unevaluatableColumnCollector = unevaluatableColumnCollector;
  this.colMapping = colMapping;
  this.info = info;
  this.useEncodeConstants = encodeConstants;
  buf = ByteBuffer.allocate(info.getMaxColumnLength());
}
origin: org.apache.kylin/kylin-core-cube

public FilterResultCache(GTInfo info, TupleFilter filter) {
  colsInFilter = collectColumnsInFilter(filter);
  lastValues = new byte[info.getMaxColumnLength(colsInFilter)];
  lastResult = new boolean[1];
}
origin: org.apache.kylin/kylin-storage-hbase

private boolean isMemoryHungry(ImmutableBitSet selectedColBlocks) {
  ImmutableBitSet selectColumns = fullGTInfo.selectColumns(selectedColBlocks);
  return fullGTInfo.getMaxColumnLength(selectColumns) > 1024;
}
origin: org.apache.kylin/kylin-core-cube

/** create a row block, allocate memory, get ready for writing */
public static GTRowBlock allocate(GTInfo info) {
  GTRowBlock b = new GTRowBlock(info);
  byte[] array = new byte[info.getMaxColumnLength(info.primaryKey)];
  b.primaryKey.reset(array, 0, array.length);
  int maxRows = info.isRowBlockEnabled() ? info.rowBlockSize : 1;
  for (int i = 0; i < b.cellBlocks.length; i++) {
    array = new byte[info.getMaxColumnLength(info.colBlocks[i]) * maxRows];
    b.cellBlocks[i].reset(array, 0, array.length);
  }
  return b;
}
origin: org.apache.kylin/kylin-core-cube

private void setMetricsValues(GTRecord record, Object[] metricsValues) {
  ImmutableBitSet metrics = getMetricsColumns(record);
  if (reuseMetricsSpace == null) {
    reuseMetricsSpace = new ByteArray(record.getInfo().getMaxColumnLength(metrics));
  }
  record.setValues(metrics, reuseMetricsSpace, metricsValues);
}
origin: org.apache.kylin/kylin-core-cube

private void setMetricsValues(GTRecord record, Object[] metricsValues) {
  ImmutableBitSet metrics = getMetricsColumns(record);
  if (reuseMetricsSpace == null) {
    reuseMetricsSpace = new ByteArray(record.getInfo().getMaxColumnLength(metrics));
  }
  record.setValues(metrics, reuseMetricsSpace, metricsValues);
}
origin: org.apache.kylin/kylin-core-cube

public BufferedMeasureCodec createMeasureCodec() {
  DataType[] metricTypes = new DataType[aggrMetrics.trueBitCount()];
  for (int i = 0; i < metricTypes.length; i++) {
    metricTypes[i] = info.getColumnType(aggrMetrics.trueBitAt(i));
  }
  BufferedMeasureCodec codec = new BufferedMeasureCodec(metricTypes);
  codec.setBufferSize(info.getMaxColumnLength(aggrMetrics));
  return codec;
}
origin: org.apache.kylin/kylin-core-cube

  private ByteArray encodeTime(long ts, int index, int roundingFlag) {
    String value;
    DataType partitionColType = info.getColumnType(index);
    if (partitionColType.isDate()) {
      value = DateFormat.formatToDateStr(ts);
    } else if (partitionColType.isTimeFamily()) {
      value = DateFormat.formatToTimeWithoutMilliStr(ts);
    } else if (partitionColType.isStringFamily() || partitionColType.isIntegerFamily()) {//integer like 20160101
      String partitionDateFormat = segment.getModel().getPartitionDesc().getPartitionDateFormat();
      if (StringUtils.isEmpty(partitionDateFormat)) {
        value = "" + ts;
      } else {
        value = DateFormat.formatToDateStr(ts, partitionDateFormat);
      }
    } else {
      throw new RuntimeException("Type " + partitionColType + " is not valid partition column type");
    }

    ByteBuffer buffer = ByteBuffer.allocate(info.getMaxColumnLength());
    info.getCodeSystem().encodeColumnValue(index, value, roundingFlag, buffer);

    return ByteArray.copyOf(buffer.array(), 0, buffer.position());
  }
}
org.apache.kylin.gridtableGTInfogetMaxColumnLength

Popular methods of GTInfo

  • getPrimaryKey
  • builder
  • colRef
  • getCodeSystem
  • getMaxRecordLength
  • <init>
  • getAllColumns
  • getColumnBlock
  • getColumnBlockCount
  • getColumnCount
  • getColumnType
  • getDynamicDims
  • getColumnType,
  • getDynamicDims,
  • getRowBlockSize,
  • getTableName,
  • isRowBlockEnabled,
  • selectColumnBlocks,
  • selectColumns,
  • validate,
  • validateColRef

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top plugins for Android Studio
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