Skip to content

Commit

Permalink
cleanup and remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
xvrl committed Nov 11, 2015
1 parent 07157f9 commit fa6142e
Show file tree
Hide file tree
Showing 174 changed files with 231 additions and 476 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.AWSSessionCredentials;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.druid.concurrent.Execs;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
import com.metamx.common.guava.MergeSequence;
import com.metamx.common.guava.Sequence;
import com.metamx.common.guava.Sequences;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
Expand All @@ -22,6 +17,12 @@
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.concurrent.TimeUnit;

@State(Scope.Benchmark)
public class MergeSequenceBenchmark
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,18 @@
package io.druid.benchmark;

import com.google.common.base.Supplier;
import com.google.common.io.Closer;
import com.metamx.common.logger.Logger;
import io.druid.collections.ResourceHolder;
import io.druid.collections.StupidPool;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OperationsPerInvocation;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import io.druid.timeline.partition.ImmutablePartitionHolder;
import io.druid.timeline.partition.PartitionChunk;
import io.druid.timeline.partition.PartitionHolder;
import org.joda.time.DateTime;
import org.joda.time.Interval;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@

package io.druid.collections;

import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;
import com.google.common.collect.Iterables;

import com.google.common.collect.Sets;
import org.junit.Assert;
import org.junit.Test;


import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class CombiningIterableTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
package io.druid.collections;

import com.google.common.collect.PeekingIterator;

import com.metamx.common.guava.nary.BinaryFn;

import org.easymock.EasyMock;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.easymock.EasyMock;
import org.junit.Test;

import java.util.Comparator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package io.druid.collections;

import com.google.common.collect.ImmutableMap;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
Expand Down
4 changes: 2 additions & 2 deletions common/src/test/java/io/druid/collections/IntListTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

package io.druid.collections;

import java.nio.IntBuffer;

import org.junit.Assert;
import org.junit.Test;

import java.nio.IntBuffer;

/**
*/
public class IntListTest
Expand Down
2 changes: 0 additions & 2 deletions common/src/test/java/io/druid/collections/StupidPoolTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@

import com.google.common.base.Supplier;
import com.metamx.common.ISE;

import org.easymock.EasyMock;
import org.hamcrest.core.IsInstanceOf;
import org.hamcrest.core.IsNull;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

package io.druid.collections;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.io.IOException;
Expand Down
2 changes: 0 additions & 2 deletions common/src/test/java/io/druid/common/utils/JodaUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package io.druid.common.utils;

import org.joda.time.DateTimeConstants;
import org.joda.time.Duration;
import org.joda.time.Interval;
import org.joda.time.Period;
Expand All @@ -26,7 +25,6 @@

import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@

package io.druid.common.utils;

import com.metamx.common.ISE;
import org.junit.Assert;
import org.junit.Test;

import com.metamx.common.ISE;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

public class PropUtilsTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package io.druid.common.utils;

import io.druid.collections.IntList;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -33,8 +34,6 @@
import java.nio.channels.WritableByteChannel;
import java.nio.charset.Charset;

import io.druid.collections.IntList;

public class SerializerUtilsTest
{
private SerializerUtils serializerUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@

package io.druid.common.utils;

import com.metamx.common.ISE;
import org.hamcrest.number.OrderingComparison;
import org.junit.Assert;
import org.junit.Test;

import org.hamcrest.number.OrderingComparison;
import com.metamx.common.ISE;

public class SocketUtilTest
{
private final int MAX_PORT = 0xffff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

package io.druid.metadata;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Assert;
import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;

public class DefaultPasswordProviderTest
{
private static final String pwd = "nothing";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

package io.druid.metadata;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Assert;
import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;

public class MetadataStorageConnectorConfigTest {

private static final ObjectMapper jsonMapper = new ObjectMapper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;
import com.google.common.collect.Sets;
import com.metamx.common.Pair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

import com.google.common.io.ByteSource;
import com.google.inject.Inject;
import com.metamx.common.CompressionUtils;
import com.metamx.common.ISE;
import com.metamx.common.MapUtils;
import com.metamx.common.logger.Logger;
import io.druid.segment.loading.DataSegmentPuller;
import io.druid.segment.loading.SegmentLoadingException;
import io.druid.timeline.DataSegment;
import com.metamx.common.CompressionUtils;
import org.apache.commons.io.FileUtils;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import io.druid.guice.Binders;
import io.druid.guice.JsonConfigProvider;
import io.druid.guice.LazySingleton;
import io.druid.guice.annotations.Json;
import io.druid.initialization.DruidModule;

import java.net.URISyntaxException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.io.InputStream;
import java.net.URISyntaxException;

import static org.easymock.EasyMock.*;
import static org.easymock.EasyMock.expect;

public class AzureByteSourceTest extends EasyMockSupport
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.ArrayList;
import java.util.List;

import static org.easymock.EasyMock.*;
import static org.easymock.EasyMock.expect;

public class AzureDataSegmentKillerTest extends EasyMockSupport
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import java.net.URISyntaxException;
import java.nio.file.Files;

import static org.easymock.EasyMock.*;
import static org.easymock.EasyMock.expect;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
import java.net.URISyntaxException;
import java.util.Map;

import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.junit.Assert.assertEquals;

import static org.easymock.EasyMock.*;

public class AzureDataSegmentPusherTest extends EasyMockSupport
{
private static final String containerName = "container";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@
import io.druid.segment.loading.URIDataPuller;
import io.druid.timeline.DataSegment;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.LocatedFileStatus;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.PathFilter;
import org.apache.hadoop.fs.RemoteIterator;

import javax.tools.FileObject;
Expand All @@ -50,7 +48,6 @@
import java.net.URI;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.regex.Pattern;

/**
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.common.base.Preconditions;
import com.metamx.common.ISE;
import io.druid.segment.loading.DataSegmentPuller;
import io.druid.segment.loading.LoadSpec;
import io.druid.segment.loading.SegmentLoadingException;
import org.apache.hadoop.fs.Path;

import java.io.File;
import java.util.Map;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

import java.io.File;

/**
*/
public class ApproximateHistogramAggregationTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import io.druid.query.Result;
import io.druid.query.TestQueryRunners;
import io.druid.query.aggregation.AggregatorFactory;
import io.druid.query.aggregation.DoubleMinAggregatorFactory;
import io.druid.query.aggregation.DoubleMaxAggregatorFactory;
import io.druid.query.aggregation.DoubleMinAggregatorFactory;
import io.druid.query.aggregation.PostAggregator;
import io.druid.query.topn.TopNQuery;
import io.druid.query.topn.TopNQueryBuilder;
Expand All @@ -45,7 +45,6 @@
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
Loading

0 comments on commit fa6142e

Please sign in to comment.