本文整理了Java中org.apache.avro.reflect.Nullable.<init>()
方法的一些代码示例,展示了Nullable.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nullable.<init>()
方法的具体详情如下:
包路径:org.apache.avro.reflect.Nullable
类名称:Nullable
方法名:<init>
暂无
代码示例来源:origin: apache/incubator-pinot
/**
* Returns the partitions within which the column values exist.
*
* @return List of ranges for the column values.
*/
@Nullable
public Set<Integer> getPartitions() {
return _partitions;
}
代码示例来源:origin: apache/flink
@Nullable
static Schema parseSchemaString(@Nullable String schemaString) {
return (schemaString == null) ? null : new Schema.Parser().parse(schemaString);
}
代码示例来源:origin: apache/incubator-pinot
@Nullable
@Override
protected String getLoadMode() {
return "MMAP";
}
代码示例来源:origin: apache/avro
public static class R11 {
@Nullable private String text;
@Override
public boolean equals(Object o) {
if (!(o instanceof R11)) return false;
R11 that = (R11)o;
if (this.text == null) return that.text == null;
return this.text.equals(that.text);
}
}
代码示例来源:origin: apache/avro
public static class NullableBytesTest {
@Nullable
byte[] bytes;
NullableBytesTest() {
}
NullableBytesTest(byte[] bytes) {
this.bytes = bytes;
}
@Override
public boolean equals(Object obj) {
return obj instanceof NullableBytesTest
&& Arrays.equals(((NullableBytesTest) obj).bytes, this.bytes);
}
}
代码示例来源:origin: apache/avro
@Nullable String foo(@Nullable String s);
}
代码示例来源:origin: apache/flink
private transient @Nullable Schema schema;
代码示例来源:origin: apache/flink
/**
* Creates Avro Writer and Reader for a specific type.
*
* <p>Given an input type, and possible the current schema, and a previously known schema (also known as writer
* schema) create will deduce the best way to initalize a reader and writer according to the following rules:
* <ul>
* <li>If type is an Avro generated class (an {@link SpecificRecord} then the reader would use the
* previousSchema for reading (if present) otherwise it would use the schema attached to the auto generated
* class.
* <li>If the type is a GenericRecord then the reader and the writer would be created with the supplied
* (mandatory) schema.
* <li>Otherwise, we use Avro's reflection based reader and writer that would deduce the schema via reflection.
* If the previous schema is also present (when restoring a serializer for example) then the reader would be
* created with both schemas.
* </ul>
*/
static <T> AvroFactory<T> create(Class<T> type, @Nullable Schema currentSchema, @Nullable Schema previousSchema) {
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (SpecificRecord.class.isAssignableFrom(type)) {
return fromSpecific(type, cl, Optional.ofNullable(previousSchema));
}
if (GenericRecord.class.isAssignableFrom(type)) {
return fromGeneric(cl, currentSchema);
}
return fromReflective(type, cl, Optional.ofNullable(previousSchema));
}
代码示例来源:origin: org.apache.spark/spark-core_2.10
@Nullable
private final Comparator<RecordPointerAndKeyPrefix> sortComparator;
@Nullable
private final PrefixComparators.RadixSortSupport radixSortSupport;
代码示例来源:origin: org.apache.spark/spark-core
@Nullable
private final Comparator<RecordPointerAndKeyPrefix> sortComparator;
@Nullable
private final PrefixComparators.RadixSortSupport radixSortSupport;
代码示例来源:origin: org.apache.spark/spark-core_2.11
@Nullable
private final Comparator<RecordPointerAndKeyPrefix> sortComparator;
@Nullable
private final PrefixComparators.RadixSortSupport radixSortSupport;
代码示例来源:origin: apache/flink
@Nullable
String title;
long authorId;
代码示例来源:origin: apache/incubator-pinot
public String forTableView(String tableName, String view, @Nullable String tableType) {
String url = StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tables", tableName, view);
if (tableType != null) {
url += "?tableType=" + tableType;
}
return url;
}
代码示例来源:origin: apache/flink
@Nullable
List<String> bookTitles;
@Nullable
List<Book> books;
代码示例来源:origin: org.apache.hadoop/hadoop-common
private int keyId;
private long expiryDate;
@Nullable
private byte[] keyBytes = null;
private static final int MAX_KEY_LEN = 1024 * 1024;
代码示例来源:origin: apache/avro
@Nullable
Integer i2;
@Nullable
Integer i5;
java.util.Date i7 = new java.util.Date(7L);
@Nullable
@AvroName("j8")
Integer i8;
@Nullable
@AvroEncode(using=DateAsLongEncoding.class)
java.util.Date i9;
@Nullable
@AvroName("j11")
@AvroEncode(using=DateAsLongEncoding.class)
代码示例来源:origin: com.github.jcustenborder.netty/netty-codec-syslog
/**
* @return The value of the {@code structuredData} attribute
*/
@JsonProperty("structuredData")
@Override
public @Nullable List<Message.StructuredData> structuredData() {
return structuredData;
}
代码示例来源:origin: com.github.jcustenborder.netty/netty-codec-syslog
@JsonProperty("message")
public void setMessage(@Nullable String message) {
this.message = message;
}
@JsonProperty("processId")
代码示例来源:origin: org.apache.beam/beam-sdks-java-core
private static class NullableField {
@SuppressWarnings("unused")
@Nullable
private String nullable;
}
代码示例来源:origin: org.apache.flink/flink-avro
/**
* Creates a new AvroSerializer for the type indicated by the given class.
*/
@Internal
AvroSerializer(Class<T> type, @Nullable SerializableAvroSchema newSchema, @Nullable SerializableAvroSchema previousSchema) {
this.type = checkNotNull(type);
this.schema = newSchema;
this.previousSchema = previousSchema;
}
内容来源于网络,如有侵权,请联系作者删除!