本文整理了Java中org.apache.flink.api.common.typeinfo.Types.PRIMITIVE_ARRAY()
方法的一些代码示例,展示了Types.PRIMITIVE_ARRAY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Types.PRIMITIVE_ARRAY()
方法的具体详情如下:
包路径:org.apache.flink.api.common.typeinfo.Types
类名称:Types
方法名:PRIMITIVE_ARRAY
[英]Returns type information for Java arrays of primitive type (such as byte[]
). The array must not be null.
[中]返回基本类型的Java数组的类型信息(例如byte[]
)。数组不能为空。
代码示例来源:origin: apache/flink
private static TypeInformation<?> convertStringEncoding(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + CONTENT_ENCODING + "' property in node: " + location);
}
// "If the instance value is a string, this property defines that the string SHOULD
// be interpreted as binary data and decoded using the encoding named by this property."
switch (node.asText()) {
case CONTENT_ENCODING_BASE64:
return Types.PRIMITIVE_ARRAY(Types.BYTE);
default:
// we fail hard here:
// this gives us the chance to support more encodings in the future without problems
// of backwards compatibility
throw new IllegalArgumentException("Invalid encoding '" + node.asText() + "' in node: " + location);
}
}
代码示例来源:origin: apache/flink
return Types.PRIMITIVE_ARRAY(Types.BYTE);
case STRING:
return Types.BIG_DEC;
return Types.PRIMITIVE_ARRAY(Types.BYTE);
case INT:
代码示例来源:origin: apache/flink
private TypeInformation<?> convertPrimitiveArray() {
nextToken(TokenType.BEGIN);
nextToken(TokenType.LITERAL);
final TypeInformation<?> elementTypeInfo = convertType();
nextToken(TokenType.END);
return Types.PRIMITIVE_ARRAY(elementTypeInfo);
}
代码示例来源:origin: apache/flink
Types.STRING,
Types.MAP(Types.STRING, Types.LONG),
Types.PRIMITIVE_ARRAY(Types.BYTE),
Types.GENERIC(Object.class),
address,
Types.PRIMITIVE_ARRAY(Types.BYTE),
Types.SQL_DATE,
Types.SQL_TIME,
代码示例来源:origin: apache/flink
Types.PRIMITIVE_ARRAY(Types.BYTE));
代码示例来源:origin: org.apache.flink/flink-json
private static TypeInformation<?> convertStringEncoding(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + CONTENT_ENCODING + "' property in node: " + location);
}
// "If the instance value is a string, this property defines that the string SHOULD
// be interpreted as binary data and decoded using the encoding named by this property."
switch (node.asText()) {
case CONTENT_ENCODING_BASE64:
return Types.PRIMITIVE_ARRAY(Types.BYTE);
default:
// we fail hard here:
// this gives us the chance to support more encodings in the future without problems
// of backwards compatibility
throw new IllegalArgumentException("Invalid encoding '" + node.asText() + "' in node: " + location);
}
}
代码示例来源:origin: com.alibaba.blink/flink-json
private static TypeInformation<?> convertStringEncoding(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + CONTENT_ENCODING + "' property in node: " + location);
}
// "If the instance value is a string, this property defines that the string SHOULD
// be interpreted as binary data and decoded using the encoding named by this property."
switch (node.asText()) {
case CONTENT_ENCODING_BASE64:
return Types.PRIMITIVE_ARRAY(Types.BYTE);
default:
// we fail hard here:
// this gives us the chance to support more encodings in the future without problems
// of backwards compatibility
throw new IllegalArgumentException("Invalid encoding '" + node.asText() + "' in node: " + location);
}
}
代码示例来源:origin: org.apache.flink/flink-table-common
private TypeInformation<?> convertPrimitiveArray() {
nextToken(TokenType.BEGIN);
nextToken(TokenType.LITERAL);
final TypeInformation<?> elementTypeInfo = convertType();
nextToken(TokenType.END);
return Types.PRIMITIVE_ARRAY(elementTypeInfo);
}
代码示例来源:origin: com.alibaba.blink/flink-table-common
private TypeInformation<?> convertPrimitiveArray() {
nextToken(TokenType.BEGIN);
nextToken(TokenType.LITERAL);
final TypeInformation<?> elementTypeInfo = convertType();
nextToken(TokenType.END);
return Types.PRIMITIVE_ARRAY(elementTypeInfo);
}
代码示例来源:origin: org.apache.flink/flink-avro
return Types.PRIMITIVE_ARRAY(Types.BYTE);
case STRING:
return Types.BIG_DEC;
return Types.PRIMITIVE_ARRAY(Types.BYTE);
case INT:
代码示例来源:origin: com.alibaba.blink/flink-avro
return Types.PRIMITIVE_ARRAY(Types.BYTE);
case STRING:
return Types.BIG_DEC;
return Types.PRIMITIVE_ARRAY(Types.BYTE);
case INT:
内容来源于网络,如有侵权,请联系作者删除!