本文整理了Java中org.apache.spark.unsafe.Platform.getShort()
方法的一些代码示例,展示了Platform.getShort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Platform.getShort()
方法的具体详情如下:
包路径:org.apache.spark.unsafe.Platform
类名称: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));
}
}
内容来源于网络,如有侵权,请联系作者删除!