Fix deserialization of maxBytesInMemory (#9092)

* Fix deserialization of maxBytesInMemory

* Add maxBytes check
This commit is contained in:
Atul Mohan 2020-01-12 22:08:07 -06:00 committed by Clint Wylie
parent 85219ece13
commit b642b1aa5b
3 changed files with 7 additions and 1 deletions

View File

@ -143,6 +143,7 @@ public class RealtimeAppenderatorTuningConfig implements TuningConfig, Appendera
}
@Override
@JsonProperty
public long getMaxBytesInMemory()
{
return maxBytesInMemory;

View File

@ -394,7 +394,7 @@ public class TaskSerdeTest
new RealtimeTuningConfig(
1,
null,
10L,
new Period("PT10M"),
null,
null,
@ -445,6 +445,10 @@ public class TaskSerdeTest
task.getRealtimeIngestionSchema().getTuningConfig().getWindowPeriod(),
task2.getRealtimeIngestionSchema().getTuningConfig().getWindowPeriod()
);
Assert.assertEquals(
task.getRealtimeIngestionSchema().getTuningConfig().getMaxBytesInMemory(),
task2.getRealtimeIngestionSchema().getTuningConfig().getMaxBytesInMemory()
);
Assert.assertEquals(
task.getRealtimeIngestionSchema().getDataSchema().getGranularitySpec().getSegmentGranularity(),
task2.getRealtimeIngestionSchema().getDataSchema().getGranularitySpec().getSegmentGranularity()

View File

@ -174,6 +174,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig
}
@Override
@JsonProperty
public long getMaxBytesInMemory()
{
return maxBytesInMemory;