NIFI-5231: CalculateRecordCount should use 'record.count'

This closes #2792

Signed-off-by: Mike Thomsen <mikerthomsen@gmail.com>
This commit is contained in:
Koji Kawamura 2018-06-14 11:26:20 +09:00 committed by Mike Thomsen
parent 0831059d2c
commit 4349a8e078
2 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ import java.util.stream.Collectors;
"Total number of top N value counts to be added is defined by the limit configuration.") "Total number of top N value counts to be added is defined by the limit configuration.")
}) })
public class CalculateRecordStats extends AbstractProcessor { public class CalculateRecordStats extends AbstractProcessor {
static final String RECORD_COUNT_ATTR = "record_count"; static final String RECORD_COUNT_ATTR = "record.count";
static final PropertyDescriptor RECORD_READER = new PropertyDescriptor.Builder() static final PropertyDescriptor RECORD_READER = new PropertyDescriptor.Builder()
.name("record-stats-reader") .name("record-stats-reader")

View File

@ -63,7 +63,7 @@ class TestCalculateRecordStats {
"recordStats.sport.Football": "2", "recordStats.sport.Football": "2",
"recordStats.sport.Basketball": "1", "recordStats.sport.Basketball": "1",
"recordStats.sport": "6", "recordStats.sport": "6",
"record_count": "6" "record.count": "6"
] ]
commonTest([ "sport": "/person/sport"], sports, expectedAttributes) commonTest([ "sport": "/person/sport"], sports, expectedAttributes)
@ -77,7 +77,7 @@ class TestCalculateRecordStats {
"recordStats.sport.Football": "1", "recordStats.sport.Football": "1",
"recordStats.sport.Basketball": "1", "recordStats.sport.Basketball": "1",
"recordStats.sport": "3", "recordStats.sport": "3",
"record_count": "6" "record.count": "6"
] ]
commonTest([ "sport": "/person/sport"], sports, expectedAttributes) commonTest([ "sport": "/person/sport"], sports, expectedAttributes)
@ -90,7 +90,7 @@ class TestCalculateRecordStats {
"recordStats.sport.Soccer": "3", "recordStats.sport.Soccer": "3",
"recordStats.sport.Basketball": "1", "recordStats.sport.Basketball": "1",
"recordStats.sport": "4", "recordStats.sport": "4",
"record_count": "6" "record.count": "6"
] ]
def propz = [ def propz = [
@ -112,7 +112,7 @@ class TestCalculateRecordStats {
"recordStats.sport.Soccer": "3", "recordStats.sport.Soccer": "3",
"recordStats.sport.Baseball": "4", "recordStats.sport.Baseball": "4",
"recordStats.sport": String.valueOf(sports.size()), "recordStats.sport": String.valueOf(sports.size()),
"record_count": String.valueOf(sports.size()) "record.count": String.valueOf(sports.size())
] ]
def propz = [ def propz = [