org.apache.avro.reflect.Nullable类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(133)

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

Nullable介绍

暂无

代码示例

代码示例来源: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

/**
 * Host of the message. This is the value from the message.
 *
 * @return Message host.
 */
@Nullable
String host();

代码示例来源:origin: com.github.jcustenborder.netty/netty-codec-syslog

/**
 * Message part of the overall syslog message.
 *
 * @return Message part of the overall syslog message.
 */
@Nullable
String message();

代码示例来源:origin: com.github.jcustenborder.netty/netty-codec-syslog

/**
 * Version of the message.
 *
 * @return Message version
 */
@Nullable
Integer version();

代码示例来源:origin: com.github.jcustenborder.netty/netty-codec-syslog

/**
 * @return The value of the {@code host} attribute
 */
@JsonProperty(required = false)
@Override
public @Nullable String host() {
 return host;
}

相关文章

Nullable类方法