You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2011/05/05 22:10:40 UTC

svn commit: r1099951 - in /pig/trunk: CHANGES.txt test/org/apache/pig/test/MiniCluster.java

Author: daijy
Date: Thu May  5 20:10:39 2011
New Revision: 1099951

URL: http://svn.apache.org/viewvc?rev=1099951&view=rev
Log:
PIG-2041: Minicluster should make each run independent

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/test/org/apache/pig/test/MiniCluster.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1099951&r1=1099950&r2=1099951&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Thu May  5 20:10:39 2011
@@ -200,6 +200,8 @@ PIG-1696: Performance: Use System.arrayc
 
 BUG FIXES
 
+PIG-2041: Minicluster should make each run independent (daijy)
+
 PIG-2040: Move classloader from QueryParserDriver to PigContext (daijy)
 
 PIG-1999: Macro alias masker should consider schema context (rding)

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=1099951&r1=1099950&r2=1099951&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/MiniCluster.java (original)
+++ pig/trunk/test/org/apache/pig/test/MiniCluster.java Thu May  5 20:10:39 2011
@@ -52,25 +52,27 @@ public class MiniCluster {
         try {
             final int dataNodes = 4;     // There will be 4 data nodes
             final int taskTrackers = 4;  // There will be 4 task tracker nodes
-            Configuration config = new Configuration();
-            
-            // Builds and starts the mini dfs and mapreduce clusters
-            m_dfs = new MiniDFSCluster(config, dataNodes, true, null);
-            m_fileSys = m_dfs.getFileSystem();
-            m_mr = new MiniMRCluster(taskTrackers, m_fileSys.getUri().toString(), 1);
             
             // Create the configuration hadoop-site.xml file
             File conf_dir = new File(System.getProperty("user.home"), "pigtest/conf/");
             conf_dir.mkdirs();
             File conf_file = new File(conf_dir, "hadoop-site.xml");
             
+            conf_file.delete();
+            
+            // Builds and starts the mini dfs and mapreduce clusters
+            Configuration config = new Configuration();
+            m_dfs = new MiniDFSCluster(config, dataNodes, true, null);
+            m_fileSys = m_dfs.getFileSystem();
+            m_mr = new MiniMRCluster(taskTrackers, m_fileSys.getUri().toString(), 1);
+            
             // Write the necessary config info to hadoop-site.xml
             m_conf = m_mr.createJobConf();      
             m_conf.setInt("mapred.submit.replication", 2);
             m_conf.set("dfs.datanode.address", "0.0.0.0:0");
             m_conf.set("dfs.datanode.http.address", "0.0.0.0:0");
-            m_conf.set("mapred.map.max.attempts", "1");
-            m_conf.set("mapred.reduce.max.attempts", "1");
+            m_conf.set("mapred.map.max.attempts", "2");
+            m_conf.set("mapred.reduce.max.attempts", "2");
             m_conf.writeXml(new FileOutputStream(conf_file));
             
             // Set the system properties needed by Pig