kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject [16/42] kylin git commit: KYLIN-2327 enable check-style for test code
Date Fri, 30 Dec 2016 02:31:08 GMT
KYLIN-2327 enable check-style for test code


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3e0edc84
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3e0edc84
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3e0edc84

Branch: refs/heads/sparkcubing-rebase
Commit: 3e0edc842ec4f6f7d9ef04dfa26afce101d2fd6e
Parents: 1563eb9
Author: Billy Liu <billyliu@apache.org>
Authored: Wed Dec 28 01:16:35 2016 +0800
Committer: Billy Liu <billyliu@apache.org>
Committed: Wed Dec 28 01:16:58 2016 +0800

----------------------------------------------------------------------
 .../apache/kylin/common/KylinConfigTest.java    |   6 +-
 .../org/apache/kylin/common/util/BasicTest.java |   2 +-
 .../apache/kylin/common/util/JacksonBean.java   |   7 +-
 .../apache/kylin/common/util/JacksonTest.java   |   5 +-
 .../org/apache/kylin/cube/CubeDescTest.java     |   6 +-
 .../org/apache/kylin/cube/CubeManagerTest.java  |  16 +-
 .../inmemcubing/ConcurrentDiskStoreTest.java    |  27 +-
 .../cube/inmemcubing/MemDiskStoreTest.java      |  27 +-
 .../inmemcubing/MemoryBudgetControllerTest.java |  27 +-
 .../validation/rule/DictionaryRuleTest.java     |   1 -
 .../gridtable/AggregationCacheMemSizeTest.java  |  42 +-
 .../kylin/gridtable/SimpleGridTableTest.java    |  27 +-
 .../gridtable/SimpleInvertedIndexTest.java      |  27 +-
 .../metadata/measure/MeasureCodecTest.java      |   6 +-
 .../kylin/dict/AppendTrieDictionaryTest.java    |   3 +-
 .../apache/kylin/dict/CachedTreeMapTest.java    |  21 +-
 .../kylin/dict/DictionaryManagerTest.java       |   3 +-
 .../kylin/dict/TrieDictionaryForestTest.java    |   2 +-
 .../kylin/dict/lookup/LookupTableTest.java      |   1 -
 .../impl/threadpool/DefaultSchedulerTest.java   |  32 +-
 .../measure/AggregatorMemEstimateTest.java      |  17 +-
 .../kylin/measure/hllc/HLLCounterOldTest.java   |   3 +-
 .../kylin/measure/hllc/HLLCounterTest.java      |  13 +-
 .../measure/topn/TopNCounterBasicTest.java      |  16 +-
 .../topn/TopNCounterCombinationTest.java        |  16 +-
 .../measure/topn/TopNCounterSerializerTest.java |   2 -
 .../kylin/measure/topn/TopNCounterTest.java     |  16 +-
 .../kylin/metadata/MetadataManagerTest.java     |   4 +-
 .../DefaultPartitionConditionBuilderTest.java   |  24 +-
 .../apache/kylin/storage/StorageMockUtils.java  |  33 +-
 .../storage/gtrecord/DictGridTableTest.java     |   2 +-
 .../kylin/engine/mr/steps/CubeSamplingTest.java |   2 +-
 .../kylin/engine/mr/steps/MockupMapContext.java | 522 ++++++++++---------
 .../mr/steps/NumberDictionaryForestTest.java    |  18 +
 .../mr/steps/SelfDefineSortableKeyTest.java     |  18 +
 .../apache/kylin/jdbc/SQLResonseStubTest.java   |   6 +-
 .../inmemcubing/ITDoggedCubeBuilderTest.java    |  30 +-
 .../inmemcubing/ITInMemCubeBuilderTest.java     |  30 +-
 pom.xml                                         |   4 +-
 .../apache/kylin/query/udf/VersionUDFTest.java  |  18 +
 .../PasswordPlaceHolderConfigurerTest.java      |   1 -
 .../rest/controller/CubeControllerTest.java     |   1 -
 .../config/KafkaConsumerPropertiesTest.java     |  18 +
 .../hbase/common/HiveMiniClusterTest.java       | 131 -----
 .../storage/hbase/steps/MockupMapContext.java   | 522 ++++++++++---------
 45 files changed, 872 insertions(+), 883 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-common/src/test/java/org/apache/kylin/common/KylinConfigTest.java
----------------------------------------------------------------------
diff --git a/core-common/src/test/java/org/apache/kylin/common/KylinConfigTest.java b/core-common/src/test/java/org/apache/kylin/common/KylinConfigTest.java
index 209986f..a426fc6 100644
--- a/core-common/src/test/java/org/apache/kylin/common/KylinConfigTest.java
+++ b/core-common/src/test/java/org/apache/kylin/common/KylinConfigTest.java
@@ -18,7 +18,11 @@
 
 package org.apache.kylin.common;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Map;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java
