当前位置: 首页>>代码示例>>Java>>正文


Java BytesUtil.writeUTFString方法代码示例

本文整理汇总了Java中org.apache.kylin.common.util.BytesUtil.writeUTFString方法的典型用法代码示例。如果您正苦于以下问题:Java BytesUtil.writeUTFString方法的具体用法?Java BytesUtil.writeUTFString怎么用?Java BytesUtil.writeUTFString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.kylin.common.util.BytesUtil的用法示例。


在下文中一共展示了BytesUtil.writeUTFString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(String value, ByteBuffer out) {
    int start = out.position();

    BytesUtil.writeUTFString(value, out);

    if (out.position() - start > maxLength)
        throw new IllegalArgumentException("'" + value + "' exceeds the expected length for type " + type);
}
 
开发者ID:apache,项目名称:kylin,代码行数:10,代码来源:StringSerializer.java

示例2: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(DataType value, ByteBuffer out) {
    BytesUtil.writeUTFString(value.name, out);
    BytesUtil.writeVInt(value.precision, out);
    BytesUtil.writeVInt(value.scale, out);

}
 
开发者ID:apache,项目名称:kylin,代码行数:8,代码来源:DataType.java

示例3: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void serialize(IFilterCodeSystem cs, ByteBuffer buffer) {
    BytesUtil.writeUTFString(filterTableName, buffer);
    BytesUtil.writeUTFString(filterTableResourceIdentifier, buffer);
    BytesUtil.writeUTFString(filterTableType.toString(), buffer);
    BytesUtil.writeUTFString(String.valueOf(reverse), buffer);
}
 
开发者ID:apache,项目名称:kylin,代码行数:9,代码来源:MassInTupleFilter.java

示例4: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void serialize(IFilterCodeSystem cs, ByteBuffer buffer) {
    int size = this.dynamicVariables.size();
    BytesUtil.writeVInt(size, buffer);
    for (Map.Entry<String, Object> entry : this.dynamicVariables.entrySet()) {
        BytesUtil.writeUTFString(entry.getKey(), buffer);
        cs.serialize(entry.getValue(), buffer);
    }
}
 
开发者ID:apache,项目名称:kylin,代码行数:11,代码来源:CompareTupleFilter.java

示例5: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(IFilterCodeSystem<?> cs, ByteBuffer buffer) {
    TableRef tableRef = columnRef.getTableRef();
    
    if (tableRef == null) {
        // un-qualified column
        String table = columnRef.getTable();
        BytesUtil.writeUTFString(table, buffer);

        String columnId = columnRef.getColumnDesc().getId();
        BytesUtil.writeUTFString(columnId, buffer);

        String columnName = columnRef.getName();
        BytesUtil.writeUTFString(columnName, buffer);

        String dataType = columnRef.getDatatype();
        BytesUtil.writeUTFString(dataType, buffer);
    } else {
        // qualified column (from model)
        BytesUtil.writeUTFString(_QUALIFIED_, buffer);
        
        String model = tableRef.getModel().getName();
        BytesUtil.writeUTFString(model, buffer);
        
        String alias = tableRef.getAlias();
        BytesUtil.writeUTFString(alias, buffer);
        
        String col = columnRef.getName();
        BytesUtil.writeUTFString(col, buffer);
    }
}
 
开发者ID:apache,项目名称:kylin,代码行数:32,代码来源:ColumnTupleFilter.java

示例6: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(GTScanRequest value, ByteBuffer out) {
    final int serialLevel = KylinConfig.getInstanceFromEnv().getGTScanRequestSerializationLevel();

    GTInfo.serializer.serialize(value.info, out);

    BytesUtil.writeVInt(value.ranges.size(), out);
    for (GTScanRange range : value.ranges) {
        serializeGTRecord(range.pkStart, out);
        serializeGTRecord(range.pkEnd, out);
        BytesUtil.writeVInt(range.fuzzyKeys.size(), out);
        for (GTRecord f : range.fuzzyKeys) {
            serializeGTRecord(f, out);
        }
    }

    ImmutableBitSet.serializer.serialize(value.columns, out);
    BytesUtil.writeByteArray(GTUtil.serializeGTFilter(value.filterPushDown, value.info), out);

    if (serialLevel >= SERIAL_1_HAVING_FILTER) {
        BytesUtil.writeByteArray(
                TupleFilterSerializer.serialize(value.havingFilterPushDown, StringCodeSystem.INSTANCE), out);
    }

    ImmutableBitSet.serializer.serialize(value.aggrGroupBy, out);
    ImmutableBitSet.serializer.serialize(value.aggrMetrics, out);
    BytesUtil.writeAsciiStringArray(value.aggrMetricsFuncs, out);
    BytesUtil.writeVInt(value.allowStorageAggregation ? 1 : 0, out);
    out.putDouble(value.aggCacheMemThreshold);
    BytesUtil.writeUTFString(value.getStorageLimitLevel().name(), out);
    BytesUtil.writeVInt(value.storageScanRowNumThreshold, out);
    BytesUtil.writeVInt(value.storagePushDownLimit, out);
    BytesUtil.writeVLong(value.startTime, out);
    BytesUtil.writeVLong(value.timeout, out);
    BytesUtil.writeUTFString(value.storageBehavior, out);
}
 
开发者ID:apache,项目名称:kylin,代码行数:37,代码来源:GTScanRequest.java

示例7: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(String value, ByteBuffer buffer) {
    BytesUtil.writeUTFString(value, buffer);
}
 
开发者ID:apache,项目名称:kylin,代码行数:5,代码来源:StringCodeSystem.java

示例8: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(IFilterCodeSystem<?> cs, ByteBuffer buffer) {
    BytesUtil.writeUTFString(variableName, buffer);
}
 
开发者ID:apache,项目名称:kylin,代码行数:5,代码来源:DynamicTupleFilter.java

示例9: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(Object code, ByteBuffer buf) {
    BytesUtil.writeUTFString(code.toString(), buf);
}
 
开发者ID:apache,项目名称:kylin,代码行数:5,代码来源:FilterCodeSystemFactory.java

示例10: serialize

import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(IFilterCodeSystem<?> cs, ByteBuffer buffer) {
    BytesUtil.writeUTFString(name, buffer);
    buffer.put((byte) (isReversed ? 1 : 0));
}
 
开发者ID:apache,项目名称:kylin,代码行数:6,代码来源:BuiltInFunctionTupleFilter.java


注:本文中的org.apache.kylin.common.util.BytesUtil.writeUTFString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。