本文整理了Java中com.hurence.logisland.record.Field.getName()
方法的一些代码示例,展示了Field.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.getName()
方法的具体详情如下:
包路径:com.hurence.logisland.record.Field
类名称:Field
方法名:getName
暂无
代码示例来源:origin: com.hurence.logisland/logisland-api
/**
* set a field value
*
* @param field
*/
@Override
public Record setField(Field field) {
fields.put(field.getName(), field);
return this;
}
代码示例来源:origin: com.hurence.logisland/logisland-api
@Override
public Collection<Field> getAllFieldsSorted() {
List<Field> fields = new ArrayList<>(getAllFields());
Collections.sort(fields, (left, right) -> left.getName().compareTo(right.getName()));
return fields;
}
代码示例来源:origin: com.hurence.logisland/logisland-api
public Boolean isReserved() {
return FieldDictionary.contains(getName());
}
代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin
@Override
public Collection<Record> process(ProcessContext context, Collection<Record> records) {
try {
List<String> fieldsToRemove = Lists.newArrayList(
context.getPropertyValue(FIELDS_TO_REMOVE).asString().split(","));
for (Record record : records) {
new ArrayList<>(record.getAllFields()).forEach(field -> {
String fieldName = field.getName();
if (fieldsToRemove.contains(fieldName)) {
record.removeField(fieldName);
}
});
}
} catch (Exception ex) {
logger.warn("issue while trying to remove field list {} : {}",
context.getPropertyValue(FIELDS_TO_REMOVE).asString(),
ex.toString());
}
return records;
}
代码示例来源:origin: com.hurence.logisland/logisland-cache_key_value-service-api
@Override
public List<MultiGetResponseRecord> multiGet(List<MultiGetQueryRecord> multiGetQueryRecords) throws DatastoreClientServiceException {
List<MultiGetResponseRecord> results = new ArrayList<>();
for (MultiGetQueryRecord mgqr : multiGetQueryRecords) {
String collectionName = mgqr.getIndexName();
String typeName = mgqr.getTypeName();
for (String id : mgqr.getDocumentIds()) {
Record record = get(collectionName, new StandardRecord().setStringField(rowKey, id));
Map<String, String> retrievedFields = new HashMap<>();
if (record != null) {
if (mgqr.getFieldsToInclude()[0].equals("*")) {
for (Field field : record.getAllFieldsSorted()) {
if (!field.getName().equals(FieldDictionary.RECORD_TIME) &&
!field.getName().equals(FieldDictionary.RECORD_TYPE) &&
!field.getName().equals(FieldDictionary.RECORD_ID))
retrievedFields.put(field.getName(), field.asString());
}
} else {
for (String prop : mgqr.getFieldsToInclude()) {
retrievedFields.put(prop, record.getField(prop).asString());
}
}
} else {
logger.debug("unable to retrieve record (id=" + id + ") from collection " + collectionName);
}
results.add(new MultiGetResponseRecord(collectionName, typeName, id, retrievedFields));
}
}
return results;
}
代码示例来源:origin: com.hurence.logisland/logisland-solr_6_4
.filter(field -> !fieldToMetricTypeMapping.containsKey(field.getName()))
.filter(field -> !field.getName().equals(FieldDictionary.RECORD_TIME) &&
!field.getName().equals(FieldDictionary.RECORD_NAME) &&
!field.getName().equals(FieldDictionary.RECORD_VALUE) &&
!field.getName().equals(FieldDictionary.RECORD_ID) &&
!field.getName().equals(FieldDictionary.RECORD_TYPE)
.collect(Collectors.toMap(field -> field.getName().replaceAll("\\.", "_"),
field -> {
try {
代码示例来源:origin: com.hurence.logisland/logisland-solr-client-service-api
public SolrInputDocument toSolrInputDocument(Record record, String uniqueKey) {
SolrInputDocument document = createNewSolrInputDocument();
document.addField(uniqueKey, record.getId());
for (Field field : record.getAllFields()) {
if (field.isReserved()) {
continue;
}
document.addField(field.getName(), field.getRawValue());
}
return document;
}
代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin
!field.getName().equals(FieldDictionary.RECORD_TYPE) &&
!field.getName().equals(FieldDictionary.RECORD_ID) &&
!field.getName().equals(FieldDictionary.RECORD_TIME) &&
!field.getName().equals(FieldDictionary.RECORD_POSITION))
.collect(Collectors.toList());
rootFields.forEach(rootField -> {
String concatFieldName = rootField.getName();
flattenRecord.getField(rootField.getName()).asString());
}else {
flattenRecord.setField(rootField);
代码示例来源:origin: com.hurence.logisland/logisland-elasticsearch_5_4_0-client-service
try {
String fieldName = field.getName().replaceAll("\\.", "_");
代码示例来源:origin: com.hurence.logisland/logisland-api
logger.info("field {} is not an instance of type {}", field.getName(), field.getType());
return false;
内容来源于网络,如有侵权,请联系作者删除!