diff --git a/ligradle/checkstyle/linkedin-checkstyle.xml b/ligradle/checkstyle/linkedin-checkstyle.xml index a9bffe83..cec2ce2a 100644 --- a/ligradle/checkstyle/linkedin-checkstyle.xml +++ b/ligradle/checkstyle/linkedin-checkstyle.xml @@ -83,7 +83,7 @@ LinkedIn Java style. - + diff --git a/tony-cli/src/main/java/com/linkedin/tony/cli/ClusterSubmitter.java b/tony-cli/src/main/java/com/linkedin/tony/cli/ClusterSubmitter.java index b3ba5144..fb791dfc 100644 --- a/tony-cli/src/main/java/com/linkedin/tony/cli/ClusterSubmitter.java +++ b/tony-cli/src/main/java/com/linkedin/tony/cli/ClusterSubmitter.java @@ -21,7 +21,11 @@ import org.apache.hadoop.yarn.api.records.LocalResourceType; import org.apache.hadoop.yarn.exceptions.YarnException; -import static com.linkedin.tony.Constants.*; +import static com.linkedin.tony.Constants.CORE_SITE_CONF; +import static com.linkedin.tony.Constants.HADOOP_CONF_DIR; +import static com.linkedin.tony.Constants.HDFS_SITE_CONF; +import static com.linkedin.tony.Constants.TONY_FOLDER; +import static com.linkedin.tony.Constants.TONY_JAR_NAME; /** diff --git a/tony-cli/src/main/java/com/linkedin/tony/cli/NotebookSubmitter.java b/tony-cli/src/main/java/com/linkedin/tony/cli/NotebookSubmitter.java index 2d6b4751..54ab1862 100644 --- a/tony-cli/src/main/java/com/linkedin/tony/cli/NotebookSubmitter.java +++ b/tony-cli/src/main/java/com/linkedin/tony/cli/NotebookSubmitter.java @@ -26,7 +26,8 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.yarn.exceptions.YarnException; -import static com.linkedin.tony.Constants.*; +import static com.linkedin.tony.Constants.TONY_FOLDER; + /** * NotebookSubmitter is used to submit a python pex file (for example Jupyter Notebook) to run inside a cluster. diff --git a/tony-core/src/main/java/com/linkedin/tony/util/VersionInfo.java b/tony-core/src/main/java/com/linkedin/tony/util/VersionInfo.java index 287c94e9..ac1c4ca1 100644 --- a/tony-core/src/main/java/com/linkedin/tony/util/VersionInfo.java +++ b/tony-core/src/main/java/com/linkedin/tony/util/VersionInfo.java @@ -13,7 +13,13 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import static com.linkedin.tony.TonyConfigurationKeys.*; +import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_BRANCH; +import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_CHECKSUM; +import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_DATE; +import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_REVISION; +import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_URL; +import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_USER; +import static com.linkedin.tony.TonyConfigurationKeys.TONY_VERSION_INFO_VERSION; /** diff --git a/tony-core/src/test/java/com/linkedin/tony/events/TestEventHandler.java b/tony-core/src/test/java/com/linkedin/tony/events/TestEventHandler.java index 0f20dcbe..a95f7907 100644 --- a/tony-core/src/test/java/com/linkedin/tony/events/TestEventHandler.java +++ b/tony-core/src/test/java/com/linkedin/tony/events/TestEventHandler.java @@ -19,9 +19,13 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static com.linkedin.tony.util.ParserUtils.*; -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; +import static com.linkedin.tony.util.ParserUtils.parseEvents; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; public class TestEventHandler { diff --git a/tony-core/src/test/java/com/linkedin/tony/util/TestHistoryFileUtils.java b/tony-core/src/test/java/com/linkedin/tony/util/TestHistoryFileUtils.java index 9049dbb7..4b40f54d 100644 --- a/tony-core/src/test/java/com/linkedin/tony/util/TestHistoryFileUtils.java +++ b/tony-core/src/test/java/com/linkedin/tony/util/TestHistoryFileUtils.java @@ -9,7 +9,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration; import org.testng.annotations.Test; -import static org.testng.Assert.*; +import static org.testng.Assert.assertEquals; public class TestHistoryFileUtils { diff --git a/tony-core/src/test/java/com/linkedin/tony/util/TestUtils.java b/tony-core/src/test/java/com/linkedin/tony/util/TestUtils.java index b7f3dc98..b9bce50c 100644 --- a/tony-core/src/test/java/com/linkedin/tony/util/TestUtils.java +++ b/tony-core/src/test/java/com/linkedin/tony/util/TestUtils.java @@ -26,8 +26,15 @@ import org.apache.hadoop.yarn.exceptions.YarnException; import org.testng.annotations.Test; -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; + public class TestUtils { diff --git a/tony-core/src/test/java/com/linkedin/tony/util/gpu/TestGpuDiscoverer.java b/tony-core/src/test/java/com/linkedin/tony/util/gpu/TestGpuDiscoverer.java index 1ef680bc..937067fa 100644 --- a/tony-core/src/test/java/com/linkedin/tony/util/gpu/TestGpuDiscoverer.java +++ b/tony-core/src/test/java/com/linkedin/tony/util/gpu/TestGpuDiscoverer.java @@ -29,9 +29,6 @@ import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; -import static org.mockito.Mockito.*; - - /** * Ported from Hadoop 2.9.0