com.bigdata.relation
Class RelationFusedView<E>

java.lang.Object
  extended by com.bigdata.relation.RelationFusedView<E>
Type Parameters:
E -
All Implemented Interfaces:
IRelation<E>, ILocatableResource<IRelation<E>>

Deprecated. by BOps using the UNION of JOINs. However, also note that this is only used for TM and that the focus store is always local for TM.

public class RelationFusedView<E>
extends Object
implements IRelation<E>

A factory for fused views reading from both of the source IRelations.

Version:
$Id: RelationFusedView.java 3730 2010-10-05 19:57:25Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
RelationFusedView(IRelation<E> relation1, IRelation<E> relation2)
          Deprecated.  
 
Method Summary
 IAccessPath<E> getAccessPath(IIndexManager localIndexManagerIsIgnored, IKeyOrder<E> keyOrderisIgnored, IPredicate<E> predicate)
          Deprecated. Return the IAccessPath for an IRelation using the specified IIndexManager and IKeyOrder (core impl).
 IAccessPath<E> getAccessPath(IKeyOrder<E> keyOrderIsIgnored, IPredicate<E> predicate)
          Deprecated. Return the IAccessPath for an IRelation using the specified IKeyOrder.
 IAccessPath<E> getAccessPath(IPredicate<E> predicate)
          Deprecated. Return the best IAccessPath for a relation given a predicate with zero or more unbound variables.
 String getContainerNamespace()
          Deprecated. Not implemented for a fused view.
 Class<E> getElementClass()
          Deprecated. Return the class for the generic type of this relation.
 ExecutorService getExecutorService()
          Deprecated. The service used to run asynchronous or parallel tasks for the IRelation.
 String getFQN(IKeyOrder<? extends E> keyOrder)
          Deprecated. The fully qualified name of the index.
 IIndex getIndex(IKeyOrder<? extends E> keyOrder)
          Deprecated. Return the index for associated with the specified IKeyOrder this view of the relation.
 IIndexManager getIndexManager()
          Deprecated. The IIndexManager for the first relation in the view.
 Set<String> getIndexNames()
          Deprecated. Return the fully qualified name of each index maintained by this relation.
 IKeyOrder<E> getKeyOrder(IPredicate<E> predicate)
          Deprecated. Return the IKeyOrder for the predicate corresponding to the perfect access path.
 Iterator<IKeyOrder<E>> getKeyOrders()
          Deprecated. Return the IKeyOrders corresponding to the registered indices for this relation.
 String getNamespace()
          Deprecated. Not implemented for a fused view.
 IKeyOrder<E> getPrimaryKeyOrder()
          Deprecated. The value for the first relation in the view.
 IRelation<E> getRelation1()
          Deprecated.  
 IRelation<E> getRelation2()
          Deprecated.  
 long getTimestamp()
          Deprecated. Not implemented for a fused view.
 RelationFusedView<E> init()
          Deprecated. Deferred initialization method is automatically invoked when the resource is materialized by the IResourceLocator.
 E newElement(List<BOp> a, IBindingSet bindingSet)
          Deprecated. Create and return a new element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationFusedView

public RelationFusedView(IRelation<E> relation1,
                         IRelation<E> relation2)
Deprecated. 
Parameters:
relation1 -
relation2 -
Method Detail

getRelation1

public IRelation<E> getRelation1()
Deprecated. 

getRelation2

public IRelation<E> getRelation2()
Deprecated. 

init

public RelationFusedView<E> init()
Deprecated. 
Description copied from interface: ILocatableResource
Deferred initialization method is automatically invoked when the resource is materialized by the IResourceLocator. The implementation is encouraged to strengthen the return type.

Specified by:
init in interface ILocatableResource<IRelation<E>>

getIndexNames

public Set<String> getIndexNames()
Deprecated. 
Description copied from interface: IRelation
Return the fully qualified name of each index maintained by this relation.

Specified by:
getIndexNames in interface IRelation<E>
Returns:
An immutable set of the index names for the relation.

getPrimaryKeyOrder

public IKeyOrder<E> getPrimaryKeyOrder()
Deprecated. 
The value for the first relation in the view.

Specified by:
getPrimaryKeyOrder in interface IRelation<E>

getKeyOrders

public Iterator<IKeyOrder<E>> getKeyOrders()
Deprecated. 
Description copied from interface: IRelation
Return the IKeyOrders corresponding to the registered indices for this relation. [rather than getIndexNames?]

Specified by:
getKeyOrders in interface IRelation<E>

getExecutorService

public ExecutorService getExecutorService()
Deprecated. 
Description copied from interface: IRelation
The service used to run asynchronous or parallel tasks for the IRelation.

Specified by:
getExecutorService in interface IRelation<E>

newElement

public E newElement(List<BOp> a,
                    IBindingSet bindingSet)
Deprecated. 
Description copied from interface: IRelation
Create and return a new element. The element is constructed from the ordered list of variables and constants. Variables are replaced using the given the bindings. The element is NOT inserted into the relation.

Specified by:
newElement in interface IRelation<E>
Parameters:
a - An ordered list of variables and/or constants.
bindingSet - A set of bindings.
Returns:
The new element.

getElementClass

public Class<E> getElementClass()
Deprecated. 
Description copied from interface: IRelation
Return the class for the generic type of this relation. This information is used to dynamically create arrays of that generic type.

Specified by:
getElementClass in interface IRelation<E>

getIndexManager

