Interface ScanInfo
-
public interface ScanInfo
Provides information about an active Accumulo scan against a tablet. Accumulo scans operate by repeatedly gathering batches of data and returning those to the client.All times are in milliseconds and obtained using System.currentTimeMillis().
- Since:
- 2.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ScanInfo.Type
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<IteratorConfiguration>
getClientScanIterators()
long
getCreationTime()
Returns the first time a tablet knew about a scan over its portion of data.Map<String,String>
getExecutionHints()
Set<Column>
getFetchedColumns()
This method returns what column were fetched by a scan.Stats
getIdleTimeStats()
Returns statistics about the time between running.Stats
getIdleTimeStats(long currentTime)
This method is similar togetIdleTimeStats()
, but it also includes the time period between the last run time and now in the stats.OptionalLong
getLastRunTime()
If the scan has run, returns the last run time.Stats
getRunTimeStats()
Returns timing statistics about running and gathering a batches of data.ScanInfo.Type
getScanType()
TableId
getTableId()
-
-
-
Method Detail
-
getScanType
ScanInfo.Type getScanType()
-
getTableId
TableId getTableId()
-
getCreationTime
long getCreationTime()
Returns the first time a tablet knew about a scan over its portion of data. This is the time a scan session was created inside a tablet server. If the scan goes across multiple tablet servers then within each tablet server there will be a different creation time.
-
getLastRunTime
OptionalLong getLastRunTime()
If the scan has run, returns the last run time.
-
getRunTimeStats
Stats getRunTimeStats()
Returns timing statistics about running and gathering a batches of data.
-
getIdleTimeStats
Stats getIdleTimeStats()
Returns statistics about the time between running. These stats are only about the idle times before the last run time. The idle time after the last run time are not included. If the scan has never run, then there are no stats.
-
getIdleTimeStats
Stats getIdleTimeStats(long currentTime)
This method is similar togetIdleTimeStats()
, but it also includes the time period between the last run time and now in the stats. If the scan has never run, then the stats are computed using onlycurrentTime - creationTime
.
-
getFetchedColumns
Set<Column> getFetchedColumns()
This method returns what column were fetched by a scan. When a family is fetched, a Column object where everything but the family is null is in the set.The following example code shows how this method can be used to check if a family was fetched or a family+qualifier was fetched. If continually checking for the same column, should probably create a constant.
boolean wasFamilyFetched(ScanInfo si, byte[] fam) { Column family = new Column(fam, null, null); return si.getFetchedColumns().contains(family); } boolean wasColumnFetched(ScanInfo si, byte[] fam, byte[] qual) { Column col = new Column(fam, qual, null); return si.getFetchedColumns().contains(col); }
- Returns:
- The family and family+qualifier pairs fetched.
-
getClientScanIterators
Collection<IteratorConfiguration> getClientScanIterators()
- Returns:
- iterators that where configured on the client side scanner
-
getExecutionHints
Map<String,String> getExecutionHints()
- Returns:
- Hints set by a scanner using
ScannerBase.setExecutionHints(Map)
-
-