pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1791459 - in /pig/trunk: ./ contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/ src/docs/src/documentation/content/xdocs/ src/org/apache/pig/parser/ test/org/apache/pig/data/ test/org/apache/pig/parser/ test/org/apa...
Date Sat, 15 Apr 2017 07:26:42 GMT
Author: daijy
Date: Sat Apr 15 07:26:42 2017
New Revision: 1791459

URL: http://svn.apache.org/viewvc?rev=1791459&view=rev
Log:
PIG-5221: More fs.default.name deprecation warnings

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestIndexedStorage.java
    pig/trunk/src/docs/src/documentation/content/xdocs/perf.xml
    pig/trunk/src/org/apache/pig/parser/QueryParserUtils.java
    pig/trunk/test/org/apache/pig/data/TestSchemaTuple.java
    pig/trunk/test/org/apache/pig/parser/TestQueryParserUtils.java
    pig/trunk/test/org/apache/pig/test/TestParser.java
    pig/trunk/test/org/apache/pig/test/TestPigContext.java
    pig/trunk/test/org/apache/pig/test/TestTmpFileCompression.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Sat Apr 15 07:26:42 2017
@@ -97,6 +97,8 @@ OPTIMIZATIONS
  
 BUG FIXES
 
+PIG-5221: More fs.default.name deprecation warnings (wattsinabox via daijy)
+
 PIG-5222: Fix Junit Deprecations (wattsinabox via daijy)
 
 PIG-5223: TestLimitVariable.testNestedLimitVariable1 and TestSecondarySortMR.testNestedLimitedSort
failing (jins via daijy)

