hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2293) Add the ability to set dfs.block.size for a given file from the command line
Date Sun, 28 Aug 2011 08:11:37 GMT

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

Uma Maheswara Rao G commented on HDFS-2293:
-------------------------------------------

Hi Todd,
Yes, it should be possible. Because already GenericOptionsParser supported.

{code}
public static int run(Configuration conf, Tool tool, String[] args) 
    throws Exception{
    if(conf == null) {
      conf = new Configuration();
    }
    GenericOptionsParser parser = new GenericOptionsParser(conf, args);
    //set the configuration back, so that Tool can configure itself
    System.out.println("block size"+ conf.get("dfs.blocksize"));
    tool.setConf(conf);
    
    //get the args w/o generic hadoop args
    String[] toolArgs = parser.getRemainingArgs();
    return tool.run(toolArgs);
  }
{code}

Here the block size is getting properly. But when it reached to FileSystem apis , cconfiguration
object is different.

I am not sure how it is working for you. 
Looks some how this feature got broken. 
Did i miss something?
 
Let me check more on this...

Regards,
Uma


> Add the ability to set dfs.block.size for a given file from the command line
> ----------------------------------------------------------------------------
>
>                 Key: HDFS-2293
>                 URL: https://issues.apache.org/jira/browse/HDFS-2293
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs client
>    Affects Versions: 0.23.0
>            Reporter: Aaron T. Myers
>            Assignee: Uma Maheswara Rao G
>              Labels: newbie
>
> See the thread [here|http://www.mail-archive.com/hdfs-user@hadoop.apache.org/msg01459.html],
in which Allen correctly points out that since dfs.block.size is a client-side config, one
could just set a different value in a custom HADOOP_CONF_DIR. We might as well make that easy.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message