----------------------------------------------------------------------
diff --git a/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java b/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java
index 9105245..bbaab09 100644
--- a/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java
+++ b/core-common/src/test/java/org/apache/kylin/common/util/BasicTest.java
@@ -82,7 +82,7 @@ public class BasicTest {
 
     @Test
     public void testxx() throws InterruptedException {
-        System.out.println( 0x8fL);
+        System.out.println(0x8fL);
         byte[] space = new byte[100];
         ByteBuffer buffer = ByteBuffer.wrap(space, 10, 20);
         buffer.put((byte) 1);

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-common/src/test/java/org/apache/kylin/common/util/JacksonBean.java
----------------------------------------------------------------------
diff --git a/core-common/src/test/java/org/apache/kylin/common/util/JacksonBean.java b/core-common/src/test/java/org/apache/kylin/common/util/JacksonBean.java
index ffff6d1..214b860 100644
--- a/core-common/src/test/java/org/apache/kylin/common/util/JacksonBean.java
+++ b/core-common/src/test/java/org/apache/kylin/common/util/JacksonBean.java
@@ -18,15 +18,14 @@
 
 package org.apache.kylin.common.util;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
 @JsonAutoDetect(fieldVisibility = Visibility.NONE, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
 public class JacksonBean {
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-common/src/test/java/org/apache/kylin/common/util/JacksonTest.java
----------------------------------------------------------------------
diff --git a/core-common/src/test/java/org/apache/kylin/common/util/JacksonTest.java b/core-common/src/test/java/org/apache/kylin/common/util/JacksonTest.java
index 0d7097a..286cdd3 100644
--- a/core-common/src/test/java/org/apache/kylin/common/util/JacksonTest.java
+++ b/core-common/src/test/java/org/apache/kylin/common/util/JacksonTest.java
@@ -18,11 +18,10 @@
 
 package org.apache.kylin.common.util;
 
-import org.junit.Test;
-
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.Map;
+
+import org.junit.Test;
 
 public class JacksonTest {
     @Test

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
index 39b6433..0a7adf1 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
@@ -18,6 +18,10 @@
 
 package org.apache.kylin.cube;
 
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
 import java.io.File;
 import java.util.Arrays;
 import java.util.Collection;
@@ -42,8 +46,6 @@ import org.junit.rules.ExpectedException;
 
 import com.google.common.collect.Maps;
 
-import static org.junit.Assert.*;
-
 /**
  * @author yangli9
  */

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java b/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
index 33dac96..3cae37d 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerTest.java
@@ -136,13 +136,13 @@ public class CubeManagerTest extends LocalFileMetadataTestCase {
         assertEquals(0, cube.getSegments().size());
 
         Map m1 =  Maps.newHashMap();
-        m1.put(1, 1000l);
+        m1.put(1, 1000L);
         Map m2 =  Maps.newHashMap();
-        m2.put(1, 2000l);
+        m2.put(1, 2000L);
         Map m3 =  Maps.newHashMap();
-        m3.put(1, 3000l);
+        m3.put(1, 3000L);
         Map m4 =  Maps.newHashMap();
-        m4.put(1, 4000l);
+        m4.put(1, 4000L);
 
         // append first
         CubeSegment seg1 = mgr.appendSegment(cube, 0, 0, 0, 1000, null, m1);
@@ -193,13 +193,13 @@ public class CubeManagerTest extends LocalFileMetadataTestCase {
         // no segment at first
         assertEquals(0, cube.getSegments().size());
         Map m1 =  Maps.newHashMap();
-        m1.put(1, 1000l);
+        m1.put(1, 1000L);
         Map m2 =  Maps.newHashMap();
-        m2.put(1, 2000l);
+        m2.put(1, 2000L);
         Map m3 =  Maps.newHashMap();
-        m3.put(1, 3000l);
+        m3.put(1, 3000L);
         Map m4 =  Maps.newHashMap();
-        m4.put(1, 4000l);
+        m4.put(1, 4000L);
 
         // append first
         CubeSegment seg1 = mgr.appendSegment(cube, 0, 0, 0, 1000, null, m1);

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStoreTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStoreTest.java b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStoreTest.java
index 6355f4a..0de1406 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStoreTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/ConcurrentDiskStoreTest.java
@@ -1,19 +1,20 @@
 /*
- *  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
+ * 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
+ *     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.
- */
+ * 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.
+*/
 
 package org.apache.kylin.cube.inmemcubing;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemDiskStoreTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemDiskStoreTest.java b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemDiskStoreTest.java
index 06ade1c..a64fc21 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemDiskStoreTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemDiskStoreTest.java
@@ -1,19 +1,20 @@
 /*
- *  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
+ * 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
+ *     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.
- */
+ * 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.
+*/
 
 package org.apache.kylin.cube.inmemcubing;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemoryBudgetControllerTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemoryBudgetControllerTest.java b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemoryBudgetControllerTest.java
index eb40eaf..24e31e9 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemoryBudgetControllerTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/inmemcubing/MemoryBudgetControllerTest.java
@@ -1,19 +1,20 @@
 /*
- *  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
+ * 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
+ *     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.
- */
+ * 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.
+*/
 
 package org.apache.kylin.cube.inmemcubing;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/cube/model/validation/rule/DictionaryRuleTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/model/validation/rule/DictionaryRuleTest.java b/core-cube/src/test/java/org/apache/kylin/cube/model/validation/rule/DictionaryRuleTest.java
index c272bb7..452768f 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/model/validation/rule/DictionaryRuleTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/model/validation/rule/DictionaryRuleTest.java
@@ -22,7 +22,6 @@ import static org.apache.kylin.cube.model.validation.rule.DictionaryRule.ERROR_D
 import static org.apache.kylin.cube.model.validation.rule.DictionaryRule.ERROR_REUSE_BUILDER_BOTH_EMPTY;
 import static org.apache.kylin.cube.model.validation.rule.DictionaryRule.ERROR_REUSE_BUILDER_BOTH_SET;
 import static org.apache.kylin.cube.model.validation.rule.DictionaryRule.ERROR_TRANSITIVE_REUSE;
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheMemSizeTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheMemSizeTest.java b/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheMemSizeTest.java
index 8ffe055..3807b70 100644
--- a/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheMemSizeTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheMemSizeTest.java
@@ -1,23 +1,32 @@
 /*
- *  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
+ * 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
+ *     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.
- */
+ * 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.
+*/
 
 package org.apache.kylin.gridtable;
 
-import com.google.common.base.Stopwatch;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Random;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
 import org.apache.kylin.common.util.Bytes;
 import org.apache.kylin.measure.MeasureAggregator;
 import org.apache.kylin.measure.basic.BigDecimalSumAggregator;
@@ -32,8 +41,7 @@ import org.apache.kylin.metadata.datatype.LongMutable;
 import org.github.jamm.MemoryMeter;
 import org.junit.Test;
 
-import java.math.BigDecimal;
-import java.util.*;
+import com.google.common.base.Stopwatch;
 
 public class AggregationCacheMemSizeTest {
     private static final MemoryMeter meter = new MemoryMeter();
@@ -134,6 +142,8 @@ public class AggregationCacheMemSizeTest {
             case WITH_HIGH_CARD_BITMAP:
                 aggregators.add(createBitmapAggr(false));
                 break;
+            default:
+                break;
         }
 
         return aggregators.toArray(new MeasureAggregator[aggregators.size()]);

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleGridTableTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleGridTableTest.java b/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleGridTableTest.java
index fd571d0..f315b1e 100644
--- a/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleGridTableTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleGridTableTest.java
@@ -1,19 +1,20 @@
 /*
- *  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
+ * 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
+ *     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.
- */
+ * 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.
+*/
 
 package org.apache.kylin.gridtable;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleInvertedIndexTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleInvertedIndexTest.java b/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleInvertedIndexTest.java
index 1026414..2cf58ac 100644
--- a/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleInvertedIndexTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/gridtable/SimpleInvertedIndexTest.java
@@ -1,19 +1,20 @@
 /*
- *  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
+ * 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
+ *     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.
- */
+ * 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.
+*/
 
 package org.apache.kylin.gridtable;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-cube/src/test/java/org/apache/kylin/metadata/measure/MeasureCodecTest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/test/java/org/apache/kylin/metadata/measure/MeasureCodecTest.java b/core-cube/src/test/java/org/apache/kylin/metadata/measure/MeasureCodecTest.java
index 0f3f3a9..fc20418 100644
--- a/core-cube/src/test/java/org/apache/kylin/metadata/measure/MeasureCodecTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/metadata/measure/MeasureCodecTest.java
@@ -51,7 +51,7 @@ public class MeasureCodecTest extends LocalFileMetadataTestCase {
 
     @Test
     public void basicTest() {
-        MeasureDesc descs[] = new MeasureDesc[] { measure("double"), measure("long"), measure("decimal"), measure("HLLC16"), measure("bitmap") };
+        MeasureDesc[] descs = new MeasureDesc[] { measure("double"), measure("long"), measure("decimal"), measure("HLLC16"), measure("bitmap") };
         BufferedMeasureCodec codec = new BufferedMeasureCodec(descs);
 
         DoubleMutable d = new DoubleMutable(1.0);
@@ -64,13 +64,13 @@ public class MeasureCodecTest extends LocalFileMetadataTestCase {
         bitmap.add(123);
         bitmap.add(45678);
         bitmap.add(Integer.MAX_VALUE - 10);
-        Object values[] = new Object[] { d, l, b, hllc, bitmap };
+        Object[] values = new Object[] { d, l, b, hllc, bitmap };
 
         ByteBuffer buf = codec.encode(values);
         buf.flip();
         System.out.println("size: " + buf.limit());
 
-        Object copy[] = new Object[values.length];
+        Object[] copy = new Object[values.length];
 
         codec.decode(buf, copy);
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-dictionary/src/test/java/org/apache/kylin/dict/AppendTrieDictionaryTest.java
----------------------------------------------------------------------
diff --git a/core-dictionary/src/test/java/org/apache/kylin/dict/AppendTrieDictionaryTest.java b/core-dictionary/src/test/java/org/apache/kylin/dict/AppendTrieDictionaryTest.java
index a5ed6f8..f84f08f 100644
--- a/core-dictionary/src/test/java/org/apache/kylin/dict/AppendTrieDictionaryTest.java
+++ b/core-dictionary/src/test/java/org/apache/kylin/dict/AppendTrieDictionaryTest.java
@@ -145,8 +145,7 @@ public class AppendTrieDictionaryTest extends LocalFileMetadataTestCase {
             while ((word = reader.readLine()) != null) {
                 word = word.trim();
                 if (!word.isEmpty())
-                    ;
-                b.addValue(word);
+                    b.addValue(word);
             }
         } finally {
             reader.close();

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-dictionary/src/test/java/org/apache/kylin/dict/CachedTreeMapTest.java
----------------------------------------------------------------------
diff --git a/core-dictionary/src/test/java/org/apache/kylin/dict/CachedTreeMapTest.java b/core-dictionary/src/test/java/org/apache/kylin/dict/CachedTreeMapTest.java
index 381e0b1..64eb13c 100644
--- a/core-dictionary/src/test/java/org/apache/kylin/dict/CachedTreeMapTest.java
+++ b/core-dictionary/src/test/java/org/apache/kylin/dict/CachedTreeMapTest.java
@@ -17,18 +17,29 @@
 */
 package org.apache.kylin.dict;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.*;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Test;
 
-import java.io.*;
-
-import static org.junit.Assert.*;
-
 /**
  * Created by sunyerui on 16/7/12.
  */

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-dictionary/src/test/java/org/apache/kylin/dict/DictionaryManagerTest.java
----------------------------------------------------------------------
diff --git a/core-dictionary/src/test/java/org/apache/kylin/dict/DictionaryManagerTest.java b/core-dictionary/src/test/java/org/apache/kylin/dict/DictionaryManagerTest.java
index e6e0374..4820318 100644
--- a/core-dictionary/src/test/java/org/apache/kylin/dict/DictionaryManagerTest.java
+++ b/core-dictionary/src/test/java/org/apache/kylin/dict/DictionaryManagerTest.java
@@ -18,7 +18,8 @@
 
 package org.apache.kylin.dict;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-dictionary/src/test/java/org/apache/kylin/dict/TrieDictionaryForestTest.java
----------------------------------------------------------------------
diff --git a/core-dictionary/src/test/java/org/apache/kylin/dict/TrieDictionaryForestTest.java b/core-dictionary/src/test/java/org/apache/kylin/dict/TrieDictionaryForestTest.java
index 238bb31..ee092c9 100755
--- a/core-dictionary/src/test/java/org/apache/kylin/dict/TrieDictionaryForestTest.java
+++ b/core-dictionary/src/test/java/org/apache/kylin/dict/TrieDictionaryForestTest.java
@@ -288,7 +288,7 @@ public class TrieDictionaryForestTest {
         TrieDictionaryForestBuilder<String> b = new TrieDictionaryForestBuilder<String>(new StringBytesConverter());
         TrieDictionaryForest<String> dict = b.build();
         try{
-            int id = dict.getIdFromValue("123",0);
+            int id = dict.getIdFromValue("123", 0);
             fail("id should not exist");
         }catch (IllegalArgumentException e){
             //right

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-dictionary/src/test/java/org/apache/kylin/dict/lookup/LookupTableTest.java
----------------------------------------------------------------------
diff --git a/core-dictionary/src/test/java/org/apache/kylin/dict/lookup/LookupTableTest.java b/core-dictionary/src/test/java/org/apache/kylin/dict/lookup/LookupTableTest.java
index 25d6ae2..5a5c988 100644
--- a/core-dictionary/src/test/java/org/apache/kylin/dict/lookup/LookupTableTest.java
+++ b/core-dictionary/src/test/java/org/apache/kylin/dict/lookup/LookupTableTest.java
@@ -25,7 +25,6 @@ import java.util.Set;
 
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.DateFormat;
-import org.apache.kylin.common.util.Dictionary;
 import org.apache.kylin.common.util.LocalFileMetadataTestCase;
 import org.apache.kylin.common.util.Pair;
 import org.apache.kylin.dict.TrieDictionaryForest;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java
----------------------------------------------------------------------
diff --git a/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java b/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java
index df521f9..bcd6a59 100644
--- a/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java
+++ b/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java
@@ -1,22 +1,20 @@
 /*
+ * 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
  *
- *  * 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.
- * /
- */
+ *     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.
+*/
 
 package org.apache.kylin.job.impl.threadpool;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/measure/AggregatorMemEstimateTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/measure/AggregatorMemEstimateTest.java b/core-metadata/src/test/java/org/apache/kylin/measure/AggregatorMemEstimateTest.java
index 0f22610..40e5b29 100644
--- a/core-metadata/src/test/java/org/apache/kylin/measure/AggregatorMemEstimateTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/measure/AggregatorMemEstimateTest.java
@@ -18,10 +18,20 @@
 
 package org.apache.kylin.measure;
 
-import com.google.common.collect.Lists;
+import java.math.BigDecimal;
+import java.util.List;
+
 import org.apache.kylin.common.util.ByteArray;
 import org.apache.kylin.common.util.LocalFileMetadataTestCase;
-import org.apache.kylin.measure.basic.*;
+import org.apache.kylin.measure.basic.BigDecimalMaxAggregator;
+import org.apache.kylin.measure.basic.BigDecimalMinAggregator;
+import org.apache.kylin.measure.basic.BigDecimalSumAggregator;
+import org.apache.kylin.measure.basic.DoubleMaxAggregator;
+import org.apache.kylin.measure.basic.DoubleMinAggregator;
+import org.apache.kylin.measure.basic.DoubleSumAggregator;
+import org.apache.kylin.measure.basic.LongMaxAggregator;
+import org.apache.kylin.measure.basic.LongMinAggregator;
+import org.apache.kylin.measure.basic.LongSumAggregator;
 import org.apache.kylin.measure.bitmap.BitmapAggregator;
 import org.apache.kylin.measure.bitmap.BitmapCounter;
 import org.apache.kylin.measure.extendedcolumn.ExtendedColumnMeasureType;
@@ -35,8 +45,7 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.math.BigDecimal;
-import java.util.List;
+import com.google.common.collect.Lists;
 
 public class AggregatorMemEstimateTest extends LocalFileMetadataTestCase {
     private static final MemoryMeter meter = new MemoryMeter();

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterOldTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterOldTest.java b/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterOldTest.java
index 427d9a7..2f833bf 100644
--- a/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterOldTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterOldTest.java
@@ -28,7 +28,6 @@ import java.util.Random;
 import java.util.Set;
 
 import org.apache.kylin.common.util.Bytes;
-import org.apache.kylin.measure.hllc.HLLCounterOld;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -227,7 +226,7 @@ public class HLLCounterOldTest {
         int N = 3; // reduce N HLLC into one
         int M = 1000; // for M times, use 100000 for real perf test
 
-        HLLCounterOld samples[] = new HLLCounterOld[N];
+        HLLCounterOld[] samples = new HLLCounterOld[N];
         for (int i = 0; i < N; i++) {
             samples[i] = newHLLC();
             for (String str : generateTestData(10000))

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterTest.java b/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterTest.java
index 4a95bd4..92f2aab 100644
--- a/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/measure/hllc/HLLCounterTest.java
@@ -17,12 +17,8 @@
 */
 package org.apache.kylin.measure.hllc;
 
-import org.apache.kylin.common.util.Bytes;
-import org.apache.kylin.measure.hllc.HLLCounterOld;
-import org.apache.kylin.measure.hllc.HLLCounter;
-import org.apache.kylin.measure.hllc.RegisterType;
-import org.junit.Assert;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -30,8 +26,9 @@ import java.util.HashSet;
 import java.util.Random;
 import java.util.Set;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import org.apache.kylin.common.util.Bytes;
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * Created by xiefan on 16-12-12.

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterBasicTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterBasicTest.java b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterBasicTest.java
index 162ef01..9d034fe 100644
--- a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterBasicTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterBasicTest.java
@@ -1,18 +1,20 @@
 /*
- * Copyright (C) 2011 Clearspring Technologies, Inc. 
+ * 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
  *
- * Licensed 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
+ *     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.
- */
+*/
 
 package org.apache.kylin.measure.topn;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterCombinationTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterCombinationTest.java b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterCombinationTest.java
index 282f648..7cde4cc 100644
--- a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterCombinationTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterCombinationTest.java
@@ -1,18 +1,20 @@
 /*
- * Copyright (C) 2011 Clearspring Technologies, Inc. 
+ * 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
  *
- * Licensed 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
+ *     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.
- */
+*/
 
 package org.apache.kylin.measure.topn;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterSerializerTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterSerializerTest.java b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterSerializerTest.java
index 2daf3b4..6bc02cd 100644
--- a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterSerializerTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterSerializerTest.java
@@ -23,8 +23,6 @@ import java.nio.ByteBuffer;
 import org.apache.kylin.common.util.ByteArray;
 import org.apache.kylin.common.util.Bytes;
 import org.apache.kylin.common.util.LocalFileMetadataTestCase;
-import org.apache.kylin.measure.topn.TopNCounter;
-import org.apache.kylin.measure.topn.TopNCounterSerializer;
 import org.apache.kylin.metadata.datatype.DataType;
 import org.junit.AfterClass;
 import org.junit.Assert;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterTest.java b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterTest.java
index aa8b2fe..3eba78b 100644
--- a/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/measure/topn/TopNCounterTest.java
@@ -1,18 +1,20 @@
 /*
- * Copyright (C) 2011 Clearspring Technologies, Inc. 
+ * 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
  *
- * Licensed 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
+ *     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.
- */
+*/
 
 package org.apache.kylin.measure.topn;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/metadata/MetadataManagerTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/metadata/MetadataManagerTest.java b/core-metadata/src/test/java/org/apache/kylin/metadata/MetadataManagerTest.java
index b372be2..a861ee1 100644
--- a/core-metadata/src/test/java/org/apache/kylin/metadata/MetadataManagerTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/metadata/MetadataManagerTest.java
@@ -19,7 +19,9 @@
 package org.apache.kylin.metadata;
 
 import static org.apache.kylin.metadata.MetadataManager.getInstance;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-metadata/src/test/java/org/apache/kylin/metadata/model/DefaultPartitionConditionBuilderTest.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/test/java/org/apache/kylin/metadata/model/DefaultPartitionConditionBuilderTest.java b/core-metadata/src/test/java/org/apache/kylin/metadata/model/DefaultPartitionConditionBuilderTest.java
index 4e56a71..1b610ca 100644
--- a/core-metadata/src/test/java/org/apache/kylin/metadata/model/DefaultPartitionConditionBuilderTest.java
+++ b/core-metadata/src/test/java/org/apache/kylin/metadata/model/DefaultPartitionConditionBuilderTest.java
@@ -1,19 +1,21 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+/*
+ * 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.
- */
+*/
+
 package org.apache.kylin.metadata.model;
 
 import org.apache.kylin.common.util.DateFormat;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-storage/src/test/java/org/apache/kylin/storage/StorageMockUtils.java
----------------------------------------------------------------------
diff --git a/core-storage/src/test/java/org/apache/kylin/storage/StorageMockUtils.java b/core-storage/src/test/java/org/apache/kylin/storage/StorageMockUtils.java
index 0706713..8099527 100644
--- a/core-storage/src/test/java/org/apache/kylin/storage/StorageMockUtils.java
+++ b/core-storage/src/test/java/org/apache/kylin/storage/StorageMockUtils.java
@@ -1,23 +1,20 @@
 /*
+ * 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
  *
- *  * 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.
- * /
- */
-
+ *     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.
+*/
 package org.apache.kylin.storage;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/core-storage/src/test/java/org/apache/kylin/storage/gtrecord/DictGridTableTest.java
----------------------------------------------------------------------
diff --git a/core-storage/src/test/java/org/apache/kylin/storage/gtrecord/DictGridTableTest.java b/core-storage/src/test/java/org/apache/kylin/storage/gtrecord/DictGridTableTest.java
index bac9c10..dde0481 100644
--- a/core-storage/src/test/java/org/apache/kylin/storage/gtrecord/DictGridTableTest.java
+++ b/core-storage/src/test/java/org/apache/kylin/storage/gtrecord/DictGridTableTest.java
@@ -561,7 +561,7 @@ public class DictGridTableTest extends LocalFileMetadataTestCase {
     static GTInfo newInfo() {
         Builder builder = GTInfo.builder();
         builder.setCodeSystem(newDictCodeSystem());
-        builder.setColumns( //
+        builder.setColumns(//
                 DataType.getType("timestamp"), //
                 DataType.getType("integer"), //
                 DataType.getType("varchar(10)"), //

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeSamplingTest.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeSamplingTest.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeSamplingTest.java
index beec00f..0c8c13b 100644
--- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeSamplingTest.java
+++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeSamplingTest.java
@@ -51,7 +51,7 @@ public class CubeSamplingTest {
     @Before
     public void setup() {
 
-        baseCuboidId = (1l << ROW_LENGTH) - 1;
+        baseCuboidId = (1L << ROW_LENGTH) - 1;
         List<Long> allCuboids = Lists.newArrayList();
         List<Integer[]> allCuboidsBitSetList = Lists.newArrayList();
         for (long i = 1; i < baseCuboidId; i++) {

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
index 847071d..dfbba14 100644
--- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
+++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
@@ -47,267 +47,275 @@ import org.apache.kylin.engine.mr.common.BatchConstants;
  * 
  */
 @SuppressWarnings({ "rawtypes", "unchecked" })
-public class MockupMapContext {
+public class MockupMapContext implements MapContext{
+
+    private Configuration hconf;
+
+    private Object[] outKV;
 
     public static Context create(final Configuration hconf, String metadataUrl, String cubeName, final Object[] outKV) {
 
         hconf.set(BatchConstants.CFG_CUBE_NAME, cubeName);
 
-        return new WrappedMapper().getMapContext(new MapContext() {
-
-            @Override
-            public boolean nextKeyValue() throws IOException, InterruptedException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Object getCurrentKey() throws IOException, InterruptedException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Object getCurrentValue() throws IOException, InterruptedException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public void write(Object key, Object value) throws IOException, InterruptedException {
-                System.out.println("Write -- k:" + key + ", v:" + value);
-                if (outKV != null) {
-                    outKV[0] = key;
-                    outKV[1] = value;
-                }
-            }
-
-            @Override
-            public OutputCommitter getOutputCommitter() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public TaskAttemptID getTaskAttemptID() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public void setStatus(String msg) {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public String getStatus() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public float getProgress() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Counter getCounter(Enum<?> counterName) {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Counter getCounter(String groupName, String counterName) {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Configuration getConfiguration() {
-                return hconf;
-            }
-
-            @Override
-            public Credentials getCredentials() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public JobID getJobID() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public int getNumReduceTasks() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Path getWorkingDirectory() throws IOException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<?> getOutputKeyClass() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<?> getOutputValueClass() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<?> getMapOutputKeyClass() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<?> getMapOutputValueClass() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public String getJobName() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<? extends InputFormat<?, ?>> getInputFormatClass() throws ClassNotFoundException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<? extends Mapper<?, ?, ?, ?>> getMapperClass() throws ClassNotFoundException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<? extends Reducer<?, ?, ?, ?>> getCombinerClass() throws ClassNotFoundException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<? extends Reducer<?, ?, ?, ?>> getReducerClass() throws ClassNotFoundException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<? extends OutputFormat<?, ?>> getOutputFormatClass() throws ClassNotFoundException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Class<? extends Partitioner<?, ?>> getPartitionerClass() throws ClassNotFoundException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public RawComparator<?> getSortComparator() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public String getJar() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public RawComparator<?> getGroupingComparator() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public boolean getJobSetupCleanupNeeded() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public boolean getTaskCleanupNeeded() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public boolean getProfileEnabled() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public String getProfileParams() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public IntegerRanges getProfileTaskRange(boolean isMap) {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public String getUser() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public boolean getSymlink() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Path[] getArchiveClassPaths() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public URI[] getCacheArchives() throws IOException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public URI[] getCacheFiles() throws IOException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Path[] getLocalCacheArchives() throws IOException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Path[] getLocalCacheFiles() throws IOException {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public Path[] getFileClassPaths() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public String[] getArchiveTimestamps() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public String[] getFileTimestamps() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public int getMaxMapAttempts() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public int getMaxReduceAttempts() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public void progress() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public InputSplit getInputSplit() {
-                throw new NotImplementedException();
-            }
-
-            @Override
-            public RawComparator<?> getCombinerKeyGroupingComparator() {
-                throw new NotImplementedException();
-            }
-        });
+        return new WrappedMapper().getMapContext(new MockupMapContext(hconf, outKV));
+    }
+
+    public MockupMapContext(Configuration hconf, Object[] outKV){
+        this.hconf = hconf;
+        this.outKV = outKV;
+    }
+
+    @Override
+    public boolean nextKeyValue() throws IOException, InterruptedException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Object getCurrentKey() throws IOException, InterruptedException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Object getCurrentValue() throws IOException, InterruptedException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public void write(Object key, Object value) throws IOException, InterruptedException {
+        System.out.println("Write -- k:" + key + ", v:" + value);
+        if (outKV != null) {
+            outKV[0] = key;
+            outKV[1] = value;
+        }
+    }
+
+    @Override
+    public OutputCommitter getOutputCommitter() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public TaskAttemptID getTaskAttemptID() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public String getStatus() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public void setStatus(String msg) {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public float getProgress() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Counter getCounter(Enum<?> counterName) {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Counter getCounter(String groupName, String counterName) {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Configuration getConfiguration() {
+        return hconf;
+    }
+
+    @Override
+    public Credentials getCredentials() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public JobID getJobID() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public int getNumReduceTasks() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Path getWorkingDirectory() throws IOException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<?> getOutputKeyClass() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<?> getOutputValueClass() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<?> getMapOutputKeyClass() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<?> getMapOutputValueClass() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public String getJobName() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<? extends InputFormat<?, ?>> getInputFormatClass() throws ClassNotFoundException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<? extends Mapper<?, ?, ?, ?>> getMapperClass() throws ClassNotFoundException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<? extends Reducer<?, ?, ?, ?>> getCombinerClass() throws ClassNotFoundException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<? extends Reducer<?, ?, ?, ?>> getReducerClass() throws ClassNotFoundException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<? extends OutputFormat<?, ?>> getOutputFormatClass() throws ClassNotFoundException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Class<? extends Partitioner<?, ?>> getPartitionerClass() throws ClassNotFoundException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public RawComparator<?> getSortComparator() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public String getJar() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public RawComparator<?> getGroupingComparator() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public boolean getJobSetupCleanupNeeded() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public boolean getTaskCleanupNeeded() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public boolean getProfileEnabled() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public String getProfileParams() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public IntegerRanges getProfileTaskRange(boolean isMap) {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public String getUser() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public boolean getSymlink() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Path[] getArchiveClassPaths() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public URI[] getCacheArchives() throws IOException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public URI[] getCacheFiles() throws IOException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Path[] getLocalCacheArchives() throws IOException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Path[] getLocalCacheFiles() throws IOException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Path[] getFileClassPaths() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public String[] getArchiveTimestamps() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public String[] getFileTimestamps() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public int getMaxMapAttempts() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public int getMaxReduceAttempts() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public void progress() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public InputSplit getInputSplit() {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public RawComparator<?> getCombinerKeyGroupingComparator() {
+        throw new NotImplementedException();
     }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/NumberDictionaryForestTest.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/NumberDictionaryForestTest.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/NumberDictionaryForestTest.java
index bb10b4a..f6664bf 100644
--- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/NumberDictionaryForestTest.java
+++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/NumberDictionaryForestTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+*/
+
 package org.apache.kylin.engine.mr.steps;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKeyTest.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKeyTest.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKeyTest.java
index d71e366..df6287f 100644
--- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKeyTest.java
+++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKeyTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+*/
+
 package org.apache.kylin.engine.mr.steps;
 
 import static org.junit.Assert.assertTrue;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/jdbc/src/test/java/org/apache/kylin/jdbc/SQLResonseStubTest.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/org/apache/kylin/jdbc/SQLResonseStubTest.java b/jdbc/src/test/java/org/apache/kylin/jdbc/SQLResonseStubTest.java
index 9e4b3f6..e090af6 100644
--- a/jdbc/src/test/java/org/apache/kylin/jdbc/SQLResonseStubTest.java
+++ b/jdbc/src/test/java/org/apache/kylin/jdbc/SQLResonseStubTest.java
@@ -36,7 +36,8 @@ public class SQLResonseStubTest {
 
     @Test
     public void testReadValuePartRecognizedField() throws IOException {
-        final String payload = "{ \"columnMetas\":[ { \"isNullable\":1, \"displaySize\":0, \"schemaName\":null, \"catelogName\":null, \"tableName\":null, \"precision\":0, \"scale\":0, \"columnType\":91, \"columnTypeName\":\"DATE\", \"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false }, { \"isNullable\":1, \"displaySize\":10, \"label\":\"LEAF_CATEG_ID\", \"name\":\"LEAF_CATEG_ID\", \"schemaName\":null, \"catelogName\":null, \"tableName\":null, \"precision\":10, \"scale\":0, \"columnType\":4, \"columnTypeName\":\"INTEGER\", \"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false } ], \"results\":[ [ \"2013-08-07\", \"32996\", \"15\", \"15\", \"Auction\", \"10000000\", \"49.048952730908745\", \"49.048952730908745\", \"49.048952730908745\", \"1\" 
 ], [ \"2013-08-07\", \"43398\", \"0\", \"14\", \"ABIN\", \"10000633\", \"85.78317064220418\", \"85.78317064220418\", \"85.78317064220418\", \"1\" ] ], \"cube\":\"test_kylin_cube_with_slr_desc\", \"affectedRowCount\":0, \"isException\":false, \"exceptionMessage\":null, \"duration\":3451, \"partial\":false }";
+        final String payload = "{ \"columnMetas\":[ { \"isNullable\":1, \"displaySize\":0, \"schemaName\":null, \"catelogName\":null, \"tableName\":null, \"precision\":0, \"scale\":0, \"columnType\":91, \"columnTypeName\":\"DATE\", \"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false }," + "{ \"isNullable\":1, \"displaySize\":10, \"label\":\"LEAF_CATEG_ID\", \"name\":\"LEAF_CATEG_ID\", "
+                + "\"schemaName\":null, \"catelogName\":null, \"tableName\":null, \"precision\":10, \"scale\":0, \"columnType\":4, \"columnTypeName\":\"INTEGER\", \"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false } ], \"results\":[ [ \"2013-08-07\", \"32996\", \"15\", \"15\", \"Auction\", \"10000000\", \"49.048952730908745\", \"49.048952730908745\", \"49.048952730908745\", \"1\" ], [ \"2013-08-07\", \"43398\", \"0\", \"14\", \"ABIN\", \"10000633\", \"85.78317064220418\", \"85.78317064220418\", \"85.78317064220418\", \"1\" ] ], \"cube\":\"test_kylin_cube_with_slr_desc\", \"affectedRowCount\":0, \"isException\":false, \"exceptionMessage\":null, \"duration\":3451, \"partial\":false }";
         final SQLResponseStub stub = new ObjectMapper().readValue(payload, SQLResponseStub.class);
         assertEquals("test_kylin_cube_with_slr_desc", stub.getCube());
         assertEquals(3451, stub.getDuration());
@@ -49,7 +50,8 @@ public class SQLResonseStubTest {
 
     @Test
     public void testReadValueWithUnrecognizedField() throws IOException {
-        final String payload = "{ \"columnMetas\":[ { \"Unrecognized\":0, \"isNullable\":1, \"displaySize\":0, \"label\":\"CAL_DT\", \"name\":\"CAL_DT\", \"schemaName\":null, \"catelogName\":null, \"tableName\":null, \"precision\":0, \"scale\":0, \"columnType\":91, \"columnTypeName\":\"DATE\", \"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false }, { \"isNullable\":1, \"displaySize\":10, \"label\":\"LEAF_CATEG_ID\", \"name\":\"LEAF_CATEG_ID\", \"schemaName\":null, \"catelogName\":null, \"tableName\":null, \"precision\":10, \"scale\":0, \"columnType\":4, \"columnTypeName\":\"INTEGER\", \"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false } ], \"results\":[ [ \"2013-08-07\", \"32996\", \"15\", \"15\", \"Auction\", \"10000000\", \"49.0489527309
 08745\", \"49.048952730908745\", \"49.048952730908745\", \"1\" ], [ \"2013-08-07\", \"43398\", \"0\", \"14\", \"ABIN\", \"10000633\", \"85.78317064220418\", \"85.78317064220418\", \"85.78317064220418\", \"1\" ] ], \"cube\":\"test_kylin_cube_with_slr_desc\", \"affectedRowCount\":0, \"isException\":false, \"exceptionMessage\":null, \"duration\":3451, \"partial\":false, \"hitCache\":false }";
+        final String payload = "{ \"columnMetas\":[ { \"Unrecognized\":0, \"isNullable\":1, \"displaySize\":0, " + "\"label\":\"CAL_DT\", \"name\":\"CAL_DT\", \"schemaName\":null, \"catelogName\":null, " + "\"tableName\":null, \"precision\":0, \"scale\":0, \"columnType\":91, \"columnTypeName\":\"DATE\", " + "\"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false },"
+                + " { \"isNullable\":1, \"displaySize\":10, \"label\":\"LEAF_CATEG_ID\", \"name\":\"LEAF_CATEG_ID\", \"schemaName\":null, \"catelogName\":null, \"tableName\":null, \"precision\":10, \"scale\":0, \"columnType\":4, \"columnTypeName\":\"INTEGER\", \"readOnly\":true, \"writable\":false, \"caseSensitive\":true, \"searchable\":false, \"currency\":false, \"signed\":true, \"autoIncrement\":false, \"definitelyWritable\":false } ], \"results\":[ [ \"2013-08-07\", \"32996\", \"15\", \"15\", \"Auction\", \"10000000\", \"49.048952730908745\", \"49.048952730908745\", \"49.048952730908745\", \"1\" ], [ \"2013-08-07\", \"43398\", \"0\", \"14\", \"ABIN\", \"10000633\", \"85.78317064220418\", \"85.78317064220418\", \"85.78317064220418\", \"1\" ] ], \"cube\":\"test_kylin_cube_with_slr_desc\", \"affectedRowCount\":0, \"isException\":false, \"exceptionMessage\":null, \"duration\":3451, \"partial\":false, \"hitCache\":false }";
         final SQLResponseStub stub = new ObjectMapper().readValue(payload, SQLResponseStub.class);
         assertEquals("test_kylin_cube_with_slr_desc", stub.getCube());
         assertEquals(3451, stub.getDuration());

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITDoggedCubeBuilderTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITDoggedCubeBuilderTest.java b/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITDoggedCubeBuilderTest.java
index 1db7a24..6f29812 100644
--- a/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITDoggedCubeBuilderTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITDoggedCubeBuilderTest.java
@@ -1,21 +1,19 @@
 /*
+ * 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
  *
- *  * 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.
- * /
+ *     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.
  */
 
 package org.apache.kylin.cube.inmemcubing;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITInMemCubeBuilderTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITInMemCubeBuilderTest.java b/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITInMemCubeBuilderTest.java
index f9b6ef2..35a4f05 100644
--- a/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITInMemCubeBuilderTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/cube/inmemcubing/ITInMemCubeBuilderTest.java
@@ -1,21 +1,19 @@
 /*
+ * 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
  *
- *  * 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.
- * /
+ *     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.
  */
 
 package org.apache.kylin.cube.inmemcubing;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2ff4c54..48c075f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -942,12 +942,12 @@
                     <version>2.17</version>
                     <executions>
                         <execution>
-                            <id>validate</id>
+                            <id>check-style</id>
                             <phase>validate</phase>
                             <configuration>
                                 <configLocation>dev-support/checkstyle.xml</configLocation>
                                 <suppressionsLocation>dev-support/checkstyle-suppressions.xml</suppressionsLocation>
-                                <encoding>UTF-8</encoding>
+                                <includeTestSourceDirectory>true</includeTestSourceDirectory>
                                 <consoleOutput>true</consoleOutput>
                                 <failsOnError>true</failsOnError>
                             </configuration>

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/query/src/test/java/org/apache/kylin/query/udf/VersionUDFTest.java
----------------------------------------------------------------------
diff --git a/query/src/test/java/org/apache/kylin/query/udf/VersionUDFTest.java b/query/src/test/java/org/apache/kylin/query/udf/VersionUDFTest.java
index 98cced4..7f106ec 100644
--- a/query/src/test/java/org/apache/kylin/query/udf/VersionUDFTest.java
+++ b/query/src/test/java/org/apache/kylin/query/udf/VersionUDFTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+*/
+
 package org.apache.kylin.query.udf;
 
 import static org.junit.Assert.assertTrue;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/server-base/src/test/java/org/apache/kylin/rest/security/PasswordPlaceHolderConfigurerTest.java
----------------------------------------------------------------------
diff --git a/server-base/src/test/java/org/apache/kylin/rest/security/PasswordPlaceHolderConfigurerTest.java b/server-base/src/test/java/org/apache/kylin/rest/security/PasswordPlaceHolderConfigurerTest.java
index 8f53084..ac42ad7 100644
--- a/server-base/src/test/java/org/apache/kylin/rest/security/PasswordPlaceHolderConfigurerTest.java
+++ b/server-base/src/test/java/org/apache/kylin/rest/security/PasswordPlaceHolderConfigurerTest.java
@@ -20,7 +20,6 @@ package org.apache.kylin.rest.security;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 
 public class PasswordPlaceHolderConfigurerTest {
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java b/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
index d192a7d..5c010ef 100644
--- a/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
+++ b/server/src/test/java/org/apache/kylin/rest/controller/CubeControllerTest.java
@@ -25,7 +25,6 @@ import java.util.List;
 import org.apache.kylin.cube.CubeInstance;
 import org.apache.kylin.cube.CubeSegment;
 import org.apache.kylin.cube.model.CubeDesc;
-import org.apache.kylin.metadata.model.SegmentStatusEnum;
 import org.apache.kylin.rest.exception.InternalErrorException;
 import org.apache.kylin.rest.request.CubeRequest;
 import org.apache.kylin.rest.service.CubeService;

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e0edc84/source-kafka/src/test/java/org/apache/kylin/source/kafka/config/KafkaConsumerPropertiesTest.java
----------------------------------------------------------------------
diff --git a/source-kafka/src/test/java/org/apache/kylin/source/kafka/config/KafkaConsumerPropertiesTest.java b/source-kafka/src/test/java/org/apache/kylin/source/kafka/config/KafkaConsumerPropertiesTest.java
index 1d7863b..208fdb6 100644
--- a/source-kafka/src/test/java/org/apache/kylin/source/kafka/config/KafkaConsumerPropertiesTest.java
+++ b/source-kafka/src/test/java/org/apache/kylin/source/kafka/config/KafkaConsumerPropertiesTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+*/
+
 package org.apache.kylin.source.kafka.config;
 
 import static org.junit.Assert.assertEquals;


Mime
View raw message