本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例7: serialize
import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(String value, ByteBuffer buffer) {
BytesUtil.writeUTFString(value, buffer);
}
示例8: serialize
import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(IFilterCodeSystem<?> cs, ByteBuffer buffer) {
BytesUtil.writeUTFString(variableName, buffer);
}
示例9: serialize
import org.apache.kylin.common.util.BytesUtil; //导入方法依赖的package包/类
@Override
public void serialize(Object code, ByteBuffer buf) {
BytesUtil.writeUTFString(code.toString(), buf);
}
示例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));
}