druid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] b-slim closed pull request #6367: Fix non org.apache.druid files and add package name checkstyle rule
Date Sat, 22 Sep 2018 00:58:21 GMT
b-slim closed pull request #6367: Fix non org.apache.druid files and add package name checkstyle
rule
URL: https://github.com/apache/incubator-druid/pull/6367
 
 
   

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/codestyle/checkstyle.xml b/codestyle/checkstyle.xml
index 910474ce903..eebbc5888dc 100644
--- a/codestyle/checkstyle.xml
+++ b/codestyle/checkstyle.xml
@@ -193,5 +193,10 @@
       <property name="illegalPattern" value="true"/>
       <property name="message" value="Use org.apache.druid.common.config.NullHandling.nullToEmptyIfNeeded
instead"/>
     </module>
+
+    <module name="PackageName">
+      <property name="format" value="^org.apache.druid.*$"/>
+    </module>
+    <module name="PackageDeclaration"/>
   </module>
 </module>
diff --git a/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java
b/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java
index 47dba883b72..e232ed56bd5 100755
--- a/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java
+++ b/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java
@@ -17,7 +17,9 @@
  * under the License.
  */
 
+//CHECKSTYLE.OFF: PackageName
 package org.apache.parquet.avro;
+//CHECKSTYLE.ON: PackageName
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
@@ -37,6 +39,9 @@
 import java.util.Map;
 import java.util.Set;
 
