org.talend.daikon.avro.AvroUtils._logicalTime()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(83)

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

AvroUtils._logicalTime介绍

[英]Returns schema for Avro Time-millis logical type. It's Avro type is Int
[中]返回Avro Time millis逻辑类型的架构。它是Avro类型是Int

代码示例

代码示例来源:origin: org.talend.daikon/daikon

return AvroUtils._logicalTime();

代码示例来源:origin: Talend/components

/**
 * Checks {@link AvroTypeConverter#convertToAvro(String, String)} returns logical time-millis avro schema with in case
 * "time-millis" logical type is passed
 */
@Test
public void testConvertToAvroLogicalTime() {
  Schema expectedSchema = AvroUtils._logicalTime();
  assertEquals(expectedSchema, AvroTypeConverter.convertToAvro(null, "time-millis"));
}

代码示例来源:origin: Talend/components

.noDefault()
.name("time_fld")
.type(AvroUtils._logicalTime())
.noDefault()
.name("boolean_fld")

代码示例来源:origin: Talend/components

/**
 * Checks {@link TalendType#convertFromAvro(Schema)} converts logical time-millis avro type to "id_Integer" di type
 */
@Test
public void testConvertFromAvroLogicalTimeMillis() {
  TalendType expectedType = TalendType.INTEGER;
  Schema fieldSchema = AvroUtils._logicalTime();
  assertEquals(expectedType, TalendType.convertFromAvro(fieldSchema));
}

代码示例来源:origin: org.talend.components/components-azurestorage

field = new Field(name, AvroUtils._logicalTime(), null, (Object) null);
field.addProp(SchemaConstants.TALEND_COLUMN_PATTERN, "HH:mm:ss.SSS'Z'");
break;

代码示例来源:origin: Talend/components

field = new Field(name, AvroUtils._logicalTime(), null, (Object) null);
field.addProp(SchemaConstants.TALEND_COLUMN_PATTERN, "HH:mm:ss.SSS'Z'");
break;

相关文章