Modified: pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestIndexedStorage.java
URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestIndexedStorage.java?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestIndexedStorage.java
(original)
+++ pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestIndexedStorage.java
Sat Apr 15 07:26:42 2017
@@ -119,7 +119,7 @@ public class TestIndexedStorage {
     public void testGetNext() throws IOException, InterruptedException {
         IndexedStorage storage = new IndexedStorage("\t","0,1");
         Configuration conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
+        conf.set("fs.defaultFS", "file:///");
         LocalFileSystem fs = FileSystem.getLocal(conf);
 
         TaskAttemptID taskId = HadoopShims.createTaskAttemptID("jt", 1, true, 1, 1);
@@ -151,7 +151,7 @@ public class TestIndexedStorage {
     public void testSeek() throws IOException, InterruptedException {
         IndexedStorage storage = new IndexedStorage("\t","0,1");
         Configuration conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
+        conf.set("fs.defaultFS", "file:///");
         LocalFileSystem fs = FileSystem.getLocal(conf);
 
         TaskAttemptID taskId =  HadoopShims.createTaskAttemptID("jt", 2, true, 2, 2);

Modified: pig/trunk/src/docs/src/documentation/content/xdocs/perf.xml
URL: http://svn.apache.org/viewvc/pig/trunk/src/docs/src/documentation/content/xdocs/perf.xml?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/src/docs/src/documentation/content/xdocs/perf.xml (original)
+++ pig/trunk/src/docs/src/documentation/content/xdocs/perf.xml Sat Apr 15 07:26:42 2017
@@ -32,7 +32,7 @@
 <source>
   &lt;property&gt;
     &lt;name&gt;tez.lib.uris&lt;/name&gt;
-    &lt;value&gt;${fs.default.name}/apps/tez/tez-0.5.2.tar.gz&lt;/value&gt;
+    &lt;value&gt;${fs.defaultFS}/apps/tez/tez-0.5.2.tar.gz&lt;/value&gt;
   &lt;/property&gt;
 </source>
   </section>

Modified: pig/trunk/src/org/apache/pig/parser/QueryParserUtils.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/parser/QueryParserUtils.java?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/parser/QueryParserUtils.java (original)
+++ pig/trunk/src/org/apache/pig/parser/QueryParserUtils.java Sat Apr 15 07:26:42 2017
@@ -95,10 +95,11 @@ public class QueryParserUtils {
     }
 
     static void setHdfsServers(String absolutePath, PigContext pigContext) throws URISyntaxException
{
-        // Get native host
-        String defaultFS = (String)pigContext.getProperties().get("fs.default.name");
+        // First check for the file system via the new property
+        String defaultFS = (String)pigContext.getProperties().get("fs.defaultFS");
         if (defaultFS==null)
-            defaultFS = (String)pigContext.getProperties().get("fs.defaultFS");
+            // check the deprecated property if we must
+            defaultFS = (String)pigContext.getProperties().get("fs.default.name");
 
         URI defaultFSURI = new URI(defaultFS);
 

Modified: pig/trunk/test/org/apache/pig/data/TestSchemaTuple.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/data/TestSchemaTuple.java?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/data/TestSchemaTuple.java (original)
+++ pig/trunk/test/org/apache/pig/data/TestSchemaTuple.java Sat Apr 15 07:26:42 2017
@@ -534,7 +534,7 @@ public class TestSchemaTuple {
         writer.close(null);
 
         Configuration conf = new Configuration();
-        conf.set("fs.default.name", "file:///");
+        conf.set("fs.defaultFS", "file:///");
 
         TaskAttemptID taskId = HadoopShims.createTaskAttemptID("jt", 1, true, 1, 1);
         conf.set(MRConfiguration.TASK_ID, taskId.toString());

Modified: pig/trunk/test/org/apache/pig/parser/TestQueryParserUtils.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/parser/TestQueryParserUtils.java?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/parser/TestQueryParserUtils.java (original)
+++ pig/trunk/test/org/apache/pig/parser/TestQueryParserUtils.java Sat Apr 15 07:26:42 2017
@@ -42,7 +42,7 @@ public class TestQueryParserUtils {
     @Test
     public void testSetHDFSServers() throws Exception {
         Properties props = new Properties();
-        props.setProperty("fs.default.name", "hdfs://nn1:8020/tmp");
+        props.setProperty("fs.defaultFS", "hdfs://nn1:8020/tmp");
         PigContext pc = new PigContext(ExecType.LOCAL, props);
 
         //No scheme/host

Modified: pig/trunk/test/org/apache/pig/test/TestParser.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestParser.java?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestParser.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestParser.java Sat Apr 15 07:26:42 2017
@@ -85,7 +85,7 @@ public class TestParser {
         for (ExecType execType : execTypes) {
             setUp(execType);
             Properties pigProperties = pigServer.getPigContext().getProperties();
-            pigProperties.setProperty("fs.default.name", "hdfs://a.com:8020");
+            pigProperties.setProperty("fs.defaultFS", "hdfs://a.com:8020");
             Configuration conf;
 
             Data data = Storage.resetData(pigServer.getPigContext());
@@ -94,19 +94,19 @@ public class TestParser {
             pigServer.registerQuery("a = load '/user/pig/1.txt' using mock.Storage;");
             conf = ConfigurationUtil.toConfiguration(pigProperties);
             assertTrue(conf.get(MRConfiguration.JOB_HDFS_SERVERS) == null ||
-                    conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.default.name"))||
+                    conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS"))||
                     conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS")));
 
             pigServer.registerQuery("a = load 'hdfs://a.com/user/pig/1.txt' using mock.Storage;");
             conf = ConfigurationUtil.toConfiguration(pigProperties);
             assertTrue(pigProperties.getProperty(MRConfiguration.JOB_HDFS_SERVERS) == null
||
-                    conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.default.name"))||
+                    conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS"))||
                     conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS")));
 
             pigServer.registerQuery("a = load 'har:///1.txt' using mock.Storage;");
             conf = ConfigurationUtil.toConfiguration(pigProperties);
             assertTrue(pigProperties.getProperty(MRConfiguration.JOB_HDFS_SERVERS) == null
||
-                    conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.default.name"))||
+                    conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS"))||
                     conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS")));
 
             pigServer.registerQuery("a = load 'hdfs://b.com/user/pig/1.txt' using mock.Storage;");
@@ -130,7 +130,7 @@ public class TestParser {
     public void testRemoteServerList2() throws Exception {
         pigServer = new PigServer(Util.getLocalTestMode());
         Properties pigProperties = pigServer.getPigContext().getProperties();
-        pigProperties.setProperty("fs.default.name", "hdfs://a.com:8020");
+        pigProperties.setProperty("fs.defaultFS", "hdfs://a.com:8020");
         Configuration conf;
 
         pigServer.setBatchOn();
@@ -145,7 +145,7 @@ public class TestParser {
                 + pigProperties.getProperty(MRConfiguration.JOB_HDFS_SERVERS));
         conf = ConfigurationUtil.toConfiguration(pigProperties);
         assertTrue(conf.get(MRConfiguration.JOB_HDFS_SERVERS) == null ||
-                conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.default.name"))||
+                conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS"))||
                 conf.get(MRConfiguration.JOB_HDFS_SERVERS).equals(pigProperties.get("fs.defaultFS")));
 
         pigServer.registerQuery("store a into 'hdfs://b.com/user/pig/1.txt' using mock.Storage;");

Modified: pig/trunk/test/org/apache/pig/test/TestPigContext.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestPigContext.java?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestPigContext.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestPigContext.java Sat Apr 15 07:26:42 2017
@@ -241,7 +241,7 @@ public class TestPigContext {
     private static Properties getProperties() {
         Properties props = new Properties();
         props.put(MRConfiguration.JOB_TRACKER, JOB_TRACKER);
-        props.put("fs.default.name", FS_NAME);
+        props.put("fs.defaultFS", FS_NAME);
         props.put("hadoop.tmp.dir", TMP_DIR_PROP);
         return props;
     }

Modified: pig/trunk/test/org/apache/pig/test/TestTmpFileCompression.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestTmpFileCompression.java?rev=1791459&r1=1791458&r2=1791459&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestTmpFileCompression.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestTmpFileCompression.java Sat Apr 15 07:26:42 2017
@@ -380,7 +380,7 @@ public class TestTmpFileCompression {
         tFile.delete();
         Configuration conf = new Configuration();
         conf.set("tfile.io.chunk.size","100");
-        conf.set("fs.default.name", "file:///");
+        conf.set("fs.defaultFS", "file:///");
 
         for (String codec: new String [] {"none", "gz"} ) {
             System.err.println("Testing RecordWriter/Reader with codec: "



Mime
View raw message