Author: rohini Date: Tue Jul 25 22:30:24 2017 New Revision: 1803010 URL: http://svn.apache.org/viewvc?rev=1803010&view=rev Log: PIG-5264: Remove deprecated keys from PigConfiguration (nkollar via rohini)
Removed: pig/trunk/src/org/apache/pig/builtin/RoundRobinPartitioner.java pig/trunk/src/org/apache/pig/impl/util/WrappedIOException.java Modified: pig/trunk/CHANGES.txt pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/evaluation/string/TestLookupInFiles.java pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestCSVStorage.java pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestDBStorage.java pig/trunk/src/org/apache/pig/PigConfiguration.java pig/trunk/src/org/apache/pig/ResourceStatistics.java pig/trunk/src/org/apache/pig/tools/pigstats/PigStatsUtil.java pig/trunk/test/org/apache/pig/test/MiniCluster.java pig/trunk/test/org/apache/pig/test/TestAlgebraicInstantiation.java pig/trunk/test/org/apache/pig/test/TestAutoLocalMode.java pig/trunk/test/org/apache/pig/test/TestLargeFile.java pig/trunk/test/org/apache/pig/test/TestMRCompiler.java pig/trunk/test/org/apache/pig/test/TestMultiQueryCompiler.java pig/trunk/test/org/apache/pig/test/TestNumberOfReducers.java pig/trunk/test/org/apache/pig/test/TestOrderBy.java pig/trunk/test/org/apache/pig/test/TestSampleOptimizer.java Modified: pig/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/CHANGES.txt (original) +++ pig/trunk/CHANGES.txt Tue Jul 25 22:30:24 2017 @@ -24,6 +24,8 @@ INCOMPATIBLE CHANGES IMPROVEMENTS +PIG-5264: Remove deprecated keys from PigConfiguration (nkollar via rohini) + PIG-5157: Upgrade to Spark 2.0 (nkollar via liyunzhang) PIG-5237: Fix DOT file parsing to enable DOT-based physical plan testing (YaShock via szita) Modified: pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/evaluation/string/TestLookupInFiles.java URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/evaluation/string/TestLookupInFiles.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/evaluation/string/TestLookupInFiles.java (original) +++ pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/evaluation/string/TestLookupInFiles.java Tue Jul 25 22:30:24 2017 @@ -28,20 +28,22 @@ import org.apache.pig.ExecType; import org.apache.pig.PigServer; import org.apache.pig.backend.hadoop.datastorage.ConfigurationUtil; import org.apache.pig.data.Tuple; -import org.apache.pig.test.MiniCluster; +import org.apache.pig.test.MiniGenericCluster; import org.apache.pig.test.Util; +import org.junit.Before; import org.junit.Test; -import junit.framework.TestCase; +import static org.junit.Assert.assertTrue; -public class TestLookupInFiles extends TestCase { - MiniCluster cluster = MiniCluster.buildCluster(); +public class TestLookupInFiles { + MiniGenericCluster cluster = MiniGenericCluster.buildCluster(); private PigServer pigServer; - @Override + @Before public void setUp() throws Exception{ pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties()); } + @Test public void testLookupInFiles() throws Exception { File tmpFile = File.createTempFile("test", ".txt"); Modified: pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestCSVStorage.java URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestCSVStorage.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestCSVStorage.java (original) +++ pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestCSVStorage.java Tue Jul 25 22:30:24 2017 @@ -31,7 +31,7 @@ import org.apache.pig.backend.executione import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRConfiguration; import org.apache.pig.data.DataByteArray; import org.apache.pig.data.Tuple; -import org.apache.pig.test.MiniCluster; +import org.apache.pig.test.MiniGenericCluster; import org.apache.pig.test.Util; import org.junit.Assert; import org.junit.Test; @@ -40,10 +40,10 @@ public class TestCSVStorage { protected static final Log LOG = LogFactory.getLog(TestCSVStorage.class); private PigServer pigServer; - private MiniCluster cluster; + private MiniGenericCluster cluster; public TestCSVStorage() throws ExecException, IOException { - cluster = MiniCluster.buildCluster(); + cluster = MiniGenericCluster.buildCluster(); pigServer = new PigServer(ExecType.LOCAL, new Properties()); pigServer.getPigContext().getProperties() .setProperty(MRConfiguration.MAP_MAX_ATTEMPTS, "1"); Modified: pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestDBStorage.java URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestDBStorage.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestDBStorage.java (original) +++ pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestDBStorage.java Tue Jul 25 22:30:24 2017 @@ -30,25 +30,28 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Date; -import java.util.List; import org.apache.pig.ExecType; import org.apache.pig.PigServer; import org.apache.pig.backend.executionengine.ExecException; import org.apache.pig.backend.executionengine.ExecJob; import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRConfiguration; -import org.apache.pig.test.MiniCluster; +import org.apache.pig.test.MiniGenericCluster; import org.apache.pig.test.Util; import org.hsqldb.Server; import org.junit.After; import org.junit.Before; -import junit.framework.TestCase; +import org.junit.Test; -public class TestDBStorage extends TestCase { +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertTrue; + +public class TestDBStorage { private PigServer pigServer; - private MiniCluster cluster; + private MiniGenericCluster cluster; private Server dbServer; private String driver = "org.hsqldb.jdbcDriver"; // private String url = "jdbc:hsqldb:mem:."; @@ -63,7 +66,7 @@ public class TestDBStorage extends TestC public TestDBStorage() throws ExecException, IOException { // Initialise Pig server - cluster = MiniCluster.buildCluster(); + cluster = MiniGenericCluster.buildCluster(); pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties()); pigServer.getPigContext().getProperties() .setProperty(MRConfiguration.MAP_MAX_ATTEMPTS, "1"); @@ -155,6 +158,7 @@ public class TestDBStorage extends TestC } } + @Test public void testWriteToDB() throws IOException { String insertQuery = "insert into ttt (id, name, ratio, dt) values (?,?,?,?)"; pigServer.setBatchOn(); Modified: pig/trunk/src/org/apache/pig/PigConfiguration.java URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/PigConfiguration.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/src/org/apache/pig/PigConfiguration.java (original) +++ pig/trunk/src/org/apache/pig/PigConfiguration.java Tue Jul 25 22:30:24 2017 @@ -505,21 +505,11 @@ public class PigConfiguration { public static final String PIG_SPARK_USE_NETTY_FILESERVER = "pig.spark.rpc.useNettyFileServer"; /** - * @deprecated use {@link #PIG_LOG_TRACE_ID} instead. Will be removed in Pig 0.18 - */ - public static final String CALLER_ID = PIG_LOG_TRACE_ID; - - /** * Enable ATS for Pig */ public static final String PIG_ATS_ENABLED = "pig.ats.enabled"; /** - * @deprecated use {@link #PIG_ATS_ENABLED} instead. Will be removed in Pig 0.18 - */ - public static final String ENABLE_ATS = PIG_ATS_ENABLED; - - /** * If set, Pig will override tez.am.launch.cmd-opts and tez.am.resource.memory.mb to optimal */ public static final String PIG_TEZ_CONFIGURE_AM_MEMORY = "pig.tez.configure.am.memory"; @@ -533,66 +523,4 @@ public class PigConfiguration { public static final String PIG_PRINT_EXEC_PLAN = "pig.print.exec.plan"; - // Deprecated settings of Pig 0.13 - - /** - * @deprecated use {@link #PIG_OPT_FETCH} instead. Will be removed in Pig 0.16 - */ - @Deprecated - public static final String OPT_FETCH = PIG_OPT_FETCH; - - /** - * @deprecated use {@link #PIG_CACHEDBAG_MEMUSAGE} instead. Will be removed in Pig 0.16 - */ - @Deprecated - public static final String PROP_CACHEDBAG_MEMUSAGE = PIG_CACHEDBAG_MEMUSAGE; - - /** - * @deprecated use {@link #PIG_EXEC_MAP_PARTAGG} instead. Will be removed in Pig 0.16 - */ - @Deprecated - public static final String PROP_EXEC_MAP_PARTAGG = PIG_EXEC_MAP_PARTAGG; - - /** - * @deprecated use {@link #PIG_EXEC_MAP_PARTAGG_MINREDUCTION} instead. Will be removed in Pig 0.16 - */ - @Deprecated - public static final String PARTAGG_MINREDUCTION = PIG_EXEC_MAP_PARTAGG_MINREDUCTION; - - /** - * @deprecated use {@link #PROP_NO_COMBINER1} instead. Will be removed in Pig 0.16 - */ - @Deprecated - public static final String PROP_NO_COMBINER = PIG_EXEC_NO_COMBINER; - - @Deprecated - public static final String SHOULD_USE_SCHEMA_TUPLE = PIG_SCHEMA_TUPLE_ENABLED; - - @Deprecated - public static final String SCHEMA_TUPLE_SHOULD_USE_IN_UDF = PIG_SCHEMA_TUPLE_USE_IN_UDF; - - @Deprecated - public static final String SCHEMA_TUPLE_SHOULD_USE_IN_FOREACH = PIG_SCHEMA_TUPLE_USE_IN_FOREACH; - - @Deprecated - public static final String SCHEMA_TUPLE_SHOULD_USE_IN_FRJOIN = PIG_SCHEMA_TUPLE_USE_IN_FRJOIN; - - @Deprecated - public static final String SCHEMA_TUPLE_SHOULD_USE_IN_MERGEJOIN = PIG_SCHEMA_TUPLE_USE_IN_MERGEJOIN; - - @Deprecated - public static final String SCHEMA_TUPLE_SHOULD_ALLOW_FORCE = PIG_SCHEMA_TUPLE_ALLOW_FORCE; - - /** - * @deprecated use {@link #PIG_SCRIPT_INFO_ENABLED} instead. Will be removed in Pig 0.16 - */ - @Deprecated - public static final String INSERT_ENABLED = PIG_SCRIPT_INFO_ENABLED; - - /** - * @deprecated use {@link #PIG_SCRIPT_MAX_SIZE} instead. Will be removed in Pig 0.16 - */ - @Deprecated - public static final String MAX_SCRIPT_SIZE = PIG_SCRIPT_MAX_SIZE; - } Modified: pig/trunk/src/org/apache/pig/ResourceStatistics.java URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/src/org/apache/pig/ResourceStatistics.java (original) +++ pig/trunk/src/org/apache/pig/ResourceStatistics.java Tue Jul 25 22:30:24 2017 @@ -198,17 +198,6 @@ public class ResourceStatistics implemen } /** - * - * @param mBytes - * @deprecated Use {@link ResourceStatistics#setSizeInBytes(Long)} instead - */ - @Deprecated - public ResourceStatistics setmBytes(Long mBytes) { - this.bytes = mBytes * 1024 * 1024; - return this; - } - - /** * Sets the size in bytes * * @param bytes Modified: pig/trunk/src/org/apache/pig/tools/pigstats/PigStatsUtil.java URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/pigstats/PigStatsUtil.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/src/org/apache/pig/tools/pigstats/PigStatsUtil.java (original) +++ pig/trunk/src/org/apache/pig/tools/pigstats/PigStatsUtil.java Tue Jul 25 22:30:24 2017 @@ -24,7 +24,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POStore; -import org.apache.pig.tools.pigstats.mapreduce.MRPigStatsUtil; import org.apache.pig.tools.pigstats.mapreduce.SimplePigStats; /** @@ -60,20 +59,6 @@ public class PigStatsUtil { = "MultiStoreCounters"; /** - * @deprecated use {@link org.apache.pig.tools.pigstats.mapreduce.MRPigStatsUtil#TASK_COUNTER_GROUP} instead. - */ - @Deprecated - public static final String TASK_COUNTER_GROUP - = "org.apache.hadoop.mapred.Task$Counter"; - - /** - * @deprecated use {@link org.apache.pig.tools.pigstats.mapreduce.MRPigStatsUtil#FS_COUNTER_GROUP} instead. - */ - @Deprecated - public static final String FS_COUNTER_GROUP - = MRPigStatsUtil.FS_COUNTER_GROUP; - - /** * Returns an empty PigStats object Use of this method is not advised as it * will return the MR execution engine version of PigStats by default, and * is not necessarily empty depending on the timing. Modified: pig/trunk/test/org/apache/pig/test/MiniCluster.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/MiniCluster.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/MiniCluster.java (original) +++ pig/trunk/test/org/apache/pig/test/MiniCluster.java Tue Jul 25 22:30:24 2017 @@ -48,15 +48,6 @@ public class MiniCluster extends MiniGen private Configuration m_dfs_conf = null; private Configuration m_mr_conf = null; - /** - * @deprecated use {@link org.apache.pig.test.MiniGenericCluster.buildCluster() instead. - */ - @Deprecated - public static MiniCluster buildCluster() { - System.setProperty("test.exec.type", "mr"); - return (MiniCluster)MiniGenericCluster.buildCluster("mr"); - } - @Override public ExecType getExecType() { return ExecType.MAPREDUCE; Modified: pig/trunk/test/org/apache/pig/test/TestAlgebraicInstantiation.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestAlgebraicInstantiation.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestAlgebraicInstantiation.java (original) +++ pig/trunk/test/org/apache/pig/test/TestAlgebraicInstantiation.java Tue Jul 25 22:30:24 2017 @@ -39,7 +39,7 @@ import org.junit.Test; public class TestAlgebraicInstantiation { Boolean[] nullFlags = new Boolean[]{ false, true}; - static MiniCluster cluster = MiniCluster.buildCluster(); + static MiniGenericCluster cluster = MiniGenericCluster.buildCluster(); private PigServer pig; private File tmpFile; Modified: pig/trunk/test/org/apache/pig/test/TestAutoLocalMode.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestAutoLocalMode.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestAutoLocalMode.java (original) +++ pig/trunk/test/org/apache/pig/test/TestAutoLocalMode.java Tue Jul 25 22:30:24 2017 @@ -42,7 +42,7 @@ import org.junit.Test; public class TestAutoLocalMode { - static MiniCluster cluster = MiniCluster.buildCluster(); + static MiniGenericCluster cluster = MiniGenericCluster.buildCluster(); private PigServer pigServer; private File logFile; Modified: pig/trunk/test/org/apache/pig/test/TestLargeFile.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestLargeFile.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestLargeFile.java (original) +++ pig/trunk/test/org/apache/pig/test/TestLargeFile.java Tue Jul 25 22:30:24 2017 @@ -45,11 +45,11 @@ public class TestLargeFile { File datFile; - private long defaultBlockSize = (new Configuration()).getLong("dfs.block.size", 0); + private long defaultBlockSize = (new Configuration()).getLong("dfs.blocksize", 0); private long total = defaultBlockSize >> 1; private int max_rand = 500; - static MiniCluster cluster = MiniCluster.buildCluster(); + static MiniGenericCluster cluster = MiniGenericCluster.buildCluster(); Integer[] COUNT = new Integer[max_rand]; Modified: pig/trunk/test/org/apache/pig/test/TestMRCompiler.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestMRCompiler.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestMRCompiler.java (original) +++ pig/trunk/test/org/apache/pig/test/TestMRCompiler.java Tue Jul 25 22:30:24 2017 @@ -134,7 +134,7 @@ import org.junit.runner.RunWith; "testStorerLimit", "testFetchOptimizerSideEffect"}) public class TestMRCompiler { - static MiniCluster cluster; + static MiniGenericCluster cluster; static PigContext pc; static PigContext pcMR; @@ -157,7 +157,7 @@ public class TestMRCompiler { @BeforeClass public static void setUpBeforeClass() throws Exception { - cluster = MiniCluster.buildCluster(); + cluster = MiniGenericCluster.buildCluster(); pc = new PigContext(ExecType.LOCAL, new Properties()); pcMR = new PigContext(ExecType.MAPREDUCE, cluster.getProperties()); pc.connect(); Modified: pig/trunk/test/org/apache/pig/test/TestMultiQueryCompiler.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestMultiQueryCompiler.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestMultiQueryCompiler.java (original) +++ pig/trunk/test/org/apache/pig/test/TestMultiQueryCompiler.java Tue Jul 25 22:30:24 2017 @@ -40,7 +40,6 @@ import org.apache.pig.backend.hadoop.exe import org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POSplit; import org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POStore; import org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil; -import org.apache.pig.impl.PigContext; import org.apache.pig.impl.io.FileLocalizer; import org.apache.pig.impl.plan.Operator; import org.apache.pig.impl.plan.OperatorPlan; @@ -57,16 +56,17 @@ import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; + @RunWith(JUnit4.class) public class TestMultiQueryCompiler { - private static MiniCluster cluster; + private static MiniGenericCluster cluster; private PigServer myPig; @BeforeClass public static void setUpBeforeClass() throws IOException { - cluster = MiniCluster.buildCluster(); + cluster = MiniGenericCluster.buildCluster(); Util.copyFromLocalToCluster(cluster, "test/org/apache/pig/test/data/passwd", "passwd"); Util.copyFromLocalToCluster(cluster, Modified: pig/trunk/test/org/apache/pig/test/TestNumberOfReducers.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestNumberOfReducers.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestNumberOfReducers.java (original) +++ pig/trunk/test/org/apache/pig/test/TestNumberOfReducers.java Tue Jul 25 22:30:24 2017 @@ -25,7 +25,6 @@ import java.io.PrintWriter; import org.apache.pig.PigRunner; import org.apache.pig.PigServer; import org.apache.pig.impl.PigContext; -import org.apache.pig.tools.pigstats.JobStats; import org.apache.pig.tools.pigstats.PigStats; import org.apache.pig.tools.pigstats.mapreduce.MRJobStats; import org.junit.AfterClass; @@ -34,7 +33,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; /** * This class tests whether the number of reducers is correctly set for queries @@ -53,11 +54,11 @@ public class TestNumberOfReducers { static PigContext pc; static PigServer pigServer; - private static MiniCluster cluster; + private static MiniGenericCluster cluster; @BeforeClass public static void setUpBeforeClass() throws Exception { - cluster = MiniCluster.buildCluster(); + cluster = MiniGenericCluster.buildCluster(); Util.copyFromLocalToCluster(cluster, LOCAL_INPUT_FILE, HDFS_INPUT_FILE); } Modified: pig/trunk/test/org/apache/pig/test/TestOrderBy.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestOrderBy.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestOrderBy.java (original) +++ pig/trunk/test/org/apache/pig/test/TestOrderBy.java Tue Jul 25 22:30:24 2017 @@ -34,7 +34,6 @@ import org.apache.pig.PigServer; import org.apache.pig.data.DataType; import org.apache.pig.data.Tuple; import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -43,7 +42,7 @@ import org.junit.Test; public class TestOrderBy { private static final int DATALEN = 1024; private String[][] DATA = new String[2][DATALEN]; - static MiniCluster cluster = MiniCluster.buildCluster(); + static MiniGenericCluster cluster = MiniGenericCluster.buildCluster(); private PigServer pig; private File tmpFile; Modified: pig/trunk/test/org/apache/pig/test/TestSampleOptimizer.java URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestSampleOptimizer.java?rev=1803010&r1=1803009&r2=1803010&view=diff ============================================================================== --- pig/trunk/test/org/apache/pig/test/TestSampleOptimizer.java (original) +++ pig/trunk/test/org/apache/pig/test/TestSampleOptimizer.java Tue Jul 25 22:30:24 2017 @@ -17,8 +17,6 @@ */ package org.apache.pig.test; -import static org.junit.Assert.*; - import java.io.File; import java.io.FileOutputStream; import java.io.PrintStream; @@ -43,13 +41,18 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + @RunWith(JUnit4.class) public class TestSampleOptimizer { static PigContext pc; static PigServer pigServer; + static MiniGenericCluster cluster = MiniGenericCluster.buildCluster(); static{ - pc = new PigContext(ExecType.MAPREDUCE,MiniCluster.buildCluster().getProperties()); + pc = new PigContext(ExecType.MAPREDUCE, cluster.getProperties()); try { pc.connect(); pigServer = new PigServer( pc ); @@ -60,7 +63,7 @@ public class TestSampleOptimizer { @AfterClass public static void oneTimeTearDown() throws Exception { - MiniCluster.buildCluster().shutDown(); + cluster.shutDown(); } @Test