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

Steve Loughran commented on HADOOP-14076:
-----------------------------------------

OR we have some utils.ConfIO class with methods like {{saveToFile(File, 
Configuration) and saveToLocalPath(string, Configuration) as well as the same 
for Filesystem URIs. It's just that Configuration is big enough as it is, and 
these things don't have to be added to that class as it is. But yes, chris has 
a point too: do it outside of the core and your app gets to use it immediately, 
no need to backport

> Allow Configuration to be persisted given path to file
> ------------------------------------------------------
>
>                 Key: HADOOP-14076
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14076
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Ted Yu
>
> Currently Configuration has the following methods for persistence:
> {code}
>   public void writeXml(OutputStream out) throws IOException {
>   public void writeXml(Writer out) throws IOException {
> {code}
> Adding API for persisting to file given path would be useful:
> {code}
>   public void writeXml(String path) throws IOException {
> {code}
> Background: I recently worked on exporting Configuration to a file using JNI.
> Without the proposed API, I resorted to some trick such as the following:
> http://www.kfu.com/~nsayer/Java/jni-filedesc.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to