hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7870) fix SequenceFile#createWriter with boolean createParent arg to respect createParent.
Date Fri, 09 Dec 2011 13:30:40 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-7870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166152#comment-13166152
] 

Hudson commented on HADOOP-7870:
--------------------------------

Integrated in Hadoop-Hdfs-0.23-Build #102 (See [https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/102/])
    HADOOP-7870. svn merge -c 1212084 from trunk

eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212086
Files : 
* /hadoop/common/branches/branch-0.23
* /hadoop/common/branches/branch-0.23/hadoop-common-project
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-auth
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/docs
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/core
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/native
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/datanode
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/secondary
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/hdfs
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/.gitignore
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/bin
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/conf
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/c++
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib/block_forensics
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib/build-contrib.xml
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib/build.xml
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib/data_join
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib/eclipse-plugin
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib/index
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/contrib/vaidya
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/examples
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/java
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/hdfs
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/io/FileBench.java
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/io/TestSequenceFileMergeProgress.java
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/ipc
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/security/authorize/TestServiceLevelAuthorization.java
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/test/MapredTestDriver.java
* /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/src/webapps/job
* /hadoop/common/branches/branch-0.23/hadoop-project/src/site

                
> fix SequenceFile#createWriter with boolean createParent arg to respect createParent.
> ------------------------------------------------------------------------------------
>
>                 Key: HADOOP-7870
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7870
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Jonathan Hsieh
>            Assignee: Jonathan Hsieh
>             Fix For: 0.23.1, 1.1.0
>
>         Attachments: hadoop-7870-1.patch, hadoop-7870.patch, hadoop-7870.patch
>
>
> After HBASE-6840, one set of calls to createNonRecursive(...) seems fishy - the new boolean
createParent variable from the signature isn't used at all.  
> {code}
> +  public static Writer
> +    createWriter(FileSystem fs, Configuration conf, Path name,
> +                 Class keyClass, Class valClass, int bufferSize,
> +                 short replication, long blockSize, boolean createParent,
> +                 CompressionType compressionType, CompressionCodec codec,
> +                 Metadata metadata) throws IOException {
> +    if ((codec instanceof GzipCodec) &&
> +        !NativeCodeLoader.isNativeCodeLoaded() &&
> +        !ZlibFactory.isNativeZlibLoaded(conf)) {
> +      throw new IllegalArgumentException("SequenceFile doesn't work with " +
> +                                         "GzipCodec without native-hadoop code!");
> +    }
> +
> +    switch (compressionType) {
> +    case NONE:
> +      return new Writer(conf, 
> +          fs.createNonRecursive(name, true, bufferSize, replication, blockSize, null),
> +          keyClass, valClass, metadata).ownStream();
> +    case RECORD:
> +      return new RecordCompressWriter(conf, 
> +          fs.createNonRecursive(name, true, bufferSize, replication, blockSize, null),
> +          keyClass, valClass, codec, metadata).ownStream();
> +    case BLOCK:
> +      return new BlockCompressWriter(conf,
> +          fs.createNonRecursive(name, true, bufferSize, replication, blockSize, null),
> +          keyClass, valClass, codec, metadata).ownStream();
> +    default:
> +      return null;
> +    }
> +  } 
> +
> {code}
> Nicolas Spiegelberg suggests changing it to
> {code} 
> if (createParent) { use fs.create() } 
> else { use fs.createNonRecursive(); }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message