You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by Sachin Pasalkar <Sa...@symantec.com> on 2016/10/13 17:38:25 UTC

Different way used to create file path in hdfs state

Hi,

I was looking HdfsState class where createOutputFile api present at line 182 is as follows

Path path = new Path(this.fileNameFormat.getPath(), this.fileNameFormat.getName(this.rotation, System.currentTimeMillis()));

whereas there is another createOutputFile at line 272 line

Path p = new Path(this.fsUrl + this.fileNameFormat.getPath(), this.fileNameFormat.getName(this.rotation, System.currentTimeMillis()));

In line number 182 user has to provide the hdfs uri in path itself, its handled properly in 272

Is there any reason for above difference or its just missed?

Thanks,
Sachin

Re: Different way used to create file path in hdfs state

Posted by Sachin Pasalkar <Sa...@symantec.com>.
Can anyone let me know if its done purposefully?


On 13/10/16, 11:08 PM, "Sachin Pasalkar" <Sa...@symantec.com>
wrote:

>Hi,
>
>I was looking HdfsState class where createOutputFile api present at line
>182 is as follows
>
>Path path = new Path(this.fileNameFormat.getPath(),
>this.fileNameFormat.getName(this.rotation, System.currentTimeMillis()));
>
>whereas there is another createOutputFile at line 272 line
>
>Path p = new Path(this.fsUrl + this.fileNameFormat.getPath(),
>this.fileNameFormat.getName(this.rotation, System.currentTimeMillis()));
>
>In line number 182 user has to provide the hdfs uri in path itself, its
>handled properly in 272
>
>Is there any reason for above difference or its just missed?
>
>Thanks,
>Sachin