mirror of https://github.com/apache/druid.git
IntelliJ inspection and checkstyle rule for "Collection.EMPTY_* field accesses replaceable with Collections.empty*()" (#9690)
* IntelliJ inspection and checkstyle rule for "Collection.EMPTY_* field accesses replaceable with Collections.empty*()" * Reverted checkstyle rule * Added tests to pass CI * Codestyle
This commit is contained in:
parent
3527458f85
commit
2c384b61ff
|
@ -29,6 +29,7 @@
|
||||||
<inspection_tool class="ClassNewInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
<inspection_tool class="ClassNewInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="CollectionAddAllCanBeReplacedWithConstructor" enabled="true" level="ERROR" enabled_by_default="true" />
|
<inspection_tool class="CollectionAddAllCanBeReplacedWithConstructor" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
<inspection_tool class="CollectionAddedToSelf" enabled="true" level="ERROR" enabled_by_default="true" />
|
<inspection_tool class="CollectionAddedToSelf" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CollectionsFieldAccessReplaceableByMethodCall" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
<inspection_tool class="ComparableImplementedButEqualsNotOverridden" enabled="true" level="WARNING" enabled_by_default="true" />
|
<inspection_tool class="ComparableImplementedButEqualsNotOverridden" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="ComparatorMethodParameterNotUsed" enabled="true" level="ERROR" enabled_by_default="true" />
|
<inspection_tool class="ComparatorMethodParameterNotUsed" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
<inspection_tool class="ComparatorResultComparison" enabled="true" level="ERROR" enabled_by_default="true" />
|
<inspection_tool class="ComparatorResultComparison" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class AmbariMetricsEmitterConfigTest
|
||||||
1000L,
|
1000L,
|
||||||
100,
|
100,
|
||||||
new SendAllTimelineEventConverter("prefix", "druid"),
|
new SendAllTimelineEventConverter("prefix", "druid"),
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
500L,
|
500L,
|
||||||
400L
|
400L
|
||||||
);
|
);
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class DropwizardEmitterModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class GraphiteEmitterModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -53,8 +53,8 @@ public class GraphiteEmitterConfigTest
|
||||||
1000L,
|
1000L,
|
||||||
100,
|
100,
|
||||||
new SendAllGraphiteEventConverter("prefix", true, true, false),
|
new SendAllGraphiteEventConverter("prefix", true, true, false),
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
null,
|
null,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
@ -92,4 +92,10 @@ public class GraphiteEmitterConfigTest
|
||||||
.readValue(whiteListBasedConverterString);
|
.readValue(whiteListBasedConverterString);
|
||||||
Assert.assertEquals(druidToGraphiteEventConverter, whiteListBasedConverter);
|
Assert.assertEquals(druidToGraphiteEventConverter, whiteListBasedConverter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testJacksonModules()
|
||||||
|
{
|
||||||
|
Assert.assertTrue(new GraphiteEmitterModule().getJacksonModules().isEmpty());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class InfluxdbEmitterModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -205,4 +205,10 @@ public class InfluxdbEmitterTest
|
||||||
String actual = influxdbEmitter.transformForInfluxSystems(event);
|
String actual = influxdbEmitter.transformForInfluxSystems(event);
|
||||||
Assert.assertEquals(expected, actual);
|
Assert.assertEquals(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testJacksonModules()
|
||||||
|
{
|
||||||
|
Assert.assertTrue(new InfluxdbEmitterModule().getJacksonModules().isEmpty());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class KafkaEmitterModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -68,4 +68,10 @@ public class KafkaEmitterConfigTest
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testJacksonModules()
|
||||||
|
{
|
||||||
|
Assert.assertTrue(new KafkaEmitterModule().getJacksonModules().isEmpty());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class OpentsdbEmitterModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -76,4 +76,9 @@ public class OpentsdbEmitterConfigTest
|
||||||
Assert.assertEquals(expectedOpentsdbEmitterConfig, opentsdbEmitterConfig);
|
Assert.assertEquals(expectedOpentsdbEmitterConfig, opentsdbEmitterConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testJacksonModules()
|
||||||
|
{
|
||||||
|
Assert.assertTrue(new OpentsdbEmitterModule().getJacksonModules().isEmpty());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class StatsDEmitterModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -236,4 +236,10 @@ public class StatsDEmitterTest
|
||||||
Assert.assertEquals(expectedEvent.getTitle(), actualEvent.getTitle());
|
Assert.assertEquals(expectedEvent.getTitle(), actualEvent.getTitle());
|
||||||
Assert.assertEquals(expectedEvent.getText(), actualEvent.getText());
|
Assert.assertEquals(expectedEvent.getText(), actualEvent.getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testJacksonModules()
|
||||||
|
{
|
||||||
|
Assert.assertTrue(new StatsDEmitterModule().getJacksonModules().isEmpty());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -780,7 +780,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(Status.NOT_STARTED))
|
||||||
|
@ -928,7 +928,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(Status.NOT_STARTED))
|
||||||
|
@ -1032,7 +1032,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance();
|
Capture<Task> captured = Capture.newInstance();
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(id1)).anyTimes();
|
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(id1)).anyTimes();
|
||||||
|
@ -1121,7 +1121,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(Status.NOT_STARTED))
|
||||||
|
@ -1224,7 +1224,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
||||||
new KafkaDataSourceMetadata(
|
new KafkaDataSourceMetadata(
|
||||||
|
@ -1722,7 +1722,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
||||||
new KafkaDataSourceMetadata(
|
new KafkaDataSourceMetadata(
|
||||||
|
@ -1808,7 +1808,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
||||||
new KafkaDataSourceMetadata(
|
new KafkaDataSourceMetadata(
|
||||||
|
@ -2032,7 +2032,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
{
|
{
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
replayAll();
|
replayAll();
|
||||||
|
@ -2057,7 +2057,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null);
|
supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
replayAll();
|
replayAll();
|
||||||
|
@ -2113,7 +2113,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null);
|
supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
replayAll();
|
replayAll();
|
||||||
|
@ -2146,7 +2146,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
supervisor = getTestableSupervisor(1, 1, true, true, "PT1H", null, null);
|
supervisor = getTestableSupervisor(1, 1, true, true, "PT1H", null, null);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
|
|
||||||
|
@ -2749,7 +2749,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
{
|
{
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
replayAll();
|
replayAll();
|
||||||
|
@ -2960,7 +2960,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(task)).anyTimes();
|
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(task)).anyTimes();
|
||||||
|
@ -3029,7 +3029,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
|
||||||
List<Task> existingTasks = ImmutableList.of(task);
|
List<Task> existingTasks = ImmutableList.of(task);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(task)).anyTimes();
|
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(task)).anyTimes();
|
||||||
|
|
|
@ -721,7 +721,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -815,7 +815,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getStatus("id2")).andReturn(Optional.of(TaskStatus.running("id2"))).anyTimes();
|
EasyMock.expect(taskStorage.getStatus("id2")).andReturn(Optional.of(TaskStatus.running("id2"))).anyTimes();
|
||||||
|
@ -886,7 +886,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -1134,7 +1134,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -1260,7 +1260,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
final Capture<Task> firstTasks = Capture.newInstance(CaptureType.ALL);
|
final Capture<Task> firstTasks = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
||||||
new KinesisDataSourceMetadata(null)
|
new KinesisDataSourceMetadata(null)
|
||||||
|
@ -1882,7 +1882,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
||||||
new KinesisDataSourceMetadata(
|
new KinesisDataSourceMetadata(
|
||||||
|
@ -1964,7 +1964,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
||||||
new KinesisDataSourceMetadata(
|
new KinesisDataSourceMetadata(
|
||||||
|
@ -2072,7 +2072,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(
|
||||||
new KinesisDataSourceMetadata(
|
new KinesisDataSourceMetadata(
|
||||||
|
@ -2380,7 +2380,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
replayAll();
|
replayAll();
|
||||||
|
@ -2410,7 +2410,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null);
|
supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
replayAll();
|
replayAll();
|
||||||
|
@ -2538,7 +2538,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
|
|
||||||
EasyMock.reset(indexerMetadataStorageCoordinator);
|
EasyMock.reset(indexerMetadataStorageCoordinator);
|
||||||
|
@ -3409,7 +3409,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
.anyTimes();
|
.anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
taskRunner.registerListener(EasyMock.anyObject(TaskRunnerListener.class), EasyMock.anyObject(Executor.class));
|
||||||
replayAll();
|
replayAll();
|
||||||
|
@ -3536,7 +3536,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getStatus("id2")).andReturn(Optional.of(TaskStatus.running("id2"))).anyTimes();
|
EasyMock.expect(taskStorage.getStatus("id2")).andReturn(Optional.of(TaskStatus.running("id2"))).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getTask("id2")).andReturn(Optional.of(task)).anyTimes();
|
EasyMock.expect(taskStorage.getTask("id2")).andReturn(Optional.of(task)).anyTimes();
|
||||||
|
@ -3633,7 +3633,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(existingTasks).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
EasyMock.expect(taskStorage.getStatus("id1")).andReturn(Optional.of(TaskStatus.running("id1"))).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(task)).anyTimes();
|
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(task)).anyTimes();
|
||||||
|
@ -3850,7 +3850,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -3959,7 +3959,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -4134,7 +4134,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -4296,7 +4296,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
Capture<Task> captured = Capture.newInstance(CaptureType.ALL);
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -4416,7 +4416,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
@ -4570,7 +4570,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
|
||||||
|
|
||||||
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskQueue()).andReturn(Optional.of(taskQueue)).anyTimes();
|
||||||
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
EasyMock.expect(taskMaster.getTaskRunner()).andReturn(Optional.of(taskRunner)).anyTimes();
|
||||||
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.EMPTY_LIST).anyTimes();
|
EasyMock.expect(taskRunner.getRunningTasks()).andReturn(Collections.emptyList()).anyTimes();
|
||||||
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
EasyMock.expect(taskStorage.getActiveTasksByDatasource(DATASOURCE)).andReturn(ImmutableList.of()).anyTimes();
|
||||||
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
EasyMock.expect(taskClient.getStatusAsync(EasyMock.anyString()))
|
||||||
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.NOT_STARTED))
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class PollingLookupTest extends InitializedNullHandlingTest
|
||||||
);
|
);
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
"reverse lookup of none existing value should be empty list",
|
"reverse lookup of none existing value should be empty list",
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
pollingLookup.unapply("does't exist")
|
pollingLookup.unapply("does't exist")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class LoadingCacheTest
|
||||||
return "value2";
|
return "value2";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Assert.assertEquals(loadingCache.getAllPresent(IMMUTABLE_MAP.keySet()), Collections.EMPTY_MAP);
|
Assert.assertEquals(loadingCache.getAllPresent(IMMUTABLE_MAP.keySet()), Collections.emptyMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class JdbcDataFetcherTest extends InitializedNullHandlingTest
|
||||||
);
|
);
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
"reverse lookup of none existing value should be empty list",
|
"reverse lookup of none existing value should be empty list",
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
jdbcDataFetcher.reverseFetchKeys("does't exist")
|
jdbcDataFetcher.reverseFetchKeys("does't exist")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class InputRowSerdeTest
|
||||||
|
|
||||||
Assert.assertEquals(timestamp, out.getTimestampFromEpoch());
|
Assert.assertEquals(timestamp, out.getTimestampFromEpoch());
|
||||||
Assert.assertEquals(dims, out.getDimensions());
|
Assert.assertEquals(dims, out.getDimensions());
|
||||||
Assert.assertEquals(Collections.EMPTY_LIST, out.getDimension("dim_non_existing"));
|
Assert.assertEquals(Collections.emptyList(), out.getDimension("dim_non_existing"));
|
||||||
Assert.assertEquals(ImmutableList.of("d1v"), out.getDimension("d1"));
|
Assert.assertEquals(ImmutableList.of("d1v"), out.getDimension("d1"));
|
||||||
Assert.assertEquals(ImmutableList.of("d2v1", "d2v2"), out.getDimension("d2"));
|
Assert.assertEquals(ImmutableList.of("d2v1", "d2v2"), out.getDimension("d2"));
|
||||||
Assert.assertEquals(200L, out.getRaw("d3"));
|
Assert.assertEquals(200L, out.getRaw("d3"));
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class WorkerCategorySpec
|
||||||
@JsonProperty("strong") boolean strong
|
@JsonProperty("strong") boolean strong
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.categoryMap = categoryMap == null ? Collections.EMPTY_MAP : categoryMap;
|
this.categoryMap = categoryMap == null ? Collections.emptyMap() : categoryMap;
|
||||||
this.strong = strong;
|
this.strong = strong;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class WorkerCategorySpec
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.defaultCategory = defaultCategory;
|
this.defaultCategory = defaultCategory;
|
||||||
this.categoryAffinity = categoryAffinity == null ? Collections.EMPTY_MAP : categoryAffinity;
|
this.categoryAffinity = categoryAffinity == null ? Collections.emptyMap() : categoryAffinity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ITTLSCertificateCheckerModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,9 @@ public class LookupsState<T>
|
||||||
@JsonProperty("toDrop") Set<String> toDrop
|
@JsonProperty("toDrop") Set<String> toDrop
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.current = current == null ? Collections.EMPTY_MAP : current;
|
this.current = current == null ? Collections.emptyMap() : current;
|
||||||
this.toLoad = toLoad == null ? Collections.EMPTY_MAP : toLoad;
|
this.toLoad = toLoad == null ? Collections.emptyMap() : toLoad;
|
||||||
this.toDrop = toDrop == null ? Collections.EMPTY_SET : toDrop;
|
this.toDrop = toDrop == null ? Collections.emptySet() : toDrop;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class StringColumnAggregationTest
|
||||||
}
|
}
|
||||||
|
|
||||||
aggregationTestHelper = AggregationTestHelper.createGroupByQueryAggregationTestHelper(
|
aggregationTestHelper = AggregationTestHelper.createGroupByQueryAggregationTestHelper(
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
new GroupByQueryConfig(),
|
new GroupByQueryConfig(),
|
||||||
tempFolder
|
tempFolder
|
||||||
);
|
);
|
||||||
|
@ -231,7 +231,7 @@ public class StringColumnAggregationTest
|
||||||
)
|
)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Sequence seq = AggregationTestHelper.createTimeseriesQueryAggregationTestHelper(Collections.EMPTY_LIST, tempFolder)
|
Sequence seq = AggregationTestHelper.createTimeseriesQueryAggregationTestHelper(Collections.emptyList(), tempFolder)
|
||||||
.runQueryOnSegmentsObjs(segments, query);
|
.runQueryOnSegmentsObjs(segments, query);
|
||||||
TimeseriesResultValue result = ((Result<TimeseriesResultValue>) Iterables.getOnlyElement(seq.toList())).getValue();
|
TimeseriesResultValue result = ((Result<TimeseriesResultValue>) Iterables.getOnlyElement(seq.toList())).getValue();
|
||||||
|
|
||||||
|
|
|
@ -72,13 +72,13 @@ public class DoubleMeanAggregationTest
|
||||||
{
|
{
|
||||||
|
|
||||||
groupByQueryTestHelper = AggregationTestHelper.createGroupByQueryAggregationTestHelper(
|
groupByQueryTestHelper = AggregationTestHelper.createGroupByQueryAggregationTestHelper(
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
new GroupByQueryConfig(),
|
new GroupByQueryConfig(),
|
||||||
tempFolder
|
tempFolder
|
||||||
);
|
);
|
||||||
|
|
||||||
timeseriesQueryTestHelper = AggregationTestHelper.createTimeseriesQueryAggregationTestHelper(
|
timeseriesQueryTestHelper = AggregationTestHelper.createTimeseriesQueryAggregationTestHelper(
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
tempFolder
|
tempFolder
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class MapLookupExtractorTest
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Assert.assertEquals(Sets.newHashSet(""), Sets.newHashSet(fn.unapply("empty_string")));
|
Assert.assertEquals(Sets.newHashSet(""), Sets.newHashSet(fn.unapply("empty_string")));
|
||||||
Assert.assertEquals("not existing value returns empty list", Collections.EMPTY_LIST, fn.unapply("not There"));
|
Assert.assertEquals("not existing value returns empty list", Collections.emptyList(), fn.unapply("not There"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -9879,7 +9879,7 @@ public class GroupByQueryRunnerTest extends InitializedNullHandlingTest
|
||||||
.setInterval(QueryRunnerTestHelper.FULL_ON_INTERVAL_SPEC)
|
.setInterval(QueryRunnerTestHelper.FULL_ON_INTERVAL_SPEC)
|
||||||
.setLimitSpec(
|
.setLimitSpec(
|
||||||
new DefaultLimitSpec(
|
new DefaultLimitSpec(
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
6
|
6
|
||||||
)
|
)
|
||||||
).setAggregatorSpecs(QueryRunnerTestHelper.ROWS_COUNT)
|
).setAggregatorSpecs(QueryRunnerTestHelper.ROWS_COUNT)
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class TopNSequenceTest
|
||||||
private static final Ordering<String> ASC = Ordering.natural();
|
private static final Ordering<String> ASC = Ordering.natural();
|
||||||
private static final Ordering<String> DESC = Ordering.natural().reverse();
|
private static final Ordering<String> DESC = Ordering.natural().reverse();
|
||||||
|
|
||||||
private static final List<String> EMPTY = Collections.EMPTY_LIST;
|
private static final List<String> EMPTY = Collections.emptyList();
|
||||||
private static final List<String> SINGLE = Collections.singletonList("a");
|
private static final List<String> SINGLE = Collections.singletonList("a");
|
||||||
private static final List<String> RAW_ASC = Lists.newArrayList(Splitter.fixedLength(1).split("abcdefghijk"));
|
private static final List<String> RAW_ASC = Lists.newArrayList(Splitter.fixedLength(1).split("abcdefghijk"));
|
||||||
private static final List<String> RAW_DESC = Lists.newArrayList(Splitter.fixedLength(1).split("kjihgfedcba"));
|
private static final List<String> RAW_DESC = Lists.newArrayList(Splitter.fixedLength(1).split("kjihgfedcba"));
|
||||||
|
|
|
@ -79,12 +79,12 @@ public class DummyStringVirtualColumnTest extends InitializedNullHandlingTest
|
||||||
mixedSegments = Lists.newArrayList(incrementalIndexSegment, queryableIndexSegment);
|
mixedSegments = Lists.newArrayList(incrementalIndexSegment, queryableIndexSegment);
|
||||||
|
|
||||||
topNTestHelper = AggregationTestHelper.createTopNQueryAggregationTestHelper(
|
topNTestHelper = AggregationTestHelper.createTopNQueryAggregationTestHelper(
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
groupByTestHelper = AggregationTestHelper.createGroupByQueryAggregationTestHelper(
|
groupByTestHelper = AggregationTestHelper.createGroupByQueryAggregationTestHelper(
|
||||||
Collections.EMPTY_LIST,
|
Collections.emptyList(),
|
||||||
new GroupByQueryConfig(),
|
new GroupByQueryConfig(),
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class ComposingEmitterModule implements DruidModule
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|
|
@ -62,11 +62,10 @@ public class AuthenticatorMapperModule implements DruidModule
|
||||||
LifecycleModule.register(binder, AuthenticatorMapper.class);
|
LifecycleModule.register(binder, AuthenticatorMapper.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class AuthenticatorMapperProvider implements Provider<AuthenticatorMapper>
|
private static class AuthenticatorMapperProvider implements Provider<AuthenticatorMapper>
|
||||||
|
|
|
@ -62,11 +62,10 @@ public class AuthorizerMapperModule implements DruidModule
|
||||||
LifecycleModule.register(binder, AuthorizerMapper.class);
|
LifecycleModule.register(binder, AuthorizerMapper.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Module> getJacksonModules()
|
public List<? extends Module> getJacksonModules()
|
||||||
{
|
{
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class AuthorizerMapperProvider implements Provider<AuthorizerMapper>
|
private static class AuthorizerMapperProvider implements Provider<AuthorizerMapper>
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class LookupSnapshotTakerTest
|
||||||
{
|
{
|
||||||
File snapshotFile = lookupSnapshotTaker.getPersistFile(TIER1);
|
File snapshotFile = lookupSnapshotTaker.getPersistFile(TIER1);
|
||||||
Assert.assertTrue(snapshotFile.createNewFile());
|
Assert.assertTrue(snapshotFile.createNewFile());
|
||||||
Assert.assertEquals(Collections.EMPTY_LIST, lookupSnapshotTaker.pullExistingSnapshot(TIER1));
|
Assert.assertEquals(Collections.emptyList(), lookupSnapshotTaker.pullExistingSnapshot(TIER1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = ISE.class)
|
@Test(expected = ISE.class)
|
||||||
|
@ -144,6 +144,6 @@ public class LookupSnapshotTakerTest
|
||||||
File directory = temporaryFolder.newFolder();
|
File directory = temporaryFolder.newFolder();
|
||||||
LookupSnapshotTaker lookupSnapshotTaker = new LookupSnapshotTaker(mapper, directory.getAbsolutePath());
|
LookupSnapshotTaker lookupSnapshotTaker = new LookupSnapshotTaker(mapper, directory.getAbsolutePath());
|
||||||
List<LookupBean> actualList = lookupSnapshotTaker.pullExistingSnapshot(TIER1);
|
List<LookupBean> actualList = lookupSnapshotTaker.pullExistingSnapshot(TIER1);
|
||||||
Assert.assertEquals(Collections.EMPTY_LIST, actualList);
|
Assert.assertEquals(Collections.emptyList(), actualList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class LookupCoordinatorManagerTest
|
||||||
private static final LookupsState<LookupExtractorFactoryMapContainer> LOOKUPS_STATE = new LookupsState<>(
|
private static final LookupsState<LookupExtractorFactoryMapContainer> LOOKUPS_STATE = new LookupsState<>(
|
||||||
SINGLE_LOOKUP_MAP_V0,
|
SINGLE_LOOKUP_MAP_V0,
|
||||||
SINGLE_LOOKUP_MAP_V1,
|
SINGLE_LOOKUP_MAP_V1,
|
||||||
Collections.EMPTY_SET
|
Collections.emptySet()
|
||||||
);
|
);
|
||||||
|
|
||||||
private static final AtomicLong EVENT_EMITS = new AtomicLong(0L);
|
private static final AtomicLong EVENT_EMITS = new AtomicLong(0L);
|
||||||
|
@ -1352,7 +1352,7 @@ public class LookupCoordinatorManagerTest
|
||||||
EasyMock.<TypeReference>anyObject(),
|
EasyMock.<TypeReference>anyObject(),
|
||||||
EasyMock.<AtomicReference>isNull()
|
EasyMock.<AtomicReference>isNull()
|
||||||
)).andReturn(
|
)).andReturn(
|
||||||
new AtomicReference<>(Collections.EMPTY_MAP)).anyTimes();
|
new AtomicReference<>(Collections.emptyMap())).anyTimes();
|
||||||
|
|
||||||
EasyMock.replay(configManager);
|
EasyMock.replay(configManager);
|
||||||
|
|
||||||
|
|
|
@ -128,29 +128,29 @@ public class NumberedShardSpecTest
|
||||||
//incomplete partition sets
|
//incomplete partition sets
|
||||||
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
||||||
ImmutableList.of(chunk0),
|
ImmutableList.of(chunk0),
|
||||||
Collections.EMPTY_SET
|
Collections.emptySet()
|
||||||
);
|
);
|
||||||
|
|
||||||
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
||||||
ImmutableList.of(chunk1),
|
ImmutableList.of(chunk1),
|
||||||
Collections.EMPTY_SET
|
Collections.emptySet()
|
||||||
);
|
);
|
||||||
|
|
||||||
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
||||||
ImmutableList.of(chunk4),
|
ImmutableList.of(chunk4),
|
||||||
Collections.EMPTY_SET
|
Collections.emptySet()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
||||||
ImmutableList.of(chunk0, chunk4),
|
ImmutableList.of(chunk0, chunk4),
|
||||||
Collections.EMPTY_SET
|
Collections.emptySet()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
testVersionedIntervalTimelineBehaviorForNumberedShardSpec(
|
||||||
ImmutableList.of(chunk1, chunk4),
|
ImmutableList.of(chunk1, chunk4),
|
||||||
Collections.EMPTY_SET
|
Collections.emptySet()
|
||||||
);
|
);
|
||||||
|
|
||||||
//complete partition sets
|
//complete partition sets
|
||||||
|
|
Loading…
Reference in New Issue