MCPcopy Create free account
hub / github.com/apache/impala / Redact

Function Redact

be/src/util/redactor.cc:270–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void Redact(string* value, bool* changed) {
271 DCHECK(value != NULL);
272 if (g_rules == NULL || g_rules->empty()) return;
273 for (Rules::const_iterator rule = g_rules->begin(); rule != g_rules->end(); ++rule) {
274 if (rule->case_sensitive()) {
275 if (value->find(rule->trigger) == string::npos) continue;
276 } else {
277 if (strcasestr(value->c_str(), rule->trigger.c_str()) == NULL) continue;
278 }
279 int replacement_count = re2::RE2::GlobalReplace(
280 value, rule->search_pattern, rule->replacement);
281 if (changed != NULL && !*changed) *changed = replacement_count;
282 }
283}
284
285}

Callers 10

LogAuditRecordMethod · 0.85
ExecuteMethod · 0.85
MessageListenerFunction · 0.85
RedactCopyFunction · 0.85
RepeatedFieldToJsonFunction · 0.85
ProtobufToJsonFunction · 0.85
AddInfoStringInternalMethod · 0.85
MultiThreadWorkloadFunction · 0.85
TESTFunction · 0.85
AssertRedactedEqualsFunction · 0.85

Calls 5

case_sensitiveMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by 3

MultiThreadWorkloadFunction · 0.68
TESTFunction · 0.68
AssertRedactedEqualsFunction · 0.68