[ https://issues.apache.org/jira/browse/DRILL-6691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16699191#comment-16699191 ]
ASF GitHub Bot commented on DRILL-6691: --------------------------------------- asfgit closed pull request #1550: DRILL-6691: Unify checkstyle-config.xml files. URL: https://github.com/apache/drill/pull/1550 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDescriptor.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDescriptor.java index ae386ab93a0..18a22f92e2f 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDescriptor.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDescriptor.java @@ -22,9 +22,6 @@ import java.util.List; import java.util.Set; -import org.apache.drill.shaded.guava.com.google.common.collect.Lists; -import org.apache.drill.shaded.guava.com.google.common.collect.Sets; - import org.apache.calcite.plan.RelOptCost; import org.apache.calcite.plan.RelOptPlanner; import org.apache.calcite.rel.RelFieldCollation.NullDirection; @@ -35,13 +32,14 @@ import org.apache.drill.exec.planner.cost.DrillCostBase; import org.apache.drill.exec.planner.cost.DrillCostBase.DrillCostFactory; import org.apache.drill.exec.planner.cost.PluginCost; -import org.apache.drill.exec.planner.index.IndexProperties; import org.apache.drill.exec.store.mapr.PluginConstants; import org.apache.drill.exec.util.EncodedSchemaPathSet; import org.apache.drill.common.expression.LogicalExpression; import org.apache.drill.shaded.guava.com.google.common.base.Preconditions; import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableSet; +import org.apache.drill.shaded.guava.com.google.common.collect.Lists; +import org.apache.drill.shaded.guava.com.google.common.collect.Sets; public class MapRDBIndexDescriptor extends DrillIndexDescriptor { diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDiscover.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDiscover.java index d949634c815..95b981326c9 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDiscover.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBIndexDiscover.java @@ -18,7 +18,6 @@ package org.apache.drill.exec.planner.index; -import org.apache.drill.shaded.guava.com.google.common.collect.Maps; import com.mapr.db.Admin; import com.mapr.db.MapRDB; import com.mapr.db.exceptions.DBException; @@ -64,6 +63,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.drill.shaded.guava.com.google.common.collect.Maps; public class MapRDBIndexDiscover extends IndexDiscoverBase implements IndexDiscover { diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBStatistics.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBStatistics.java index 6fedaffd092..37ea8d5812e 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBStatistics.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/planner/index/MapRDBStatistics.java @@ -17,11 +17,6 @@ */ package org.apache.drill.exec.planner.index; -import org.apache.drill.shaded.guava.com.google.common.base.Charsets; -import org.apache.drill.shaded.guava.com.google.common.base.Preconditions; -import org.apache.drill.shaded.guava.com.google.common.collect.Lists; - -import org.apache.drill.shaded.guava.com.google.common.collect.Maps; import org.apache.calcite.plan.RelOptUtil; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.metadata.RelMdUtil; @@ -40,7 +35,6 @@ import org.apache.drill.common.expression.LogicalExpression; import org.apache.drill.exec.physical.base.DbGroupScan; import org.apache.drill.exec.physical.base.GroupScan; -import org.apache.drill.exec.planner.common.DrillRelOptUtil; import org.apache.drill.exec.planner.common.DrillScanRelBase; import org.apache.drill.exec.planner.logical.DrillOptiq; import org.apache.drill.exec.planner.logical.DrillParseContext; @@ -61,6 +55,10 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; +import org.apache.drill.shaded.guava.com.google.common.base.Charsets; +import org.apache.drill.shaded.guava.com.google.common.base.Preconditions; +import org.apache.drill.shaded.guava.com.google.common.collect.Lists; +import org.apache.drill.shaded.guava.com.google.common.collect.Maps; public class MapRDBStatistics implements Statistics { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MapRDBStatistics.class); @@ -835,7 +833,7 @@ private RexNode convertLikeToRange(RexCall condition, RexBuilder builder) { startKey = prefix.getBytes(Charsets.UTF_8); stopKey = startKey.clone(); boolean isMaxVal = true; - for (int i = stopKey.length - 1; i >= 0 ; --i) { + for (int i = stopKey.length - 1; i >= 0; --i) { int nextByteValue = (0xff & stopKey[i]) + 1; if (nextByteValue < 0xff) { stopKey[i] = (byte) nextByteValue; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatMatcher.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatMatcher.java index f663fcec645..1fca75c7c7b 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatMatcher.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatMatcher.java @@ -58,7 +58,7 @@ public DrillTable isReadable(DrillFileSystem fs, @Override public boolean isFileReadable(DrillFileSystem fs, FileStatus status) throws IOException { - return (status instanceof MapRFileStatus) + return (status instanceof MapRFileStatus) && ((MapRFileStatus) status).isTable() && isSupportedTable((MapRFileStatus) status); } diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatPlugin.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatPlugin.java index c8dfe703425..aeb117a8a05 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatPlugin.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/TableFormatPlugin.java @@ -33,8 +33,6 @@ import org.apache.drill.exec.server.DrillbitContext; import org.apache.drill.exec.store.AbstractStoragePlugin; import org.apache.drill.exec.store.StoragePluginOptimizerRule; -import org.apache.drill.exec.store.dfs.FileSystemConfig; -import org.apache.drill.exec.store.dfs.FileSystemPlugin; import org.apache.drill.exec.store.dfs.FormatPlugin; import org.apache.hadoop.conf.Configuration; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBPushFilterIntoScan.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBPushFilterIntoScan.java index a0f5536ca90..6bd33680d57 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBPushFilterIntoScan.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBPushFilterIntoScan.java @@ -190,7 +190,7 @@ protected void doPushFilterIntoBinaryGroupScan(final RelOptRuleCall call, final ScanPrel newScanPrel = new ScanPrel(scan.getCluster(), filter.getTraitSet(), newGroupsScan, scan.getRowType(), scan.getTable()); // Depending on whether is a project in the middle, assign either scan or copy of project to childRel. - final RelNode childRel = project == null ? newScanPrel : project.copy(project.getTraitSet(), ImmutableList.of((RelNode)newScanPrel));; + final RelNode childRel = project == null ? newScanPrel : project.copy(project.getTraitSet(), ImmutableList.of((RelNode)newScanPrel)); if (maprdbFilterBuilder.isAllExpressionsConverted()) { /* diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java index 159b850c416..220b90e7787 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java @@ -27,7 +27,6 @@ import org.apache.drill.exec.physical.base.AbstractDbSubScan; import org.apache.drill.exec.physical.base.PhysicalOperator; import org.apache.drill.exec.physical.base.PhysicalVisitor; -import org.apache.drill.exec.physical.base.SubScan; import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType; import org.apache.drill.exec.store.StoragePluginRegistry; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBTableCache.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBTableCache.java index 924d9c0e8e7..df8d59dabc7 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBTableCache.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBTableCache.java @@ -17,11 +17,6 @@ */ package org.apache.drill.exec.store.mapr.db; -import org.apache.drill.shaded.guava.com.google.common.cache.CacheBuilder; -import org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader; -import org.apache.drill.shaded.guava.com.google.common.cache.LoadingCache; -import org.apache.drill.shaded.guava.com.google.common.cache.RemovalListener; -import org.apache.drill.shaded.guava.com.google.common.cache.RemovalNotification; import com.mapr.db.Table; import com.mapr.db.impl.MapRDBImpl; import com.mapr.db.index.IndexDesc; @@ -34,6 +29,11 @@ import java.io.IOException; import java.security.PrivilegedExceptionAction; import java.util.concurrent.TimeUnit; +import org.apache.drill.shaded.guava.com.google.common.cache.CacheBuilder; +import org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader; +import org.apache.drill.shaded.guava.com.google.common.cache.LoadingCache; +import org.apache.drill.shaded.guava.com.google.common.cache.RemovalListener; +import org.apache.drill.shaded.guava.com.google.common.cache.RemovalNotification; public class MapRDBTableCache { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MapRDBFormatPlugin.class); @@ -209,7 +209,7 @@ public int hashCode() { static boolean isEqual(Object a, Object b) { return a == b || a != null && a.equals(b); } - + public boolean equals(Object obj) { if (obj == this) { return true; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/RestrictedMapRDBSubScanSpec.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/RestrictedMapRDBSubScanSpec.java index 596699f42e1..1faf5551a35 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/RestrictedMapRDBSubScanSpec.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/RestrictedMapRDBSubScanSpec.java @@ -20,7 +20,6 @@ import com.mapr.db.impl.IdCodec; import org.apache.commons.lang3.tuple.Pair; -import org.apache.drill.common.exceptions.DrillRuntimeException; import org.apache.drill.exec.physical.impl.join.RowKeyJoin; import org.apache.drill.exec.record.AbstractRecordBatch.BatchState; import org.apache.drill.exec.vector.ValueVector; @@ -166,7 +165,9 @@ public int hasRowKeys(int numRowKeysToRead) { public ByteBuffer[] getRowKeyIdsToRead(int numRowKeysToRead) { int numKeys = hasRowKeys(numRowKeysToRead); - if (numKeys == 0) return null; + if (numKeys == 0) { + return null; + } int index = 0; final ByteBuffer[] rowKeyIds = new ByteBuffer[numKeys]; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/TabletFragmentInfo.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/TabletFragmentInfo.java index 66fa232f090..0fb2e394704 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/TabletFragmentInfo.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/TabletFragmentInfo.java @@ -79,23 +79,30 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } TabletFragmentInfo other = (TabletFragmentInfo) obj; if (regionInfo == null) { - if (other.regionInfo != null) + if (other.regionInfo != null) { return false; - } else if (!regionInfo.equals(other.regionInfo)) + } + } else if (!regionInfo.equals(other.regionInfo)) { return false; + } if (tabletInfoImpl == null) { - if (other.tabletInfoImpl != null) + if (other.tabletInfoImpl != null) { return false; - } else if (!tabletInfoImpl.equals(other.tabletInfoImpl)) + } + } else if (!tabletInfoImpl.equals(other.tabletInfoImpl)) { return false; + } return true; } diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/binary/MapRDBFilterBuilder.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/binary/MapRDBFilterBuilder.java index 348853c61bf..cdef5107773 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/binary/MapRDBFilterBuilder.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/binary/MapRDBFilterBuilder.java @@ -297,7 +297,7 @@ private HBaseScanSpec createHBaseScanSpec(FunctionCall call, MaprDBCompareFuncti startRow = prefix.getBytes(Charsets.UTF_8); stopRow = startRow.clone(); boolean isMaxVal = true; - for (int i = stopRow.length - 1; i >= 0 ; --i) { + for (int i = stopRow.length - 1; i >= 0; --i) { int nextByteValue = (0xff & stopRow[i]) + 1; if (nextByteValue < 0xff) { stopRow[i] = (byte) nextByteValue; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonConditionBuilder.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonConditionBuilder.java index ce4e677d682..92d40f789d2 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonConditionBuilder.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonConditionBuilder.java @@ -27,7 +27,6 @@ import org.ojai.store.QueryCondition.Op; import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableList; -import com.mapr.db.MapRDB; import com.mapr.db.impl.MapRDBImpl; public class JsonConditionBuilder extends AbstractExprVisitor<JsonScanSpec, Void, RuntimeException> implements DrillHBaseConstants { diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableGroupScan.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableGroupScan.java index 647fe822faf..24f370ad667 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableGroupScan.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableGroupScan.java @@ -55,7 +55,6 @@ import org.apache.drill.exec.store.StoragePluginRegistry; import org.apache.drill.exec.store.dfs.FileSystemConfig; import org.apache.drill.exec.store.dfs.FileSystemPlugin; -import org.apache.drill.exec.store.dfs.FileSystemPlugin; import org.apache.drill.exec.store.mapr.PluginConstants; import org.apache.drill.exec.store.mapr.db.MapRDBFormatPlugin; import org.apache.drill.exec.store.mapr.db.MapRDBFormatPluginConfig; @@ -73,7 +72,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import org.apache.drill.shaded.guava.com.google.common.base.Preconditions; -import com.mapr.db.MapRDB; import com.mapr.db.MetaTable; import com.mapr.db.Table; import com.mapr.db.impl.TabletInfoImpl; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableRangePartitionFunction.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableRangePartitionFunction.java index ca508ca8c2a..b6d7bfb5a3e 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableRangePartitionFunction.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableRangePartitionFunction.java @@ -102,7 +102,7 @@ public void setup(List<VectorWrapper<?>> partitionKeys) { partitionKeyVector = v.getValueVector(); - Preconditions.checkArgument(partitionKeyVector != null, "Found null partitionKeVector.") ; + Preconditions.checkArgument(partitionKeyVector != null, "Found null partitionKeVector."); } @Override @@ -130,8 +130,8 @@ public boolean equals(Object obj) { @Override public int eval(int index, int numPartitions) { - String key = partitionKeyVector.getAccessor().getObject(index).toString(); - byte[] encodedKey = IdCodec.encodeAsBytes(key); + String key = partitionKeyVector.getAccessor().getObject(index).toString(); + byte[] encodedKey = IdCodec.encodeAsBytes(key); int tabletId = -1; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/MaprDBJsonRecordReader.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/MaprDBJsonRecordReader.java index 5b849ea0508..f13d64d9e9b 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/MaprDBJsonRecordReader.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/MaprDBJsonRecordReader.java @@ -62,8 +62,6 @@ import org.apache.drill.shaded.guava.com.google.common.collect.Sets; import org.apache.drill.shaded.guava.com.google.common.base.Predicate; -import com.mapr.db.MapRDB; -import com.mapr.org.apache.hadoop.hbase.util.Bytes; import java.util.Collection; import java.util.Collections; import java.util.Iterator; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiFunctionsProcessor.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiFunctionsProcessor.java index e88eb9e4c52..d07c97bd3a5 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiFunctionsProcessor.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiFunctionsProcessor.java @@ -26,11 +26,10 @@ import org.apache.drill.common.expression.ValueExpressions.LongExpression; import org.apache.drill.common.expression.ValueExpressions.QuotedString; import org.apache.drill.common.expression.visitors.AbstractExprVisitor; - +import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableMap; import org.ojai.Value; import org.ojai.store.QueryCondition; -import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableMap; import com.mapr.db.impl.ConditionImpl; import com.mapr.db.impl.MapRDBImpl; diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiValueWriter.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiValueWriter.java index 99b2157d82d..57aad06de94 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiValueWriter.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/OjaiValueWriter.java @@ -176,14 +176,14 @@ protected void writeString(MapOrListWriter writer, String fieldName, String valu buffer.setBytes(0, strBytes); writer.varChar(fieldName).writeVarChar(0, strBytes.length, buffer); } - + protected void writeBinary(MapWriter writer, String fieldName, ByteBuffer buf) { int bufLen = buf.remaining(); buffer = buffer.reallocIfNeeded(bufLen); buffer.setBytes(0, buf, buf.position(), bufLen); writer.varBinary(fieldName).writeVarBinary(0, bufLen, buffer); } - + protected void writeString(MapWriter writer, String fieldName, String value) { final byte[] strBytes = Bytes.toBytes(value); buffer = buffer.reallocIfNeeded(strBytes.length); diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/ProjectionPassthroughVectorWriter.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/ProjectionPassthroughVectorWriter.java index 8c5ed9b091f..cafd5f74f3f 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/ProjectionPassthroughVectorWriter.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/ProjectionPassthroughVectorWriter.java @@ -31,7 +31,6 @@ import org.ojai.DocumentReader.EventType; import org.ojai.util.DocumentReaderWithProjection; import org.ojai.util.FieldProjector; - import org.apache.drill.shaded.guava.com.google.common.base.Preconditions; import com.mapr.db.DBConstants; import com.mapr.db.ojai.DBDocumentReaderBase; diff --git a/contrib/format-maprdb/src/main/resources/checkstyle-config.xml b/contrib/format-maprdb/src/main/resources/checkstyle-config.xml deleted file mode 100644 index a66ded2a05d..00000000000 --- a/contrib/format-maprdb/src/main/resources/checkstyle-config.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!DOCTYPE module PUBLIC - "-//Puppy Crawl//DTD Check Configuration 1.2//EN" - "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> - -<!-- Checkstyle configuration for Apache Drill --> - -<module name="Checker"> - - <module name="TreeWalker"> - - <module name="IllegalImport"> - <property name="illegalPkgs" value="com.google.hive12,com.beust.jcommander.internal,jersey.repackaged"/> - </module> - - <module name="AvoidStarImport"> - <property name="allowStaticMemberImports" value="true"/> - </module> - - </module> -</module> diff --git a/contrib/format-maprdb/src/main/resources/checkstyle-suppressions.xml b/contrib/format-maprdb/src/main/resources/checkstyle-suppressions.xml deleted file mode 100644 index c6c34b94a55..00000000000 --- a/contrib/format-maprdb/src/main/resources/checkstyle-suppressions.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<!DOCTYPE suppressions PUBLIC - "-//Puppy Crawl//DTD Suppressions 1.1//EN" - "suppressions_1_1.dtd"> - -<!-- Checkstyle Suppressions for Apache Drill --> -<suppressions> - <suppress files="[\\/]generated-sources[\\/]" checks="AvoidStarImport"/> -</suppressions> diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBCFAsJSONString.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBCFAsJSONString.java index c5928064965..4cd9f51eece 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBCFAsJSONString.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBCFAsJSONString.java @@ -43,5 +43,4 @@ public static void setUpBeforeClass() throws Exception { public static void tearDownAfterClass() throws Exception { MaprDBTestsSuite.cleanupTests(); } - } diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBProjectPushDown.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBProjectPushDown.java index 63d6abb28a3..b5d3909d137 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBProjectPushDown.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBProjectPushDown.java @@ -43,5 +43,4 @@ public static void setUpBeforeClass() throws Exception { public static void tearDownAfterClass() throws Exception { MaprDBTestsSuite.cleanupTests(); } - } diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBQueries.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBQueries.java index 5393aa178d8..0dc30e722a9 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBQueries.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/binary/TestMapRDBQueries.java @@ -43,5 +43,4 @@ public static void setUpBeforeClass() throws Exception { public static void tearDownAfterClass() throws Exception { MaprDBTestsSuite.cleanupTests(); } - } diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexHintPlanTest.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexHintPlanTest.java index c6ec0fe6897..f7f0da258b4 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexHintPlanTest.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexHintPlanTest.java @@ -18,7 +18,6 @@ * limitations under the License. */ -import com.mapr.drill.maprdb.tests.json.BaseJsonTest; import com.mapr.tests.annotations.ClusterTest; import org.apache.drill.PlanTestBase; import org.junit.experimental.categories.Category; diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexPlanTest.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexPlanTest.java index fd3b5cca169..18e2316b7d4 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexPlanTest.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/IndexPlanTest.java @@ -733,7 +733,7 @@ public void TestNonCoveringPlanWithNoRemoveSortOption() throws Exception { public void TestCoveringPlanJoin_1() throws Exception { String query = "SELECT count(*) as cnt FROM hbase.`index_test_primary` as t1 " + " inner join hbase.`index_test_primary` as t2 on t1.driverlicense = t2.driverlicense " + - " where t1.driverlicense < 100000003 and t2.driverlicense < 100000003" ; + " where t1.driverlicense < 100000003 and t2.driverlicense < 100000003"; test(defaultHavingIndexPlan); PlanTestBase.testPlanMatchingPatterns(query, new String[] {".*JsonTableGroupScan.*tableName=.*index_test_primary.*indexName=", diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/LargeTableGen.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/LargeTableGen.java index 347f7f2fcda..1b64d8e4a67 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/LargeTableGen.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/LargeTableGen.java @@ -148,7 +148,7 @@ public void generateTableWithIndex(String tablePath, int recordNumber, String[] "\"personal\": {\"age\" : %s, \"income\": %s, \"birthdate\": {\"$dateDay\": \"%s\"} }," + "\"activity\": {\"irs\" : { \"firstlogin\": \"%s\" } }," + "\"driverlicense\":{\"$numberLong\": %s} } \n", - i + 1, recordNumber - i , getSSN(i), getPhone(i), getEmail(i), + i + 1, recordNumber - i, getSSN(i), getPhone(i), getEmail(i), getAddress(i)[2], getAddress(i)[1], getFirstName(i), getLastName(i), getAge(i), getIncome(i), getBirthdate(i), getFirstLogin(i), diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/StatisticsTest.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/StatisticsTest.java index 20f109074aa..adccac4b56d 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/StatisticsTest.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/index/StatisticsTest.java @@ -17,20 +17,12 @@ */ package com.mapr.drill.maprdb.tests.index; -import com.google.common.collect.Lists; -import com.mapr.db.Admin; -import com.mapr.drill.maprdb.tests.MaprDBTestsSuite; -import com.mapr.drill.maprdb.tests.json.BaseJsonTest; import com.mapr.tests.annotations.ClusterTest; import org.apache.drill.PlanTestBase; -import org.apache.hadoop.hbase.TableName; -import org.junit.AfterClass; -import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; -import java.util.List; @Category(ClusterTest.class) public class StatisticsTest extends IndexPlanTest { diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java index 2d6ae068321..0dd6a4b345e 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java @@ -30,7 +30,6 @@ public class BaseJsonTest extends BaseTestQuery { protected static final String SCHEMA = "hbase.root"; - protected String format(final String sql) { return String.format(sql, SCHEMA, getTablePath()); } diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestEncodedFieldPaths.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestEncodedFieldPaths.java index 50723749eca..0275f54c6e7 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestEncodedFieldPaths.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestEncodedFieldPaths.java @@ -91,7 +91,7 @@ public void test_encoded_fields_with_non_covering_index() throws Exception { // plan test final String[] expectedPlan = {"JsonTableGroupScan.*indexName=encoded_fields_userdata_index.*" + // scan on index - "columns=\\[`_id`, `age`\\]", + "columns=\\[`_id`, `age`\\]", "RestrictedJsonTableGroupScan.*" + // restricted scan on the table with encoded name "columns=\\[`age`, `\\$\\$ENC00L5UWIADDN5SGK4Y`, `\\$\\$document`, `_id`\\]", "RowKeyJoin"}; // join on row_key diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestScanRanges.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestScanRanges.java index efde774f231..e521c64d063 100644 --- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestScanRanges.java +++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/TestScanRanges.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.proto.helper.QueryIdHelper; import org.apache.drill.exec.rpc.user.AwaitableUserResultsListener; import org.apache.drill.exec.store.sys.PersistentStore; -import org.apache.drill.exec.work.foreman.QueryManager; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Unify checkstyle-config.xml files > --------------------------------- > > Key: DRILL-6691 > URL: https://issues.apache.org/jira/browse/DRILL-6691 > Project: Apache Drill > Issue Type: Task > Reporter: Volodymyr Vysotskyi > Assignee: Hanumath Rao Maduri > Priority: Minor > Labels: ready-to-commit > Fix For: 1.15.0 > > > Currently, `drill-root` and `format-maprdb` modules contain > `checkstyle-config.xml` own files. > They should be unified to apply the same checkstyle rules for all modules. -- This message was sent by Atlassian JIRA (v7.6.3#76005)