Skip to content

Commit

Permalink
converted to always use slf4j (#1894)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfecher authored May 25, 2022
1 parent 8ea2c28 commit cc00755
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayUtils;
import org.locationtech.geowave.core.index.IndexMetaData;
import org.locationtech.geowave.core.index.IndexUtils;
Expand All @@ -35,9 +33,11 @@
import org.locationtech.geowave.core.index.persist.PersistenceUtils;
import org.locationtech.geowave.core.index.sfc.binned.BinnedSFCUtils;
import org.locationtech.geowave.core.index.sfc.tiered.TieredSFCIndexStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BasicSFCIndexStrategy implements NumericIndexStrategy {
private static final Logger LOGGER = LogManager.getLogger(BasicSFCIndexStrategy.class);
private static final Logger LOGGER = LoggerFactory.getLogger(BasicSFCIndexStrategy.class);
private SpaceFillingCurve sfc;
private NumericDimensionDefinition[] baseDefinitions;

Expand Down Expand Up @@ -147,10 +147,7 @@ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
if ((obj == null) || (getClass() != obj.getClass())) {
return false;
}
final BasicSFCIndexStrategy other = (BasicSFCIndexStrategy) obj;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayUtils;
import org.locationtech.geowave.core.index.IndexMetaData;
import org.locationtech.geowave.core.index.IndexUtils;
Expand All @@ -35,14 +33,16 @@
import org.locationtech.geowave.core.index.persist.PersistenceUtils;
import org.locationtech.geowave.core.index.sfc.SpaceFillingCurve;
import org.locationtech.geowave.core.index.sfc.binned.BinnedSFCUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This class wraps a single SpaceFillingCurve implementation with a tiered approach to indexing (an
* SFC with a tier ID). This can be utilized by an overall HierarchicalNumericIndexStrategy as an
* encapsulated sub-strategy.
*/
public class SingleTierSubStrategy implements NumericIndexStrategy {
private static final Logger LOGGER = LogManager.getLogger(SingleTierSubStrategy.class);
private static final Logger LOGGER = LoggerFactory.getLogger(SingleTierSubStrategy.class);
private SpaceFillingCurve sfc;
private NumericDimensionDefinition[] baseDefinitions;
public byte tier;
Expand Down Expand Up @@ -156,10 +156,7 @@ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
if ((obj == null) || (getClass() != obj.getClass())) {
return false;
}
final SingleTierSubStrategy other = (SingleTierSubStrategy) obj;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayRange;
import org.locationtech.geowave.core.index.ByteArrayUtils;
import org.locationtech.geowave.core.index.Coordinate;
Expand All @@ -32,6 +30,8 @@
import org.locationtech.geowave.core.index.numeric.MultiDimensionalNumericData;
import org.locationtech.geowave.core.index.numeric.NumericData;
import org.locationtech.geowave.core.index.numeric.NumericValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A simple 1-dimensional NumericIndexStrategy that represents an index of signed integer values
Expand All @@ -40,7 +40,7 @@
* inserting ranges because there will be too much replication of data.
*/
public abstract class SimpleNumericIndexStrategy<T extends Number> implements NumericIndexStrategy {
private static final Logger LOGGER = LogManager.getLogger(SimpleNumericIndexStrategy.class);
private static final Logger LOGGER = LoggerFactory.getLogger(SimpleNumericIndexStrategy.class);

private final NumberLexicoder<T> lexicoder;
private final NumericDimensionDefinition[] definitions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.cli.operations.config.options.ConfigOptions;
import org.locationtech.geowave.core.cli.parser.CommandLineOperationParams;
import org.locationtech.geowave.core.cli.parser.OperationParser;
Expand All @@ -35,9 +33,11 @@
import org.locationtech.geowave.mapreduce.operations.CopyCommandOptions;
import org.locationtech.geowave.mapreduce.output.GeoWaveOutputFormat;
import org.locationtech.geowave.mapreduce.output.GeoWaveOutputKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class StoreCopyJobRunner extends Configured implements Tool {
private static final Logger LOGGER = LogManager.getLogger(StoreCopyJobRunner.class);
private static final Logger LOGGER = LoggerFactory.getLogger(StoreCopyJobRunner.class);

private final DataStorePluginOptions inputStoreOptions;
private final DataStorePluginOptions outputStoreOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.IndexMetaData;
import org.locationtech.geowave.core.index.MultiDimensionalCoordinateRanges;
import org.locationtech.geowave.core.index.MultiDimensionalCoordinateRangesArray;
Expand Down Expand Up @@ -46,12 +44,13 @@
import org.locationtech.geowave.core.store.statistics.index.FieldVisibilityCountStatistic.FieldVisibilityCountValue;
import org.locationtech.geowave.core.store.statistics.index.IndexMetaDataSetStatistic.IndexMetaDataSetValue;
import org.locationtech.geowave.core.store.util.DataStoreUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Iterators;

/** This class represents basic numeric contraints applied to a datastore query */
public class BaseConstraintsQuery extends BaseFilteredIndexQuery {

private static final Logger LOGGER = LogManager.getLogger(BaseConstraintsQuery.class);
private static final Logger LOGGER = LoggerFactory.getLogger(BaseConstraintsQuery.class);
private boolean queryFiltersEnabled;

public final Pair<InternalDataAdapter<?>, Aggregation<?, ?, ?>> aggregation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import java.util.Map;
import javax.annotation.Nullable;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.store.CloseableIterator;
import org.locationtech.geowave.core.store.CloseableIteratorWrapper;
import org.locationtech.geowave.core.store.DataStoreOptions;
Expand All @@ -38,11 +36,13 @@
import org.locationtech.geowave.core.store.statistics.index.FieldVisibilityCountStatistic.FieldVisibilityCountValue;
import org.locationtech.geowave.core.store.util.GeoWaveRowIteratorFactory;
import org.locationtech.geowave.core.store.util.MergingEntryIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Iterators;

abstract class BaseFilteredIndexQuery extends BaseQuery {
protected List<QueryFilter> clientFilters;
private static final Logger LOGGER = LogManager.getLogger(BaseFilteredIndexQuery.class);
private static final Logger LOGGER = LoggerFactory.getLogger(BaseFilteredIndexQuery.class);

public BaseFilteredIndexQuery(
final short[] adapterIds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import java.util.UUID;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArray;
import org.locationtech.geowave.core.index.ByteArrayRange;
import org.locationtech.geowave.core.index.ByteArrayUtils;
Expand Down Expand Up @@ -61,14 +59,16 @@
import org.locationtech.geowave.core.store.operations.RowReader;
import org.locationtech.geowave.core.store.operations.RowWriter;
import org.locationtech.geowave.core.store.util.DataStoreUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
import com.google.common.collect.Ordering;
import com.google.common.collect.Sets;
import com.google.common.primitives.UnsignedBytes;

public class MemoryDataStoreOperations implements DataStoreOperations {
private static final Logger LOGGER = LogManager.getLogger(MemoryDataStoreOperations.class);
private static final Logger LOGGER = LoggerFactory.getLogger(MemoryDataStoreOperations.class);
private final Map<String, SortedSet<MemoryStoreEntry>> storeData =
Collections.synchronizedMap(new HashMap<String, SortedSet<MemoryStoreEntry>>());
private final Map<MetadataType, SortedSet<MemoryMetadataEntry>> metadataStore =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import java.util.Iterator;
import java.util.Map;
import org.apache.commons.lang3.NotImplementedException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.store.adapter.AdapterIndexMappingStore;
import org.locationtech.geowave.core.store.adapter.PersistentAdapterStore;
import org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter;
Expand All @@ -24,9 +22,11 @@
import org.locationtech.geowave.core.store.callback.ScanCallback;
import org.locationtech.geowave.core.store.entities.GeoWaveRow;
import org.locationtech.geowave.core.store.query.filter.QueryFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MergingEntryIterator<T> extends NativeEntryIteratorWrapper<T> {
private static final Logger LOGGER = LogManager.getLogger(NativeEntryIteratorWrapper.class);
private static final Logger LOGGER = LoggerFactory.getLogger(NativeEntryIteratorWrapper.class);

private final Map<Short, RowMergingDataAdapter> mergingAdapters;
private final Map<Short, RowTransform> transforms;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

import org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.accumulo.core.data.Mutation;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArray;
import org.locationtech.geowave.core.store.entities.GeoWaveRow;
import org.locationtech.geowave.core.store.operations.RowWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

abstract public class AbstractAccumuloWriter implements RowWriter {
private static final Logger LOGGER = LogManager.getLogger(AbstractAccumuloWriter.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractAccumuloWriter.class);
private org.apache.accumulo.core.client.BatchWriter batchWriter;
private final AccumuloOperations operations;
private final String tableName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
import org.apache.accumulo.core.client.BatchDeleter;
import org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayRange;
import org.locationtech.geowave.core.store.entities.GeoWaveRow;
import org.locationtech.geowave.core.store.entities.GeoWaveRowIteratorTransformer;
import org.locationtech.geowave.core.store.operations.Deleter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AccumuloDeleter<T> extends AccumuloReader<T> implements Deleter<T> {
private static final Logger LOGGER = LogManager.getLogger(AccumuloOperations.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloOperations.class);

private boolean closed = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
import org.apache.accumulo.core.security.Authorizations;
import org.apache.commons.lang.ArrayUtils;
import org.apache.hadoop.io.Text;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArray;
import org.locationtech.geowave.core.index.ByteArrayRange;
import org.locationtech.geowave.core.index.ByteArrayUtils;
Expand Down Expand Up @@ -123,6 +121,8 @@
import org.locationtech.geowave.mapreduce.MapReduceDataStoreOperations;
import org.locationtech.geowave.mapreduce.splits.GeoWaveRowRange;
import org.locationtech.geowave.mapreduce.splits.RecordReaderParams;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
Expand All @@ -142,7 +142,7 @@ public class AccumuloOperations implements
ConnectorCloseListener,
Closeable {
private static Object CONNECTOR_MUTEX = new Object();
private static final Logger LOGGER = LogManager.getLogger(AccumuloOperations.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloOperations.class);
private static final int DEFAULT_NUM_THREADS = 16;
private static final long DEFAULT_TIMEOUT_MILLIS = 1000L; // 1 second
private static final long DEFAULT_BYTE_BUFFER_SIZE = 1048576L; // 1 MB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.WholeRowIterator;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayRange;
import org.locationtech.geowave.core.index.ByteArrayUtils;
import org.locationtech.geowave.core.store.entities.GeoWaveKey;
Expand All @@ -32,12 +30,14 @@
import org.locationtech.geowave.core.store.operations.SimpleParallelDecoder;
import org.locationtech.geowave.core.store.util.DataStoreUtils;
import org.locationtech.geowave.datastore.accumulo.AccumuloRow;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Throwables;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;

public class AccumuloReader<T> implements RowReader<T> {
private static final Logger LOGGER = LogManager.getLogger(AccumuloReader.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloReader.class);
protected final ScannerBase scanner;
private final Iterator<Entry<Key, Value>> baseIter;
private ParallelDecoder<T> parallelDecoder = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
import org.apache.hadoop.hbase.regionserver.Region;
import org.apache.hadoop.hbase.regionserver.RegionScanner;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayUtils;
import org.locationtech.geowave.core.index.StringUtils;
import org.locationtech.geowave.datastore.hbase.coprocessors.protobuf.HBaseBulkDeleteProtosServer.BulkDeleteRequest;
Expand All @@ -44,14 +42,16 @@
import org.locationtech.geowave.datastore.hbase.coprocessors.protobuf.HBaseBulkDeleteProtosServer.BulkDeleteService;
import org.locationtech.geowave.datastore.hbase.filters.HBaseDistributableFilter;
import org.locationtech.geowave.datastore.hbase.filters.HBaseNumericIndexStrategyFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.protobuf.RpcCallback;
import com.google.protobuf.RpcController;
import com.google.protobuf.Service;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public class HBaseBulkDeleteEndpoint extends BulkDeleteService implements RegionCoprocessor {
private static final String NO_OF_VERSIONS_TO_DELETE = "noOfVersionsToDelete";
private static final Logger LOGGER = LogManager.getLogger(HBaseBulkDeleteEndpoint.class);
private static final Logger LOGGER = LoggerFactory.getLogger(HBaseBulkDeleteEndpoint.class);

private RegionCoprocessorEnvironment env;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import org.apache.hadoop.hbase.regionserver.Store;
import org.apache.hadoop.hbase.regionserver.compactions.CompactionLifeCycleTracker;
import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayUtils;
import org.locationtech.geowave.core.store.server.ServerOpConfig.ServerOpScope;
import org.locationtech.geowave.datastore.hbase.server.HBaseServerOp;
Expand All @@ -42,11 +40,13 @@
import org.locationtech.geowave.datastore.hbase.server.ServerSideOperationStore;
import org.locationtech.geowave.datastore.hbase.server.ServerSideOperationUtils;
import org.locationtech.geowave.datastore.hbase.util.HBaseUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableSet;

public class ServerSideOperationsObserver implements RegionObserver, RegionCoprocessor {

private static final Logger LOGGER = LogManager.getLogger(ServerSideOperationsObserver.class);
private static final Logger LOGGER = LoggerFactory.getLogger(ServerSideOperationsObserver.class);
private static final int SERVER_OP_OPTIONS_PREFIX_LENGTH =
ServerSideOperationUtils.SERVER_OP_OPTIONS_PREFIX.length();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.RowMutations;
import org.apache.hadoop.hbase.security.visibility.CellVisibility;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.locationtech.geowave.core.index.ByteArrayUtils;
import org.locationtech.geowave.core.index.StringUtils;
import org.locationtech.geowave.core.store.base.dataidx.DataIndexUtils;
import org.locationtech.geowave.core.store.entities.GeoWaveRow;
import org.locationtech.geowave.core.store.entities.GeoWaveValue;
import org.locationtech.geowave.core.store.operations.RowWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HBaseDataIndexWriter implements RowWriter {
private static final Logger LOGGER = LogManager.getLogger(HBaseWriter.class);
private static final Logger LOGGER = LoggerFactory.getLogger(HBaseWriter.class);

private final BufferedMutator mutator;

Expand Down
Loading

0 comments on commit cc00755

Please sign in to comment.