|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.farrago.plugin.FarragoAbstractPluginBase
net.sf.farrago.namespace.impl.MedAbstractBase
net.sf.farrago.namespace.impl.MedAbstractDataServer
net.sf.farrago.namespace.mock.MedMockDataServer
net.sf.farrago.namespace.mock.MedMockLocalDataServer
class MedMockLocalDataServer
MedMockLocalDataServer provides a mock implementation of the FarragoMedLocalDataServer interface.
| Field Summary |
|---|
| Fields inherited from class net.sf.farrago.namespace.mock.MedMockDataServer |
|---|
DEFAULT_EXTRACT_COLUMNS, extractColumns, PROP_EXECUTOR_IMPL, PROP_EXTRACT_COLUMNS, PROP_ROW_COUNT, PROP_ROW_COUNT_SQL, PROP_SCHEMA_NAME, PROP_SIMULATE_BAD, PROP_TABLE_NAME, PROP_UDX_SPECIFIC_NAME, PROPVAL_FENNEL, PROPVAL_JAVA |
| Fields inherited from class net.sf.farrago.plugin.FarragoAbstractPluginBase |
|---|
BOOLEAN_CHOICES_DEFAULT_FALSE, BOOLEAN_CHOICES_DEFAULT_TRUE, EMPTY_DRIVER_PROPERTIES |
| Fields inherited from interface net.sf.farrago.namespace.FarragoMedDataServer |
|---|
PROP_SERVER_NAME, PROP_SERVER_TYPE, PROP_SERVER_VERSION |
| Constructor Summary | |
|---|---|
MedMockLocalDataServer(MedAbstractDataWrapper wrapper,
String serverMofId,
Properties props)
|
|
| Method Summary | |
|---|---|
FarragoMedLocalIndexStats |
computeIndexStats(FemLocalIndex index,
long rootPageId,
boolean estimate,
FennelTxnContext txnContext)
Verifies an index and returns its page count. |
RelNode |
constructIndexBuildPlan(RelOptTable table,
FemLocalIndex index,
RelOptCluster cluster)
Creates a plan for loading existing rows of a table into an index. |
long |
createIndex(FemLocalIndex index,
FennelTxnContext txnContext)
Creates an index. |
void |
dropIndex(FemLocalIndex index,
long rootPageId,
boolean truncate,
FennelTxnContext txnContext)
Drops or truncates an index. |
FarragoMedColumnSet |
newColumnSet(String[] localName,
Properties tableProps,
FarragoTypeFactory typeFactory,
RelDataType rowType,
Map<String,Properties> columnPropMap)
Creates an instance of a FarragoMedColumnSet corresponding to row data identified by properties rather than container name. |
void |
registerRules(RelOptPlanner planner)
Gives this wrapper a chance to register any special optimization rules. |
void |
setFennelDbHandle(FennelDbHandle fennelDbHandle)
Sets the Fennel database handle to use for accessing local storage. |
boolean |
supportsAlterTableAddColumn()
Checks whether ALTER TABLE ADD COLUMN is implemented for tables stored by this local data server. |
void |
validateTableDefinition(FemLocalTable table,
FemLocalIndex generatedPrimaryKeyIndex)
Validates the definition of a table being created. |
void |
validateTableDefinition(FemLocalTable table,
FemLocalIndex generatedPrimaryKeyIndex,
boolean creation)
Validates the definition of a table being created. |
void |
versionIndexRoot(Long oldRoot,
Long newRoot,
FennelTxnContext txnContext)
Versions the root page of an index |
| Methods inherited from class net.sf.farrago.namespace.mock.MedMockDataServer |
|---|
closeAllocation, createMockColumnType, createMockRowType, getForeignSchemaName, getForeignTableName, getNameDirectory, getRuntimeSupport, getWrapper, initialize |
| Methods inherited from class net.sf.farrago.namespace.impl.MedAbstractDataServer |
|---|
getLoopbackDataSource, getProperties, getServerMofId, registerRelMetadataProviders, releaseResources, setLoopbackDataSource |
| Methods inherited from class net.sf.farrago.plugin.FarragoAbstractPluginBase |
|---|
getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getShortProperty, requireProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.farrago.namespace.FarragoMedDataServer |
|---|
getNameDirectory, getRuntimeSupport, registerRelMetadataProviders, releaseResources, setLoopbackDataSource |
| Methods inherited from interface org.eigenbase.util.ClosableAllocation |
|---|
closeAllocation |
| Constructor Detail |
|---|
MedMockLocalDataServer(MedAbstractDataWrapper wrapper,
String serverMofId,
Properties props)
| Method Detail |
|---|
public void setFennelDbHandle(FennelDbHandle fennelDbHandle)
FarragoMedLocalDataServer
setFennelDbHandle in interface FarragoMedLocalDataServerfennelDbHandle - the handle to use
public void validateTableDefinition(FemLocalTable table,
FemLocalIndex generatedPrimaryKeyIndex)
throws SQLException
FarragoMedLocalDataServer
validateTableDefinition in interface FarragoMedLocalDataServertable - definition of the table being createdgeneratedPrimaryKeyIndex - if non-null, a reference to an index
generated by the system to enforce the primary key
SQLException
public void validateTableDefinition(FemLocalTable table,
FemLocalIndex generatedPrimaryKeyIndex,
boolean creation)
throws SQLException
FarragoMedLocalDataServer
validateTableDefinition in interface FarragoMedLocalDataServertable - definition of the table being createdgeneratedPrimaryKeyIndex - if non-null, a reference to an index
generated by the system to enforce the primary keycreation - true if the table being validated is being newly created
SQLException
public long createIndex(FemLocalIndex index,
FennelTxnContext txnContext)
throws SQLException
FarragoMedLocalDataServer
createIndex in interface FarragoMedLocalDataServerindex - definition of the index to createtxnContext - Fennel txn context
SQLException
public void dropIndex(FemLocalIndex index,
long rootPageId,
boolean truncate,
FennelTxnContext txnContext)
throws SQLException
FarragoMedLocalDataServer
dropIndex in interface FarragoMedLocalDataServerindex - definition of the index to droprootPageId - root PageId of indextruncate - if true, only truncate storage; if false, drop storage
entirelytxnContext - Fennel txn context
SQLException
public FarragoMedLocalIndexStats computeIndexStats(FemLocalIndex index,
long rootPageId,
boolean estimate,
FennelTxnContext txnContext)
throws SQLException
FarragoMedLocalDataServer
computeIndexStats in interface FarragoMedLocalDataServerindex - definition of the index to verifyrootPageId - root PageId of indexestimate - whether to estimate statistics for a quicker result (and
at the cost of no unique key count)txnContext - Fennel txn context
SQLExceptionpublic void registerRules(RelOptPlanner planner)
FarragoMedDataServer
registerRules in interface FarragoMedDataServerregisterRules in class MedMockDataServerplanner - the planner in which the rules should be registered
public FarragoMedColumnSet newColumnSet(String[] localName,
Properties tableProps,
FarragoTypeFactory typeFactory,
RelDataType rowType,
Map<String,Properties> columnPropMap)
throws SQLException
FarragoMedDataServer
newColumnSet in interface FarragoMedDataServernewColumnSet in class MedMockDataServerlocalName - the qualified name to assign to the column set within
Farrago; this should NOT be used for finding the actual data, since it
can be set arbitrarily by the caller; instead, it should be used to
implement the RelOptTable.getQualifiedName() method, and can be useful
for correlation during debuggingtableProps - properties to use for data location and accesstypeFactory - FarragoTypeFactory to use for defining typesrowType - type to impose on the rows of this column set (including
column names and types), or null to infer row type; if this is non-null,
it must be saved for use by the getRowType() returned from
FarragoMedColumnSetcolumnPropMap - map from column name to column-specific Properties;
this is optional and may only be specified when rowType is also specified
(the field names in rowType are used as the keys for columnPropMap)
SQLException - if data access is unsuccessful
public RelNode constructIndexBuildPlan(RelOptTable table,
FemLocalIndex index,
RelOptCluster cluster)
FarragoMedLocalDataServerFarragoIndexBuilderRel, and this plugin will supply
a rule which transforms that into a corresponding physical rel for
writing to the index. Where possible, the returned plan should consist of
logical rels, increasing optimization potential.
constructIndexBuildPlan in interface FarragoMedLocalDataServertable - the optimizer representation for the indexed tableindex - the index to be loadedcluster - container for newly created relational expressions
public void versionIndexRoot(Long oldRoot,
Long newRoot,
FennelTxnContext txnContext)
throws SQLException
FarragoMedLocalDataServer
versionIndexRoot in interface FarragoMedLocalDataServeroldRoot - original root pagenewRoot - new versioned, root pagetxnContext - Fennel txn context
SQLExceptionpublic boolean supportsAlterTableAddColumn()
FarragoMedLocalDataServer
supportsAlterTableAddColumn in interface FarragoMedLocalDataServer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||