com.hurence.logisland.record.Field.getType()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(122)

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

Field.getType介绍

暂无

代码示例

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

private void overwriteObsoleteFieldValue(Record record, String fieldName, String newValue) {
  final Field fieldToUpdate = record.getField(fieldName);
  record.removeField(fieldName);
  record.setField(fieldName, fieldToUpdate.getType(), newValue);
}

代码示例来源:origin: com.hurence.logisland/logisland-api

FieldType fieldType = field.getType();

代码示例来源:origin: com.hurence.logisland/logisland-sampling-plugin

/**
   * retrun the same record as input by keeping only time and value fields.
   *
   * @param record
   * @return
   */
  public Record getTimeValueRecord(Record record){
    Record tvRecord = new StandardRecord(record.getType());
    Double value = getRecordValue(record);
    if(value != null)
      tvRecord.setField(valueFieldName, record.getField(valueFieldName).getType(), value);

    Long time = getRecordTime(record);
    if(time != null)
      tvRecord.setField(timeFieldName, record.getField(timeFieldName).getType(), time);

    return tvRecord;
  }
}

代码示例来源:origin: com.hurence.logisland/logisland-solr_6_4

field -> {
  try {
    switch (field.getType()) {
      case STRING:
        return field.asString();

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

private void overwriteObsoleteFieldName(Record record, String normalizedFieldName, String obsoleteFieldName) {
  // remove old badly named field
  if (record.hasField(obsoleteFieldName)) {
    final Field fieldToRename = record.getField(obsoleteFieldName);
    record.removeField(obsoleteFieldName);
    record.setField(normalizedFieldName, fieldToRename.getType(), fieldToRename.getRawValue());
  }
}

代码示例来源:origin: com.hurence.logisland/logisland-sampling-plugin

final FieldType fieldType = bucket.get(0).getField(valueFieldName).getType();
switch (fieldType) {
  case INT:

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

if (record.hasField(obsoleteFieldName)) {
  final Field oldField = record.getField(obsoleteFieldName);
  record.setField(normalizedFieldName, oldField.getType(), oldField.getRawValue());

代码示例来源:origin: com.hurence.logisland/logisland-elasticsearch_5_4_0-client-service

switch (field.getType()) {

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

.filter(field -> field.getType().equals(FieldType.RECORD) &&
    !field.getName().equals(FieldDictionary.RECORD_TYPE) &&
    !field.getName().equals(FieldDictionary.RECORD_ID) &&
.filter(field -> !field.getType().equals(FieldType.RECORD))
.collect(Collectors.toList());
        rootField.getType() == FieldType.STRING &&
        flattenRecord.hasField(concatFieldName) &&
        flattenRecord.getField(concatFieldName).getType() == FieldType.STRING) {

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

FieldType currentFieldType = currentField.getType();
FieldType newFieldType = fieldTypes.get(fieldName);

代码示例来源:origin: com.hurence.logisland/logisland-api

switch (field.getType()) {
    case STRING:
      isValid = field.getRawValue() instanceof String;
logger.info("field {} is not an instance of type {}", field.getName(), field.getType());
return false;

代码示例来源:origin: com.hurence.logisland/logisland-elasticsearch-plugin

|| !record.getField(indexFieldName).getType().equals(FieldType.STRING) // index field is not of STRING type
|| !record.getField(idsFieldName).getType().equals(FieldType.STRING)
|| record.getField(idsFieldName).getRawValue() == null
|| record.getField(idsFieldName).getRawValue().toString().isEmpty() ) {

代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin

|| !record.getField(collectionFieldName).getType().equals(FieldType.STRING) // collection field is not of STRING type
|| !record.getField(idsFieldName).getType().equals(FieldType.STRING)
|| record.getField(idsFieldName).getRawValue() == null
|| record.getField(idsFieldName).getRawValue().toString().isEmpty() ) {

代码示例来源:origin: com.hurence.logisland/logisland-querymatcher-plugin

for (final String fieldName : record.getAllFieldNames()) {
  if (record.getField(fieldName).getRawValue() != null) {
    switch (record.getField(fieldName).getType()) {
      case STRING:
        docbuilder.addField(fieldName, record.getField(fieldName).asString(), stopAnalyzer);

相关文章