pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roh...@apache.org
Subject svn commit: r1581505 - in /pig/trunk: ./ contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/ contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/
Date Tue, 25 Mar 2014 20:46:39 GMT
Author: rohini
Date: Tue Mar 25 20:46:38 2014
New Revision: 1581505

URL: http://svn.apache.org/r1581505
Log:
PIG-3832: Fix piggybank test compilation failure after PIG-3449 (rohini)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestMultiStorageCompression.java
    pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1581505&r1=1581504&r2=1581505&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Tue Mar 25 20:46:38 2014
@@ -30,6 +30,8 @@ PIG-2207: Support custom counters for ag
 
 IMPROVEMENTS
 
+PIG-3832: Fix piggybank test compilation failure after PIG-3449 (rohini)
+
 PIG-3449: Move JobCreationException to org.apache.pig.backend.hadoop.executionengine (cheolsoo)
 
 PIG-3802: Fix TestBlackAndWhitelistValidator failures (prkommireddi)

Modified: pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestMultiStorageCompression.java
URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestMultiStorageCompression.java?rev=1581505&r1=1581504&r2=1581505&view=diff
==============================================================================
--- pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestMultiStorageCompression.java
(original)
+++ pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestMultiStorageCompression.java
Tue Mar 25 20:46:38 2014
@@ -3,9 +3,9 @@
  * 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.
@@ -26,6 +26,7 @@ import java.util.List;
 
 import junit.framework.TestCase;
 
+import org.apache.hadoop.conf.Configurable;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.compress.BZip2Codec;
 import org.apache.hadoop.io.compress.CompressionCodec;
@@ -37,7 +38,7 @@ import org.apache.pig.impl.logicalLayer.
 import org.apache.pig.test.Util;
 
 public class TestMultiStorageCompression extends TestCase {
-   
+
    private static String patternString = "(\\d+)!+(\\w+)~+(\\w+)";
    public static ArrayList<String[]> data = new ArrayList<String[]>();
    static {
@@ -127,13 +128,15 @@ public class TestMultiStorageCompression
             // Try to read the records using the codec
             CompressionCodec codec = null;
 
-            
+
             // Use the codec according to the test case
-            if (type.equals("bz2"))
+            if (type.equals("bz2")) {
                codec = new BZip2Codec();
-            else if (type.equals("gz")) {
+            } else if (type.equals("gz")) {
                codec = new GzipCodec();
-               ((GzipCodec)codec).setConf(new Configuration());
+            }
+            if(codec instanceof Configurable) {
+                ((Configurable)codec).setConf(new Configuration());
             }
 
             CompressionInputStream createInputStream = codec
@@ -158,7 +161,7 @@ public class TestMultiStorageCompression
 
    private void runQuery(String outputPath, String compressionType)
          throws Exception, ExecException, IOException, FrontendException {
-      
+
       // create a data file
       String filename = TestHelper.createTempFile(data, "");
       PigServer pig = new PigServer(LOCAL);
@@ -178,6 +181,6 @@ public class TestMultiStorageCompression
 
       pig.executeBatch();
    }
-  
+
 
 }

Modified: pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java
URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java?rev=1581505&r1=1581504&r2=1581505&view=diff
==============================================================================
--- pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java
(original)
+++ pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java
Tue Mar 25 20:46:38 2014
@@ -46,7 +46,7 @@ import org.apache.pig.PigServer;
 import org.apache.pig.backend.executionengine.ExecException;
 import org.apache.pig.backend.executionengine.ExecJob;
 import org.apache.pig.backend.executionengine.ExecJob.JOB_STATUS;
-import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobCreationException;
+import org.apache.pig.backend.hadoop.executionengine.JobCreationException;
 import org.apache.pig.builtin.mock.Storage.Data;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.io.FileLocalizer;
@@ -69,6 +69,7 @@ public class TestAvroStorage {
     private static String outbasedir;
 
     public static final PathFilter hiddenPathFilter = new PathFilter() {
+        @Override
         public boolean accept(Path p) {
           String name = p.getName();
           return !name.startsWith("_") && !name.startsWith(".");



Mime
View raw message