+/**
+ * This class must in package org.apache.parquet.avro to access the AvroRecordMaterializer
constructor
+ */
 public class DruidParquetReadSupport extends AvroReadSupport<GenericRecord>
 {
 
diff --git a/extensions-contrib/statsd-emitter/src/test/java/DimensionConverterTest.java b/extensions-contrib/statsd-emitter/src/test/java/org/apache/druid/emitter/statsd/DimensionConverterTest.java
similarity index 95%
rename from extensions-contrib/statsd-emitter/src/test/java/DimensionConverterTest.java
rename to extensions-contrib/statsd-emitter/src/test/java/org/apache/druid/emitter/statsd/DimensionConverterTest.java
index 0e7b0055a11..2ffb06ec26d 100644
--- a/extensions-contrib/statsd-emitter/src/test/java/DimensionConverterTest.java
+++ b/extensions-contrib/statsd-emitter/src/test/java/org/apache/druid/emitter/statsd/DimensionConverterTest.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
+package org.apache.druid.emitter.statsd;
+
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableList;
-import org.apache.druid.emitter.statsd.DimensionConverter;
-import org.apache.druid.emitter.statsd.StatsDMetric;
 import org.apache.druid.java.util.common.DateTimes;
 import org.apache.druid.java.util.emitter.service.ServiceMetricEvent;
 import org.junit.Test;
diff --git a/extensions-contrib/statsd-emitter/src/test/java/StatsDEmitterTest.java b/extensions-contrib/statsd-emitter/src/test/java/org/apache/druid/emitter/statsd/StatsDEmitterTest.java
similarity index 97%
rename from extensions-contrib/statsd-emitter/src/test/java/StatsDEmitterTest.java
rename to extensions-contrib/statsd-emitter/src/test/java/org/apache/druid/emitter/statsd/StatsDEmitterTest.java
index 12826391006..08792963f50 100644
--- a/extensions-contrib/statsd-emitter/src/test/java/StatsDEmitterTest.java
+++ b/extensions-contrib/statsd-emitter/src/test/java/org/apache/druid/emitter/statsd/StatsDEmitterTest.java
@@ -17,11 +17,11 @@
  * under the License.
  */
 
+package org.apache.druid.emitter.statsd;
+
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.druid.java.util.emitter.service.ServiceMetricEvent;
 import com.timgroup.statsd.StatsDClient;
-import org.apache.druid.emitter.statsd.StatsDEmitter;
-import org.apache.druid.emitter.statsd.StatsDEmitterConfig;
 import org.apache.druid.java.util.common.DateTimes;
 import org.junit.Test;
 
diff --git a/extensions-core/hdfs-storage/src/main/java/org/apache/hadoop/fs/HadoopFsWrapper.java
b/extensions-core/hdfs-storage/src/main/java/org/apache/hadoop/fs/HadoopFsWrapper.java
index 3c61aac333a..334a212f187 100644
--- a/extensions-core/hdfs-storage/src/main/java/org/apache/hadoop/fs/HadoopFsWrapper.java
+++ b/extensions-core/hdfs-storage/src/main/java/org/apache/hadoop/fs/HadoopFsWrapper.java
@@ -17,7 +17,9 @@
  * under the License.
  */
 
+//CHECKSTYLE.OFF: PackageName
 package org.apache.hadoop.fs;
+//CHECKSTYLE.ON: PackageName
 
 import com.google.common.base.Throwables;
 import org.apache.druid.java.util.common.logger.Logger;
diff --git a/integration-tests/src/main/java/org/testng/DruidTestRunnerFactory.java b/integration-tests/src/main/java/org/testng/DruidTestRunnerFactory.java
index 8df4010736c..eb3a9bc15e6 100644
--- a/integration-tests/src/main/java/org/testng/DruidTestRunnerFactory.java
+++ b/integration-tests/src/main/java/org/testng/DruidTestRunnerFactory.java
@@ -17,7 +17,10 @@
  * under the License.
  */
 
+
+//CHECKSTYLE.OFF: PackageName
 package org.testng;
+//CHECKSTYLE.ON: PackageName
 
 import com.google.common.base.Throwables;
 import com.google.inject.Injector;
@@ -43,6 +46,9 @@
 import java.nio.charset.StandardCharsets;
 import java.util.List;
 
+/**
+ * This class must be in package org.testng to access protected methods like TestNG.getDefault().getConfiguration()
+ */
 public class DruidTestRunnerFactory implements ITestRunnerFactory
 {
   private static final Logger LOG = new Logger(DruidTestRunnerFactory.class);
diff --git a/integration-tests/src/test/java/io/druid/tests/security/ITTLSTest.java b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
similarity index 99%
rename from integration-tests/src/test/java/io/druid/tests/security/ITTLSTest.java
rename to integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
index 7759eff627f..cb148708454 100644
--- a/integration-tests/src/test/java/io/druid/tests/security/ITTLSTest.java
+++ b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package io.druid.tests.security;
+package org.apache.druid.tests.security;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.base.Throwables;
diff --git a/server/src/test/java/io/druid/segment/realtime/firehose/EventReceiverFirehostIdleTest.java
b/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseIdleTest.java
similarity index 96%
rename from server/src/test/java/io/druid/segment/realtime/firehose/EventReceiverFirehostIdleTest.java
rename to server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseIdleTest.java
index 18c289ebc9e..8d2232aad6b 100644
--- a/server/src/test/java/io/druid/segment/realtime/firehose/EventReceiverFirehostIdleTest.java
+++ b/server/src/test/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseIdleTest.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package io.druid.segment.realtime.firehose;
+package org.apache.druid.segment.realtime.firehose;
 
 import com.google.common.collect.ImmutableList;
 import org.apache.commons.io.IOUtils;
@@ -26,7 +26,6 @@
 import org.apache.druid.data.input.impl.MapInputRowParser;
 import org.apache.druid.data.input.impl.TimestampSpec;
 import org.apache.druid.jackson.DefaultObjectMapper;
-import org.apache.druid.segment.realtime.firehose.EventReceiverFirehoseFactory;
 import org.apache.druid.server.metrics.EventReceiverFirehoseRegister;
 import org.apache.druid.server.security.AllowAllAuthenticator;
 import org.apache.druid.server.security.AuthConfig;
@@ -39,7 +38,7 @@
 import javax.servlet.http.HttpServletRequest;
 import java.util.Locale;
 
-public class EventReceiverFirehostIdleTest
+public class EventReceiverFirehoseIdleTest
 {
   private static final int CAPACITY = 300;
   private static final long MAX_IDLE_TIME = 5_000L;


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Mime
View raw message