org.apache.spark.unsafe.Platform.getShort()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中org.apache.spark.unsafe.Platform.getShort()方法的一些代码示例,展示了Platform.getShort()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Platform.getShort()方法的具体详情如下:
包路径:org.apache.spark.unsafe.Platform
类名称:Platform
方法名:getShort

Platform.getShort介绍

暂无

代码示例

代码示例来源:origin: org.apache.spark/spark-sql

@Override
public short getShort(int rowId) {
 if (dictionary == null) {
  return Platform.getShort(null, data + 2L * rowId);
 } else {
  return (short) dictionary.decodeToInt(dictionaryIds.getDictId(rowId));
 }
}

代码示例来源:origin: org.apache.spark/spark-sql_2.10

@Override
public short getShort(int rowId) {
 if (dictionary == null) {
  return Platform.getShort(null, data + 2 * rowId);
 } else {
  return (short) dictionary.decodeToInt(dictionaryIds.getDictId(rowId));
 }
}

代码示例来源:origin: org.apache.spark/spark-sql_2.11

@Override
public short getShort(int rowId) {
 if (dictionary == null) {
  return Platform.getShort(null, data + 2L * rowId);
 } else {
  return (short) dictionary.decodeToInt(dictionaryIds.getDictId(rowId));
 }
}

代码示例来源:origin: io.snappydata/snappydata-store-core

/**
 * Read an short from off-heap memory.
 *
 * @return the short value read.
 */
public static short readShort(final long memOffset) {
 if (UnsafeHolder.littleEndian) {
  return Short.reverseBytes(Platform.getShort(null, memOffset));
 } else {
  return Platform.getShort(null, memOffset);
 }
}

代码示例来源:origin: io.snappydata/snappydata-store-core

public static short readShort(final byte[] bytes, int offset) {
 assert bytes != null;
 if (UnsafeHolder.littleEndian) {
  return Short.reverseBytes(Platform.getShort(bytes,
    offset + Platform.BYTE_ARRAY_OFFSET));
 } else {
  return Platform.getShort(bytes, offset + Platform.BYTE_ARRAY_OFFSET);
 }
}

代码示例来源:origin: org.apache.spark/spark-catalyst_2.10

@Override
public short getShort(int ordinal) {
 assertIndexIsValid(ordinal);
 return Platform.getShort(baseObject, getFieldOffset(ordinal));
}

代码示例来源:origin: org.apache.spark/spark-catalyst_2.11

@Override
public short getShort(int ordinal) {
 assertIndexIsValid(ordinal);
 return Platform.getShort(baseObject, getFieldOffset(ordinal));
}

代码示例来源:origin: org.apache.spark/spark-catalyst

@Override
public short getShort(int ordinal) {
 assertIndexIsValid(ordinal);
 return Platform.getShort(baseObject, getFieldOffset(ordinal));
}

代码示例来源:origin: org.apache.spark/spark-catalyst

@Override
public short getShort(int ordinal) {
 assertIndexIsValid(ordinal);
 return Platform.getShort(baseObject, getElementOffset(ordinal, 2));
}

代码示例来源:origin: org.apache.spark/spark-catalyst_2.11

@Override
public short getShort(int ordinal) {
 assertIndexIsValid(ordinal);
 return Platform.getShort(baseObject, getElementOffset(ordinal, 2));
}

代码示例来源:origin: org.apache.spark/spark-catalyst_2.10

@Override
public short getShort(int ordinal) {
 assertIndexIsValid(ordinal);
 return Platform.getShort(baseObject, getElementOffset(ordinal, 2));
}

代码示例来源:origin: io.snappydata/snappy-spark-sql

@Override
public short getShort(int rowId) {
 if (dictionary == null) {
  return Platform.getShort(null, data + 2 * rowId);
 } else {
  return (short) dictionary.decodeToInt(dictionaryIds.getDictId(rowId));
 }
}

相关文章