public interface ScanInfo
All times are in milliseconds and obtained using System.currentTimeMillis().
Modifier and Type | Interface and Description |
---|---|
static class |
ScanInfo.Type |
Modifier and Type | Method and 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 to
getIdleTimeStats() , 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() |
String |
getTableId() |
ScanInfo.Type getScanType()
String getTableId()
long getCreationTime()
OptionalLong getLastRunTime()
Stats getRunTimeStats()
Stats getIdleTimeStats()
Stats getIdleTimeStats(long currentTime)
getIdleTimeStats()
, 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 only currentTime - creationTime
.Set<Column> getFetchedColumns()
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);
}
Collection<IteratorConfiguration> getClientScanIterators()
Map<String,String> getExecutionHints()
ScannerBase.setExecutionHints(Map)
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.