listStatus() should return an empty array
On Jul 22, 2015 13:11, "Flavio Pompermaier" wrote:
> I can detect if it's a dir but how can I detect if it's empty?
>
> On Wed, Jul 22, 2015 at 12:49 PM, Fabian Hueske wrote:
>
>> How about FileStatus[] FileSystem.listStatus()?
>> FileStatus gives the le
I can detect if it's a dir but how can I detect if it's empty?
On Wed, Jul 22, 2015 at 12:49 PM, Fabian Hueske wrote:
> How about FileStatus[] FileSystem.listStatus()?
> FileStatus gives the length of a file, the path, whether it's a dir, etc.
>
> 2015-07-22 11:04 GMT+02:00 Flavio Pompermaier :
How about FileStatus[] FileSystem.listStatus()?
FileStatus gives the length of a file, the path, whether it's a dir, etc.
2015-07-22 11:04 GMT+02:00 Flavio Pompermaier :
> Ok. What I still not able to do is to recursively remove empty dirs from
> the source dir because there's no API for getChild
Ok. What I still not able to do is to recursively remove empty dirs from
the source dir because there's no API for getChildrenCount() or
getChildren() for a given Path.
How can I do that?
On Tue, Jul 21, 2015 at 3:13 PM, Stephan Ewen wrote:
> I don't think there is a simpler way to do this.
>
>
I don't think there is a simpler way to do this.
Flink follows the semantics of the Hadoop's HDFS file system there, which
behaves that way, and the Java File class.
But it seems your solution is working, even if it needs a few extra lines
of code.
On Fri, Jul 17, 2015 at 11:17 AM, Flavio Pomper
Of course I move the folder before the job starts or ends :)
My job does some transformation on the row data and put the results in
another folder.
The next time the job is executed checks whether the output folder exists
and, if so, it moves such folder to an archive dir.
I wanted to use the Flink
Do you want to move the folder within a running job? This might cause a lot of
problems, because you cannot (easily) control when a move command would be
executed.
Wouldn’t it be a better idea to do that after a job is finished and use the
regular HDFS client?
From: Flavio Pompermaier
Se
Hi to all,
in my Flink job I wanted to move a folder (containing other folders and
files) to another location.
For example, I wanted to move folder A to folder Y, where my HDFS looks
like:
myRootDir/X/a/aa/aaa/someFile1
myRootDir/X/b/bb/bbb/someFile2
myRootDir/Y
I tried to use rename but it sile