本文整理了Java中com.hurence.logisland.record.Field.asLong()
方法的一些代码示例,展示了Field.asLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.asLong()
方法的具体详情如下:
包路径:com.hurence.logisland.record.Field
类名称:Field
方法名:asLong
暂无
代码示例来源:origin: com.hurence.logisland/logisland-sampling-plugin
public Long getRecordTime(Record record){
if (record.hasField(timeFieldName)) {
return record.getField(timeFieldName).asLong();
}else{
return null;
}
}
代码示例来源:origin: com.hurence.logisland/logisland-solr_6_4
return field.asInteger();
case LONG:
return field.asLong();
case FLOAT:
return field.asFloat();
代码示例来源:origin: com.hurence.logisland/logisland-elasticsearch_5_4_0-client-service
try {
DateTimeFormatter dateParser = ISODateTimeFormat.dateTimeNoMillis();
document.field("@timestamp", dateParser.print(record.getField(FieldDictionary.RECORD_TIME).asLong()));
} catch (Exception ex) {
logger.error("unable to parse record_time iso date for {}", record);
break;
case LONG:
document.field(fieldName, field.asLong().longValue());
break;
case FLOAT:
代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin
cachedThreshold.getField(FieldDictionary.RECORD_LAST_UPDATE_TIME).asLong();
if (durationBeetwenLastUpdateInMs > context.getPropertyValue(MIN_UPDATE_TIME_MS).asLong()) {
Long count = cachedThreshold.getField(FieldDictionary.RECORD_COUNT).asLong();
Date firstThresholdTime = cachedThreshold.getTime();
cachedThreshold.setField(FieldDictionary.RECORD_COUNT, FieldType.LONG, count + 1)
代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin
break;
case LONG:
record.setField(fieldName, newFieldType, currentField.asLong());
break;
case FLOAT:
代码示例来源:origin: com.hurence.logisland/logisland-web-analytics-plugin
.stream()
.filter(e -> e.getField(timestamp_field) != null)
.min(Comparator.comparingLong((Record e) -> e.getField(timestamp_field).asLong()))
.get();
.stream()
.filter(e -> e.getField(timestamp_field) != null)
.max(Comparator.comparingLong((Record e) -> e.getField(timestamp_field).asLong()))
.get();
long sessionInactivityDuration = (now - latestRecord.getField(timestamp_field).asLong()) / 1000;
if (sessionInactivityDuration > session_inactivity_timeout)
long sessionDuration = (latestRecord.getField(timestamp_field).asLong() - firstRecord.getField(timestamp_field).asLong()) / 1000;
if (sessionDuration > 0) {
consolidatedSession.setField(sessionDuration_field, FieldType.LONG, sessionDuration);
Date firstEventDateTime = new Date(firstRecord.getField(timestamp_field).asLong());
Date lastEventDateTime = new Date(latestRecord.getField(timestamp_field).asLong());
if (firstEventDateTime != null) {
consolidatedSession.setField(firstEventDateTime_field, FieldType.STRING, firstEventDateTime.toString());
consolidatedSession.setField(timestamp_field, FieldType.LONG, firstRecord.getField(timestamp_field).asLong());
代码示例来源:origin: com.hurence.logisland/logisland-consolidate-session-plugin
.stream()
.filter(e -> e.getField(timestamp_field) != null)
.min(Comparator.comparingLong((Record e) -> e.getField(timestamp_field).asLong()))
.get();
.stream()
.filter(e -> e.getField(timestamp_field) != null)
.max(Comparator.comparingLong((Record e) -> e.getField(timestamp_field).asLong()))
.get();
long sessionInactivityDuration = (now - latestRecord.getField(timestamp_field).asLong()) / 1000;
if (sessionInactivityDuration > session_inactivity_timeout)
long sessionDuration = (latestRecord.getField(timestamp_field).asLong() - firstRecord.getField(timestamp_field).asLong()) / 1000;
if (sessionDuration > 0) {
consolidatedSession.setField(sessionDuration_field, FieldType.LONG, sessionDuration);
Date firstEventDateTime = new Date(firstRecord.getField(timestamp_field).asLong());
Date lastEventDateTime = new Date(latestRecord.getField(timestamp_field).asLong());
if (firstEventDateTime != null) {
consolidatedSession.setField(firstEventDateTime_field, FieldType.STRING, firstEventDateTime.toString());
consolidatedSession.setField(timestamp_field, FieldType.LONG, firstRecord.getField(timestamp_field).asLong());
代码示例来源:origin: com.hurence.logisland/logisland-outlier-detection-plugin
long timestamp = record.getField(timeField).asLong();
double value = record.getField(valueField).asDouble();
代码示例来源:origin: com.hurence.logisland/logisland-cyber-security-plugin
final Long pcapTimestampInNanos = 1000000L * record.getField(FieldDictionary.RECORD_TIME).asLong();
代码示例来源:origin: com.hurence.logisland/logisland-querymatcher-plugin
break;
case LONG:
docbuilder.addField(new LegacyDoubleField(fieldName, record.getField(fieldName).asLong(), Field.Store.YES));
break;
case FLOAT:
内容来源于网络,如有侵权,请联系作者删除!