mirror of https://github.com/apache/druid.git
remove test rejection policy
This commit is contained in:
parent
f7ed046417
commit
1ff5829d6d
|
@ -181,7 +181,7 @@ You should be comfortable starting Druid nodes at this point. If not, it may be
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: This config uses a "test" [rejection policy](Plumber.html) which will accept all events and timely hand off, however, we strongly recommend you do not use this in production. Using this rejection policy, segments for events for the same time range will be overridden.
|
Note: This config uses a "messageTime" [rejection policy](Plumber.html) which will accept all events and hand off as long as there is a continuous stream of events. In this particular example, hand-off will not actually occur because we only have a few events.
|
||||||
|
|
||||||
3. Let's copy and paste some data into the Kafka console producer
|
3. Let's copy and paste some data into the Kafka console producer
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,7 @@ import org.joda.time.Period;
|
||||||
@JsonSubTypes(value = {
|
@JsonSubTypes(value = {
|
||||||
@JsonSubTypes.Type(name = "serverTime", value = ServerTimeRejectionPolicyFactory.class),
|
@JsonSubTypes.Type(name = "serverTime", value = ServerTimeRejectionPolicyFactory.class),
|
||||||
@JsonSubTypes.Type(name = "messageTime", value = MessageTimeRejectionPolicyFactory.class),
|
@JsonSubTypes.Type(name = "messageTime", value = MessageTimeRejectionPolicyFactory.class),
|
||||||
@JsonSubTypes.Type(name = "none", value = NoopRejectionPolicyFactory.class),
|
@JsonSubTypes.Type(name = "none", value = NoopRejectionPolicyFactory.class)
|
||||||
@JsonSubTypes.Type(name = "test", value = TestRejectionPolicyFactory.class)
|
|
||||||
})
|
})
|
||||||
public interface RejectionPolicyFactory
|
public interface RejectionPolicyFactory
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
* Druid - a distributed column store.
|
|
||||||
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package io.druid.segment.realtime.plumber;
|
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
|
||||||
import org.joda.time.Period;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class TestRejectionPolicyFactory implements RejectionPolicyFactory
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public RejectionPolicy create(Period windowPeriod)
|
|
||||||
{
|
|
||||||
return new RejectionPolicy()
|
|
||||||
{
|
|
||||||
private final DateTime max = new DateTime(Long.MAX_VALUE);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DateTime getCurrMaxTime()
|
|
||||||
{
|
|
||||||
return max;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean accept(long timestamp)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue