Class TabletsMetadata.Builder
- java.lang.Object
-
- org.apache.accumulo.core.metadata.schema.TabletsMetadata.Builder
-
- All Implemented Interfaces:
TabletsMetadata.Options
,TabletsMetadata.RangeOptions
,TabletsMetadata.TableOptions
,TabletsMetadata.TableRangeOptions
- Enclosing class:
- TabletsMetadata
public static class TabletsMetadata.Builder extends Object implements TabletsMetadata.TableRangeOptions, TabletsMetadata.TableOptions, TabletsMetadata.RangeOptions, TabletsMetadata.Options
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TabletsMetadata
build()
TabletsMetadata.Options
checkConsistency()
Checks that the metadata table forms a linked list and automatically backs up until it does.TabletsMetadata.Options
fetch(TabletMetadata.ColumnType... colsToFetch)
TabletsMetadata.Options
forLevel(Ample.DataLevel level)
Read all of the tablet metadata for this level.TabletsMetadata.TableRangeOptions
forTable(TableId tableId)
This method automatically determines where the metadata for the passed in table ID resides.TabletsMetadata.Options
forTablet(KeyExtent extent)
Get the tablet metadata for this extents end row.TabletsMetadata.Options
forTablets(Collection<KeyExtent> extents)
Get the tablet metadata for the given extents.TabletsMetadata.Options
overlapping(org.apache.hadoop.io.Text startRow, boolean startInclusive, org.apache.hadoop.io.Text endRow)
WhenstartRowInclusive
is true limits to tablets that overlap the range[startRow,endRow]
.TabletsMetadata.Options
overlapping(org.apache.hadoop.io.Text startRow, org.apache.hadoop.io.Text endRow)
Limit to tablets that overlap the range(startRow, endRow]
.TabletsMetadata.Options
overRange(Range range)
TabletsMetadata.Options
readConsistency(Ample.ReadConsistency readConsistency)
Controls how the data is read.TabletsMetadata.Options
saveKeyValues()
Saves the key values seen in the metadata table for each tablet.TabletsMetadata.RangeOptions
scanTable(String tableName)
Obtain tablet metadata by scanning an arbitrary table.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.accumulo.core.metadata.schema.TabletsMetadata.TableOptions
scanMetadataTable
-
Methods inherited from interface org.apache.accumulo.core.metadata.schema.TabletsMetadata.TableRangeOptions
overlapping
-
-
-
-
Method Detail
-
build
public TabletsMetadata build()
- Specified by:
build
in interfaceTabletsMetadata.Options
-
checkConsistency
public TabletsMetadata.Options checkConsistency()
Description copied from interface:TabletsMetadata.Options
Checks that the metadata table forms a linked list and automatically backs up until it does.- Specified by:
checkConsistency
in interfaceTabletsMetadata.Options
-
fetch
public TabletsMetadata.Options fetch(TabletMetadata.ColumnType... colsToFetch)
- Specified by:
fetch
in interfaceTabletsMetadata.Options
-
forLevel
public TabletsMetadata.Options forLevel(Ample.DataLevel level)
Description copied from interface:TabletsMetadata.TableOptions
Read all of the tablet metadata for this level.- Specified by:
forLevel
in interfaceTabletsMetadata.TableOptions
-
forTable
public TabletsMetadata.TableRangeOptions forTable(TableId tableId)
Description copied from interface:TabletsMetadata.TableOptions
This method automatically determines where the metadata for the passed in table ID resides. For example if a user tablet ID is passed in, then the metadata table is scanned. If the metadata table ID is passed in then the root table is scanned. Defaults to returning all tablets for the table ID.- Specified by:
forTable
in interfaceTabletsMetadata.TableOptions
-
forTablet
public TabletsMetadata.Options forTablet(KeyExtent extent)
Description copied from interface:TabletsMetadata.TableOptions
Get the tablet metadata for this extents end row. This should only ever return a single tablet where the end row and prev end row exactly match the given extent.- Specified by:
forTablet
in interfaceTabletsMetadata.TableOptions
-
forTablets
public TabletsMetadata.Options forTablets(Collection<KeyExtent> extents)
Description copied from interface:TabletsMetadata.TableOptions
Get the tablet metadata for the given extents. This will only return tablets where the end row and prev end row exactly match the given extents.- Specified by:
forTablets
in interfaceTabletsMetadata.TableOptions
-
overRange
public TabletsMetadata.Options overRange(Range range)
- Specified by:
overRange
in interfaceTabletsMetadata.RangeOptions
-
overlapping
public TabletsMetadata.Options overlapping(org.apache.hadoop.io.Text startRow, boolean startInclusive, org.apache.hadoop.io.Text endRow)
Description copied from interface:TabletsMetadata.TableRangeOptions
WhenstartRowInclusive
is true limits to tablets that overlap the range[startRow,endRow]
. WhenstartRowInclusive
is false limits to tablets that overlap the range(startRow, endRow]
. Can pass null for start and end row representing -inf and +inf.- Specified by:
overlapping
in interfaceTabletsMetadata.TableRangeOptions
-
overlapping
public TabletsMetadata.Options overlapping(org.apache.hadoop.io.Text startRow, org.apache.hadoop.io.Text endRow)
Description copied from interface:TabletsMetadata.TableRangeOptions
Limit to tablets that overlap the range(startRow, endRow]
. Can pass null representing -inf and +inf. The impl creates open ended ranges which may be problematic, see #813.This method is equivalent to calling
TabletsMetadata.TableRangeOptions.overlapping(Text, boolean, Text)
asoverlapping(startRow, false, endRow)
- Specified by:
overlapping
in interfaceTabletsMetadata.TableRangeOptions
-
saveKeyValues
public TabletsMetadata.Options saveKeyValues()
Description copied from interface:TabletsMetadata.Options
Saves the key values seen in the metadata table for each tablet.- Specified by:
saveKeyValues
in interfaceTabletsMetadata.Options
-
scanTable
public TabletsMetadata.RangeOptions scanTable(String tableName)
Description copied from interface:TabletsMetadata.TableOptions
Obtain tablet metadata by scanning an arbitrary table. Defaults to the rangeMetadataSchema.TabletsSection.getRange()
- Specified by:
scanTable
in interfaceTabletsMetadata.TableOptions
-
readConsistency
public TabletsMetadata.Options readConsistency(Ample.ReadConsistency readConsistency)
Description copied from interface:TabletsMetadata.Options
Controls how the data is read. If not, set then the default isAmple.ReadConsistency.IMMEDIATE
- Specified by:
readConsistency
in interfaceTabletsMetadata.Options
-
-