org.apache.falcon.entity
Interface Storage

All Known Implementing Classes:
CatalogStorage, FileSystemStorage

public interface Storage

A class to encapsulate the storage for a given feed which can either be expressed as a path on the file system or a table in a catalog.


Nested Class Summary
static class Storage.TYPE
          Enumeration for the various storage types.
 
Field Summary
static String DOLLAR_EXPR_START_NORMALIZED
          URI Friendly expression.
static String DOLLAR_EXPR_START_REGEX
           
static String EXPR_CLOSE_NORMALIZED
           
static String EXPR_CLOSE_REGEX
           
static String QUESTION_EXPR_START_REGEX
           
 
Method Summary
 boolean exists()
          Check if the storage, filesystem location or catalog table exists.
 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.
 

Field Detail

DOLLAR_EXPR_START_REGEX

static final String DOLLAR_EXPR_START_REGEX
See Also:
Constant Field Values

QUESTION_EXPR_START_REGEX

static final String QUESTION_EXPR_START_REGEX
See Also:
Constant Field Values

EXPR_CLOSE_REGEX

static final String EXPR_CLOSE_REGEX
See Also:
Constant Field Values

DOLLAR_EXPR_START_NORMALIZED

static final String DOLLAR_EXPR_START_NORMALIZED
URI Friendly expression.

See Also:
Constant Field Values

EXPR_CLOSE_NORMALIZED

static final String EXPR_CLOSE_NORMALIZED
See Also:
Constant Field Values
Method Detail

getType

Storage.TYPE getType()
Return the type of storage.

Returns:
storage type

getUriTemplate

String getUriTemplate()
Return the uri template.

Returns:
uri template

getUriTemplate

String getUriTemplate(org.apache.falcon.entity.v0.feed.LocationType locationType)
Return the uri template for a given location type.

Parameters:
locationType - type of location, applies only to filesystem type
Returns:
uri template

exists

boolean exists()
               throws FalconException
Check if the storage, filesystem location or catalog table exists. Filesystem location always returns true.

Returns:
true if table exists else false
Throws:
FalconException - an exception

isIdentical

boolean isIdentical(Storage toCompareAgainst)
                    throws FalconException
Check for equality of this instance against the one in question.

Parameters:
toCompareAgainst - instance to compare
Returns:
true if identical else false
Throws:
FalconException - an exception


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