org.apache.oozie.action.hadoop
Class FsELFunctions

java.lang.Object
  extended by org.apache.oozie.action.hadoop.FsELFunctions

public class FsELFunctions
extends Object

EL function for fs action executor.


Constructor Summary
FsELFunctions()
           
 
Method Summary
static long fs_blockSize(String pathUri)
          Return the file block size in bytes.
static long fs_dirSize(String pathUri)
          Return the size of all files in the directory, it is not recursive.
static boolean fs_exists(String pathUri)
          Return if a path exists.
static long fs_fileSize(String pathUri)
          Return the len of a file.
static boolean fs_isDir(String pathUri)
          Return if a path is a directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FsELFunctions

public FsELFunctions()
Method Detail

fs_exists

public static boolean fs_exists(String pathUri)
                         throws Exception
Return if a path exists.

Parameters:
pathUri - file system path uri.
Returns:
true if the path exists, false if it does not.
Throws:
Exception

fs_isDir

public static boolean fs_isDir(String pathUri)
                        throws Exception
Return if a path is a directory.

Parameters:
pathUri - fs path uri.
Returns:
true if the path exists and it is a directory, false otherwise.
Throws:
Exception

fs_fileSize

public static long fs_fileSize(String pathUri)
                        throws Exception
Return the len of a file.

Parameters:
pathUri - file system path uri.
Returns:
the file len in bytes, -1 if the file does not exist or if it is a directory.
Throws:
Exception

fs_dirSize

public static long fs_dirSize(String pathUri)
                       throws Exception
Return the size of all files in the directory, it is not recursive.

Parameters:
pathUri - file system path uri.
Returns:
the size of all files in the directory, -1 if the directory does not exist or if it is a file.
Throws:
Exception

fs_blockSize

public static long fs_blockSize(String pathUri)
                         throws Exception
Return the file block size in bytes.

Parameters:
pathUri - file system path uri.
Returns:
the block size of the file in bytes, -1 if the file does not exist or if it is a directory.
Throws:
Exception


Copyright © 2012 Apache Software Foundation. All Rights Reserved.