mirror of https://github.com/apache/druid.git
Merge pull request #1806 from himanshug/fix_index_exceeded_msg
Fix index exceeded msg to give maxRowCount as well
This commit is contained in:
commit
e797d222c7
|
@ -25,14 +25,14 @@ public class IndexSizeExceededException extends IOException
|
|||
{
|
||||
}
|
||||
|
||||
public IndexSizeExceededException(String message)
|
||||
public IndexSizeExceededException(String formatText, Object... arguments)
|
||||
{
|
||||
super(message);
|
||||
super(String.format(formatText, arguments));
|
||||
}
|
||||
|
||||
public IndexSizeExceededException(String message, Throwable cause)
|
||||
public IndexSizeExceededException(Throwable cause, String formatText, Object... arguments)
|
||||
{
|
||||
super(message, cause);
|
||||
super(String.format(formatText, arguments), cause);
|
||||
}
|
||||
|
||||
public IndexSizeExceededException(Throwable cause)
|
||||
|
|
|
@ -187,7 +187,7 @@ public class OffheapIncrementalIndex extends IncrementalIndex<BufferAggregator>
|
|||
synchronized (this) {
|
||||
if (!facts.containsKey(key)) {
|
||||
if (!canAppendRow(false)) {
|
||||
throw new IndexSizeExceededException(getOutOfRowsReason());
|
||||
throw new IndexSizeExceededException("%s", getOutOfRowsReason());
|
||||
}
|
||||
}
|
||||
rowOffset = totalAggSize * numEntries.get();
|
||||
|
|
|
@ -151,7 +151,7 @@ public class OnheapIncrementalIndex extends IncrementalIndex<Aggregator>
|
|||
|
||||
// Last ditch sanity checks
|
||||
if (numEntries.get() >= maxRowCount && !facts.containsKey(key)) {
|
||||
throw new IndexSizeExceededException("Maximum number of rows reached");
|
||||
throw new IndexSizeExceededException("Maximum number of rows [%d] reached", maxRowCount);
|
||||
}
|
||||
final Integer prev = facts.putIfAbsent(key, rowIndex);
|
||||
if (null == prev) {
|
||||
|
|
Loading…
Reference in New Issue