@Override protected void prepare(Record record, String key) { record.removeAll(key); }
@Override protected void prepare(Record record, String key) { record.removeAll(key); }
private void doProcessFast(Record record) { for (String name : nameMatcher.getLiteralsOnly()) { record.removeAll(name); } }
private void doProcessFast(Record record) { for (String name : nameMatcher.getLiteralsOnly()) { record.removeAll(name); } }
public void map(Object key, Text value, Context context) throws IOException, InterruptedException { record.put(Fields.ATTACHMENT_BODY, new ByteArrayInputStream(value.toString().getBytes())); if (!morphline.process(record)) { LOGGER.info("Morphline failed to process record: {}", record); } record.removeAll(Fields.ATTACHMENT_BODY); }
@Override protected boolean doProcess(Record record) { Record outputRecord = record.copy(); for (Entry<String, ConfigValue> entry : entries) { outputRecord.put(entry.getValue().render().replace("\"", ""), outputRecord.get(entry.getKey()).get(0)); if (remove) { outputRecord.removeAll(entry.getKey()); } } return super.doProcess(outputRecord); } }
@Override protected boolean doProcess(Record record) { Record outputRecord = record.copy(); for (Entry<String, ConfigValue> entry : entries) { outputRecord.put(entry.getValue().render().replace("\"", ""), outputRecord.get(entry.getKey()).get(0)); if (remove) { outputRecord.removeAll(entry.getKey()); } } return super.doProcess(outputRecord); } }
@Override protected boolean doProcess(Record record) { final ListMultimap<String, Object> entries = record.getFields(); List<String> toRemove = new ArrayList<String>(); if (this.isRegex) { for (final String field : entries.keySet()) { if (!includeFields.isEmpty() && includePattern.matcher(field).matches()) { continue; } if (excludePattern.matcher(field).matches()) { toRemove.add(field); } } } else { for (final String field : entries.keySet()) { if (!includeFields.isEmpty() && includeFields.contains(field)) { continue; } if (excludeFields.isEmpty() || excludeFields.contains(field)) { toRemove.add(field); } } } for (final String field : toRemove) { record.removeAll(field); } return super.doProcess(record); }
@Override protected boolean doProcess(Record record) { final ListMultimap<String, Object> entries = record.getFields(); List<String> toRemove = new ArrayList<String>(); if (this.isRegex) { for (final String field : entries.keySet()) { if (!includeFields.isEmpty() && includePattern.matcher(field).matches()) { continue; } if (excludePattern.matcher(field).matches()) { toRemove.add(field); } } } else { for (final String field : entries.keySet()) { if (!includeFields.isEmpty() && includeFields.contains(field)) { continue; } if (excludeFields.isEmpty() || excludeFields.contains(field)) { toRemove.add(field); } } } for (final String field : toRemove) { record.removeAll(field); } return super.doProcess(record); }
@Override protected boolean doProcess(Record record) { if (!preserveExisting) { record.removeAll(outputFieldName); } ListIterator iter = record.get(inputFieldName).listIterator(); while (iter.hasNext()) { Object inputField = iter.next(); byte[] inputFieldBytes; if (inputField == null ) { inputFieldBytes = null; } else if (inputField instanceof byte[]) { inputFieldBytes = (byte[])inputField; } else { inputFieldBytes = inputField.toString().getBytes(charset); } record.put(outputFieldName, doHash(inputFieldBytes)); } // pass record to next command in chain: return super.doProcess(record); }
@Override protected boolean doProcess(Record record) { if (preserveExisting && record.getFields().containsKey(fieldName)) { ; // we must preserve the existing host } else { record.removeAll(fieldName); if (host != null) { record.put(fieldName, host); } } // pass record to next command in chain: return super.doProcess(record); }
@Override protected boolean doProcess(Record record) { if (preserveExisting && record.getFields().containsKey(fieldName)) { ; // we must preserve the existing host } else { record.removeAll(fieldName); if (host != null) { record.put(fieldName, host); } } // pass record to next command in chain: return super.doProcess(record); }
protected ListMultimap<String, Object> next(Iterator<SolrDocument> iter) { SolrDocument doc = iter.next(); Record record = toRecord(doc); record.removeAll("_version_"); // the values of this field are unknown and internal to solr return record.getFields(); }
Record template = inputRecord.copy(); removeAttachments(template); template.removeAll(Fields.MESSAGE); Charset detectedCharset = detectCharset(inputRecord, charset); Reader reader = new InputStreamReader(stream, detectedCharset);
Record template = inputRecord.copy(); removeAttachments(template); template.removeAll(Fields.MESSAGE); Charset detectedCharset = detectCharset(inputRecord, charset); Reader reader = new InputStreamReader(stream, detectedCharset);