public IIndexManager getIndexManager()
Deprecated. 
The IIndexManager for the first relation in the view.

Specified by:
getIndexManager in interface IRelation<E>

getTimestamp

public long getTimestamp()
Deprecated. 
Not implemented for a fused view. (The elements of the view can have different timestamps - this is especially true when one is a TemporaryStore.)

Specified by:
getTimestamp in interface ILocatableResource<IRelation<E>>
Throws:
UnsupportedOperationException - always.

getNamespace

public String getNamespace()
Deprecated. 
Not implemented for a fused view.

Specified by:
getNamespace in interface ILocatableResource<IRelation<E>>
Throws:
UnsupportedOperationException - always.

getContainerNamespace

public String getContainerNamespace()
Deprecated. 
Not implemented for a fused view.

Specified by:
getContainerNamespace in interface ILocatableResource<IRelation<E>>
Returns:
The identifier of the containing resource -or- null if there is no containing resource.
Throws:
UnsupportedOperationException - always.

getFQN

public String getFQN(IKeyOrder<? extends E> keyOrder)
Deprecated. 
Description copied from interface: IRelation
The fully qualified name of the index.

Specified by:
getFQN in interface IRelation<E>
Parameters:
keyOrder - The natural index order.
Returns:
The index name.

getIndex

public IIndex getIndex(IKeyOrder<? extends E> keyOrder)
Deprecated. 
Description copied from interface: IRelation
Return the index for associated with the specified IKeyOrder this view of the relation.

Specified by:
getIndex in interface IRelation<E>
Parameters:
keyOrder - The natural index order.
Returns:
The index -or- null iff the index does not exist as of the timestamp for this view of the relation.
See Also:
#getIndex(String)

getKeyOrder

public IKeyOrder<E> getKeyOrder(IPredicate<E> predicate)
Deprecated. 
Description copied from interface: IRelation
Return the IKeyOrder for the predicate corresponding to the perfect access path. A perfect access path is one where the bound values in the predicate form a prefix in the key space of the corresponding index.

Specified by:
getKeyOrder in interface IRelation<E>
Returns:
The IKeyOrder for the perfect access path -or- null if there is no index which provides a perfect access path for that predicate.

getAccessPath

public IAccessPath<E> getAccessPath(IPredicate<E> predicate)
Deprecated. 
Description copied from interface: IRelation
Return the best IAccessPath for a relation given a predicate with zero or more unbound variables.

If there is an IIndex that directly corresponds to the natural order implied by the variable pattern on the predicate then the access path should use that index. Otherwise you should choose the best index given the constraints and make sure that the IAccessPath incorporates additional filters that will allow you to filter out the irrelevant ITuples during the scan - this is very important when the index is remote!

If there are any IElementFilters then the access path MUST incorporate those constraints such that only elements that satisfy the constraints may be visited.

Whether the constraints arise because of the lack of a perfect index for the access path or because they were explicitly specified for the IPredicate, those constraints should be translated into constraints imposed on the underlying ITupleIterator and sent with it to be evaluated local to the data.

Note: Filters should be specified when the IAccessPath is constructed so that they will be evaluated on the data service rather than materializing the elements and then filtering then. This can be accomplished by adding the filter as a constraint on the predicate when specifying the access path.

Specified by:
getAccessPath in interface IRelation<E>
Parameters:
predicate - The constraint on the elements to be visited.
Returns:
The best IAccessPath for that IPredicate.
See Also:
IRelation.getAccessPath(IKeyOrder, IPredicate)

getAccessPath

public IAccessPath<E> getAccessPath(IKeyOrder<E> keyOrderIsIgnored,
                                    IPredicate<E> predicate)
Deprecated. 
Description copied from interface: IRelation
Return the IAccessPath for an IRelation using the specified IKeyOrder.

Specified by:
getAccessPath in interface IRelation<E>
Parameters:
keyOrderIsIgnored - Identifies which index to use (required).
predicate - The predicate (required).
Returns:
The IAccessPath.
See Also:
IRelation.getAccessPath(IIndexManager, IKeyOrder, IPredicate)

getAccessPath

public IAccessPath<E> getAccessPath(IIndexManager localIndexManagerIsIgnored,
                                    IKeyOrder<E> keyOrderisIgnored,
                                    IPredicate<E> predicate)
Deprecated. 
Description copied from interface: IRelation
Return the IAccessPath for an IRelation using the specified IIndexManager and IKeyOrder (core impl).

Predicate annotations

Together, this method and AccessPath is responsible for interpreting the following IPredicate IPredicate#Annotations:

Access paths and a Standalone Database

There is only one IIndexManager when running against a standalone database. That IIndexManager is available from IRelation.getIndexManager().

Access Paths and Scale-Out Operators

Scale-out operators which are BOpEvaluationContext.SHARDED or BOpEvaluationContext.HASHED require access to the local index manager on the data service and signal this using:

In order to service a request for a local access path in scale-out, the caller MUST specify the localIndexManager.

Scale-out operators MAY use remote access paths and signal this using:

When a remote access path is required, the localIndexManager is ignored and IRelation.getIndexManager() is used to obtain the IBigdataFederation from which the IRelation definition was materialized.

Specified by:
getAccessPath in interface IRelation<E>
Parameters:
localIndexManagerIsIgnored - The local index manager (optional).
keyOrderisIgnored - Identifies which index to use (required).
predicate - The predicate (required).
Returns:
The IAccessPath.


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.