org.apache.falcon.entity
Class FileSystemStorage

java.lang.Object
  extended by org.apache.falcon.entity.FileSystemStorage
All Implemented Interfaces:
Storage

public class FileSystemStorage
extends Object
implements Storage

A file system implementation of a feed storage.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.falcon.entity.Storage
Storage.TYPE
 
Field Summary
static String FEED_PATH_SEP
           
static String FILE_SYSTEM_URL
           
static String LOCATION_TYPE_SEP
           
 
Fields inherited from interface org.apache.falcon.entity.Storage
DOLLAR_EXPR_START_NORMALIZED, DOLLAR_EXPR_START_REGEX, EXPR_CLOSE_NORMALIZED, EXPR_CLOSE_REGEX, QUESTION_EXPR_START_REGEX
 
Constructor Summary
protected FileSystemStorage(org.apache.falcon.entity.v0.feed.Feed feed)
           
protected FileSystemStorage(String uriTemplate)
          Create an instance from the URI Template that was generated using the getUriTemplate() method.
protected FileSystemStorage(String storageUrl, List<org.apache.falcon.entity.v0.feed.Location> locations)
           
protected FileSystemStorage(String storageUrl, org.apache.falcon.entity.v0.feed.Locations locations)
           
 
Method Summary
 boolean exists()
          Check if the storage, filesystem location or catalog table exists.
 List<org.apache.falcon.entity.v0.feed.Location> getLocations()
           
 String getStorageUrl()
           
 Storage.TYPE getType()
          Return the type of storage.
 String getUriTemplate()
          Return the uri template.
 String getUriTemplate(org.apache.falcon.entity.v0.feed.LocationType locationType)
          Return the uri template for a given location type.
 boolean isIdentical(Storage toCompareAgainst)
          Check for equality of this instance against the one in question.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FEED_PATH_SEP

public static final String FEED_PATH_SEP
See Also:
Constant Field Values

LOCATION_TYPE_SEP

public static final String LOCATION_TYPE_SEP
See Also:
Constant Field Values

FILE_SYSTEM_URL

public static final String FILE_SYSTEM_URL
See Also:
Constant Field Values
Constructor Detail

FileSystemStorage

protected FileSystemStorage(org.apache.falcon.entity.v0.feed.Feed feed)

FileSystemStorage

protected FileSystemStorage(String storageUrl,
                            org.apache.falcon.entity.v0.feed.Locations locations)

FileSystemStorage

protected FileSystemStorage(String storageUrl,
                            List<org.apache.falcon.entity.v0.feed.Location> locations)

FileSystemStorage

protected FileSystemStorage(String uriTemplate)
                     throws URISyntaxException
Create an instance from the URI Template that was generated using the getUriTemplate() method.

Parameters:
uriTemplate - the uri template from org.apache.falcon.entity.FileSystemStorage#getUriTemplate
Throws:
URISyntaxException
Method Detail

getType

public Storage.TYPE getType()
Description copied from interface: Storage
Return the type of storage.

Specified by:
getType in interface Storage
Returns:
storage type

getStorageUrl

public String getStorageUrl()

getLocations

public List<org.apache.falcon.entity.v0.feed.Location> getLocations()

getUriTemplate

public String getUriTemplate()
Description copied from interface: Storage
Return the uri template.

Specified by:
getUriTemplate in interface Storage
Returns:
uri template

getUriTemplate

public String getUriTemplate(org.apache.falcon.entity.v0.feed.LocationType locationType)
Description copied from interface: Storage
Return the uri template for a given location type.

Specified by:
getUriTemplate in interface Storage
Parameters:
locationType - type of location, applies only to filesystem type
Returns:
uri template

exists

public boolean exists()
               throws FalconException
Description copied from interface: Storage
Check if the storage, filesystem location or catalog table exists. Filesystem location always returns true.

Specified by:
exists in interface Storage
Returns:
true if table exists else false
Throws:
FalconException - an exception

isIdentical

public boolean isIdentical(Storage toCompareAgainst)
                    throws FalconException
Description copied from interface: Storage
Check for equality of this instance against the one in question.

Specified by:
isIdentical in interface Storage
Parameters:
toCompareAgainst - instance to compare
Returns:
true if identical else false
Throws:
FalconException - an exception

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013-2014 Apache Software Foundation. All Rights Reserved.