public class CarbonAnalyticsAPI extends Object implements AnalyticsDataAPI
| Constructor and Description |
|---|
CarbonAnalyticsAPI() |
CarbonAnalyticsAPI(String configFilePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearIndexData(int tenantId,
String tableName)
Clears the index data of the table.
|
void |
clearIndexData(String username,
String tableName)
Clears the index data of the table.
|
void |
createTable(int tenantId,
String tableName)
The primary record store is used
to create the table.
|
void |
createTable(int tenantId,
String recordStoreName,
String tableName)
Creates a table, if not already there in the given record store, or else, it will re-create the table in the given record store,
and also, the columns are not defined here, but can contain any arbitrary number of columns when data is added.
|
void |
createTable(String username,
String tableName)
Creates a table, if not already there, where the columns are not defined here, but can contain any arbitrary number
of columns when data is added.
|
void |
createTable(String username,
String recordStoreName,
String tableName)
Creates a table, if not already there, where the columns are not defined here, but can contain any arbitrary number
of columns when data is added.
|
void |
createTableIfNotExists(int tenantId,
String recordStoreName,
String tableName)
Creates the table if it does not already exist in the system.
|
void |
createTableIfNotExists(String username,
String recordStoreName,
String tableName)
Creates the table if it does not already exist in the system.
|
void |
delete(int tenantId,
String tableName,
List<String> ids)
Delete data in a table with given ids.
|
void |
delete(int tenantId,
String tableName,
long timeFrom,
long timeTo)
Deletes a set of records in the table.
|
void |
delete(String username,
String tableName,
List<String> ids)
Delete data in a table with given ids.
|
void |
delete(String username,
String tableName,
long timeFrom,
long timeTo)
Deletes a set of records in the table.
|
void |
deleteTable(int tenantId,
String tableName)
Deletes the table with the given category and name if a table exists already.
|
void |
deleteTable(String username,
String tableName)
Deletes the table with the given category and name if a table exists already.
|
void |
destroy()
Destroys and frees any resources taken up by the analytics data service implementation.
|
org.wso2.carbon.analytics.dataservice.commons.SubCategories |
drillDownCategories(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.CategoryDrillDownRequest drillDownRequest)
Returns the subcategories of a facet field, given
CategoryDrillDownRequest |
org.wso2.carbon.analytics.dataservice.commons.SubCategories |
drillDownCategories(String username,
org.wso2.carbon.analytics.dataservice.commons.CategoryDrillDownRequest drillDownRequest)
Returns the subcategories of a facet field, given
CategoryDrillDownRequest |
List<org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRange> |
drillDownRangeCount(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest)
Returns a list of range buckets of a specific field with the total score for each bucket.
|
List<org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRange> |
drillDownRangeCount(String username,
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest)
Returns a list of range buckets of a specific field with the total score for each bucket.
|
List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> |
drillDownSearch(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest)
Returns the drill down results of a search query, given
AnalyticsDrillDownRequest |
List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> |
drillDownSearch(String username,
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest)
Returns the drill down results of a search query, given
AnalyticsDrillDownRequest |
double |
drillDownSearchCount(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest)
Returns the count of results of a search query, given
AnalyticsDrillDownRequest |
double |
drillDownSearchCount(String username,
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest)
Returns the count of results of a search query, given
AnalyticsDrillDownRequest |
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse |
get(int tenantId,
String tableName,
int numPartitionsHint,
List<String> columns,
List<String> ids)
Retrieves data from a table with given ids.
|
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse |
get(int tenantId,
String tableName,
int numPartitionsHint,
List<String> columns,
long timeFrom,
long timeTo,
int recordsFrom,
int recordsCount)
Retrieves data from a table, with a given range.
|
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse |
get(String username,
String tableName,
int numPartitionsHint,
List<String> columns,
List<String> ids)
Retrieves data from a table with given ids.
|
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse |
get(String username,
String tableName,
int numPartitionsHint,
List<String> columns,
long timeFrom,
long timeTo,
int recordsFrom,
int recordsCount)
Retrieves data from a table, with a given range.
|
long |
getRecordCount(int tenantId,
String tableName,
long timeFrom,
long timeTo)
sear
Returns the number of records in the table with the given category and name.
|
long |
getRecordCount(String username,
String tableName,
long timeFrom,
long timeTo)
Returns the number of records in the table with the given category and name.
|
String |
getRecordStoreNameByTable(int tenantId,
String tableName)
Returns the record store name given the table information.
|
String |
getRecordStoreNameByTable(String username,
String tableName)
Returns the record store name given the table information.
|
org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema |
getTableSchema(int tenantId,
String tableName)
Retrieves the table schema for the given table.
|
org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema |
getTableSchema(String username,
String tableName)
Retrieves the table schema for the given table.
|
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse |
getWithKeyValues(int tenantId,
String tableName,
int numPartitionsHint,
List<String> columns,
List<Map<String,Object>> valuesBatch)
Retrieves data from a table with the values for all the given primary key value composites.
|
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse |
getWithKeyValues(String username,
String tableName,
int numPartitionsHint,
List<String> columns,
List<Map<String,Object>> valuesBatch)
Retrieves data from a table with the values for all the given primary key value composites.
|
boolean |
isPaginationSupported(String recordStoreName)
Checks whether or not pagination (i.e.
|
boolean |
isRecordCountSupported(String recordStoreName)
Checks whether or not record count operation is supported by the given record store implementation.
|
List<String> |
listRecordStoreNames()
Lists all the record stores available in the system.
|
List<String> |
listTables(int tenantId)
Lists all the current tables with the given category.
|
List<String> |
listTables(String username)
Lists all the current tables with the given category.
|
void |
put(List<org.wso2.carbon.analytics.datasource.commons.Record> records)
Adds a new record to the table.
|
void |
put(String username,
List<org.wso2.carbon.analytics.datasource.commons.Record> records)
Adds a new record to the table.
|
org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record> |
readRecords(String recordStoreName,
org.wso2.carbon.analytics.datasource.commons.RecordGroup recordGroup)
Reads in the records from a given record group at a given record store, the records will be streamed in.
|
void |
reIndex(int tenantId,
String tableName,
long startTime,
long endTime)
Given the start time and end time, this method will re-index the records of a table.
|
void |
reIndex(String username,
String tableName,
long startTime,
long endTime)
Given the start time and end time, this method will re-index the records of a table.
|
List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> |
search(int tenantId,
String tableName,
String query,
int start,
int count)
Searches the data with a given search query.
|
List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> |
search(int tenantId,
String tableName,
String query,
int start,
int count,
List<org.wso2.carbon.analytics.dataservice.commons.SortByField> sortByFields)
Searches the data with a given search query with sorted by given fields.
|
List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> |
search(String username,
String tableName,
String query,
int start,
int count)
Searches the data with a given search query.
|
List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> |
search(String username,
String tableName,
String query,
int start,
int count,
List<org.wso2.carbon.analytics.dataservice.commons.SortByField> sortByFields)
Searches the data with a given search query.
|
int |
searchCount(int tenantId,
String tableName,
String query)
Returns the search count of results of a given search query.
|
int |
searchCount(String username,
String tableName,
String query)
Returns the search count of results of a given search query.
|
org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record> |
searchWithAggregates(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.AggregateRequest aggregateRequest)
Returns an iterator of records containing the aggregate values computed over the given fields map
, grouped by a predefined FACET field.
|
List<org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record>> |
searchWithAggregates(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.AggregateRequest[] aggregateRequests)
Returns an iterator of records containing the aggregate values computed over the given fields map
, grouped by a predefined FACET field for multiple tables.
|
org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record> |
searchWithAggregates(String username,
org.wso2.carbon.analytics.dataservice.commons.AggregateRequest aggregateRequest)
Returns a list of records containing the aggregate values computed over the given fields map
, grouped by a predefined FACET field.
|
List<org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record>> |
searchWithAggregates(String username,
org.wso2.carbon.analytics.dataservice.commons.AggregateRequest[] aggregateRequests)
Returns a list of records containing the aggregate values computed over the given fields map
, grouped by a predefined FACET field for multiple tables.
|
void |
setTableSchema(int tenantId,
String tableName,
org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema schema)
Sets the schema for the target analytics table, if there is already one assigned, it will be
overwritten.
|
void |
setTableSchema(String username,
String tableName,
org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema schema)
Sets the schema for the target analytics table, if there is already one assigned, it will be
overwritten.
|
boolean |
tableExists(int tenantId,
String tableName)
Checks if the specified table with the given category and name exists.
|
boolean |
tableExists(String username,
String tableName)
Checks if the specified table with the given category and name exists.
|
void |
waitForIndexing(int tenantId,
String tableName,
long maxWait)
This method waits until the current indexing operations for a specific table is done.
|
void |
waitForIndexing(long maxWait)
This method waits until the current indexing operations for the system is done.
|
void |
waitForIndexing(String username,
String tableName,
long maxWait)
This method waits until the current indexing operations for a specific table is done.
|
public CarbonAnalyticsAPI(String configFilePath)
public CarbonAnalyticsAPI()
public void createTable(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIcreateTable in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to be createdorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void createTable(int tenantId,
String recordStoreName,
String tableName)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIcreateTable in interface AnalyticsDataAPItenantId - The tenant which this table belongs torecordStoreName - The name of the target record store to store the table attableName - The name of the table to be createdorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void createTableIfNotExists(int tenantId,
String recordStoreName,
String tableName)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIcreateTableIfNotExists in interface AnalyticsDataAPItenantId - The tenant which this table belongs torecordStoreName - The name of the target record store to store the table attableName - The name of the table to be createdorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void clearIndexData(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIclearIndexData in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to clear the index data fromorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic void setTableSchema(int tenantId,
String tableName,
org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema schema)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsetTableSchema in interface AnalyticsDataAPItenantId - The tenant idtableName - The table nameschema - The schema to be applied to the tableorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema getTableSchema(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIgetTableSchema in interface AnalyticsDataAPItenantId - The tenant idtableName - The table nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic boolean tableExists(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPItableExists in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The table nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void deleteTable(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIdeleteTable in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to be droppedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic List<String> listTables(int tenantId) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIlistTables in interface AnalyticsDataAPItenantId - The tenant which this table belongs toorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic long getRecordCount(int tenantId,
String tableName,
long timeFrom,
long timeTo)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIgetRecordCount in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to get the count fromtimeFrom - The starting time to consider the count from, inclusive, relatively to epoch,
Long.MIN_VALUE should signal, this restriction to be disregardedtimeTo - The ending time to consider the count to, non-inclusive, relatively to epoch,
Long.MAX_VALUE should signal, this restriction to be disregardedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic void put(List<org.wso2.carbon.analytics.datasource.commons.Record> records) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIput in interface AnalyticsDataAPIrecords - The list of records to be insertedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse get(int tenantId,
String tableName,
int numPartitionsHint,
List<String> columns,
long timeFrom,
long timeTo,
int recordsFrom,
int recordsCount)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIget in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to search onnumPartitionsHint - The best effort number of splits this should returncolumns - The list of columns to required in results, null if all needs to be returnedtimeFrom - The starting time to get records from, inclusive, relatively to epoch,
Long.MIN_VALUE should signal, this restriction to be disregardedtimeTo - The ending time to get records to, non-inclusive, relatively to epoch,
Long.MAX_VALUE should signal, this restriction to be disregardedrecordsFrom - The paginated index from value, zero based, inclusiverecordsCount - The paginated records count to be read, -1 for infinityorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse get(int tenantId,
String tableName,
int numPartitionsHint,
List<String> columns,
List<String> ids)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIget in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to search onnumPartitionsHint - The best effort number of splits this should returncolumns - The list of columns to required in results, null if all needs to be returnedids - The list of ids of the records to be readorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic void createTable(String username, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIcreateTable in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to be createdorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void createTable(String username, String recordStoreName, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIcreateTable in interface AnalyticsDataAPIusername - The usernamerecordStoreName - The name of the target record store to store the table attableName - The name of the table to be createdorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void createTableIfNotExists(String username, String recordStoreName, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIcreateTableIfNotExists in interface AnalyticsDataAPIusername - The usernamerecordStoreName - The name of the target record store to store the table attableName - The name of the table to be createdorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void clearIndexData(String username, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIclearIndexData in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to clear the index data fromorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void setTableSchema(String username, String tableName, org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema schema) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsetTableSchema in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The table nameschema - The schema to be applied to the tableorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic org.wso2.carbon.analytics.datasource.commons.AnalyticsSchema getTableSchema(String username, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableException, org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIgetTableSchema in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The table nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic boolean tableExists(String username, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPItableExists in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The table nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void deleteTable(String username, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIdeleteTable in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to be droppedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic List<String> listTables(String username) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIlistTables in interface AnalyticsDataAPIusername - The username of the user that invoke this methodorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic long getRecordCount(String username, String tableName, long timeFrom, long timeTo) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIgetRecordCount in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to get the count fromtimeFrom - The starting time to consider the count from, inclusive, relatively to epoch,
Long.MIN_VALUE should signal, this restriction to be disregardedtimeTo - The ending time to consider the count to, non-inclusive, relatively to epoch,
Long.MAX_VALUE should signal, this restriction to be disregardedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic void put(String username, List<org.wso2.carbon.analytics.datasource.commons.Record> records) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException, org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableException
AnalyticsDataAPIput in interface AnalyticsDataAPIusername - The username of the user that invoke this methodrecords - The list of records to be insertedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse get(String username, String tableName, int numPartitionsHint, List<String> columns, long timeFrom, long timeTo, int recordsFrom, int recordsCount) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIget in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to search onnumPartitionsHint - The best effort number of splits this should returncolumns - The list of columns to required in results, null if all needs to be returnedtimeFrom - The starting time to get records from, inclusive, relatively to epoch,
Long.MIN_VALUE should signal, this restriction to be disregardedtimeTo - The ending time to get records to, non-inclusive, relatively to epoch,
Long.MAX_VALUE should signal, this restriction to be disregardedrecordsFrom - The paginated index from value, zero based, inclusiverecordsCount - The paginated records count to be read, -1 for infinityorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse get(String username, String tableName, int numPartitionsHint, List<String> columns, List<String> ids) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIget in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to search onnumPartitionsHint - The best effort number of splits this should returncolumns - The list of columns to required in results, null if all needs to be returnedids - The list of ids of the records to be readorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse getWithKeyValues(String username, String tableName, int numPartitionsHint, List<String> columns, List<Map<String,Object>> valuesBatch) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException, org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableException
AnalyticsDataAPIgetWithKeyValues in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to search onnumPartitionsHint - The best effort number of splits this should returncolumns - The list of columns to required in results, null if all needs to be returnedvaluesBatch - A batch of key/values which contains the primary keys values to match the data in the tableorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic boolean isPaginationSupported(String recordStoreName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIisPaginationSupported in interface AnalyticsDataAPIrecordStoreName - The record store nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic boolean isRecordCountSupported(String recordStoreName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIisRecordCountSupported in interface AnalyticsDataAPIrecordStoreName - The record store nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void delete(String username, String tableName, long timeFrom, long timeTo) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIdelete in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to search ontimeFrom - The starting time to get records from for deletiontimeTo - The ending time to get records to for deletionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic void delete(String username, String tableName, List<String> ids) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIdelete in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The name of the table to search onids - The list of ids of the records to be deletedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> search(String username, String tableName, String query, int start, int count, List<org.wso2.carbon.analytics.dataservice.commons.SortByField> sortByFields) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException, org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearch in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The table namequery - The search querystart - The start location of the result, 0 basedcount - The maximum number of result entries to be returnedsortByFields - List of Fields by which the records needed to be sorted.SearchResultEntrysorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> search(String username, String tableName, String query, int start, int count) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearch in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The table namequery - The search querystart - The start location of the result, 0 basedcount - The maximum number of result entries to be returnedSearchResultEntrysorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic int searchCount(String username, String tableName, String query) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIsearchCount in interface AnalyticsDataAPIusername - The username of the user that invoke this methodtableName - The table namequery - The search queryorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> drillDownSearch(String username, org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIAnalyticsDrillDownRequestdrillDownSearch in interface AnalyticsDataAPIusername - The usernamedrillDownRequest - The drilldown object which contains the drilldown informationorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic double drillDownSearchCount(String username, org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIAnalyticsDrillDownRequestdrillDownSearchCount in interface AnalyticsDataAPIusername - The usernamedrillDownRequest - The drilldown object which contains the drilldown informationorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic org.wso2.carbon.analytics.dataservice.commons.SubCategories drillDownCategories(String username, org.wso2.carbon.analytics.dataservice.commons.CategoryDrillDownRequest drillDownRequest) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPICategoryDrillDownRequestdrillDownCategories in interface AnalyticsDataAPIusername - The usernamedrillDownRequest - The category drilldown object which contains the category drilldown informationorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRange> drillDownRangeCount(String username, org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIdrillDownRangeCount in interface AnalyticsDataAPIusername - The usernamedrillDownRequest - The drilldown request which contains all query informationAnalyticsDrillDownRange
with score property not-nullorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record> searchWithAggregates(String username, org.wso2.carbon.analytics.dataservice.commons.AggregateRequest aggregateRequest) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearchWithAggregates in interface AnalyticsDataAPIusername - The usernameaggregateRequest - Inputs required for performing aggregation.
groupByField is used to group the records. It should be a facet field created by the grouping fields.
fields attribute represents the record fields and the respective aggregate function.
aliases represents the output field names for aggregated values over the fields.org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic List<org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record>> searchWithAggregates(String username, org.wso2.carbon.analytics.dataservice.commons.AggregateRequest[] aggregateRequests) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearchWithAggregates in interface AnalyticsDataAPIusername - The usernameaggregateRequests - The array of aggregateRequests which represents different tables
groupByField is used to group the records. It should be a facet field created by the grouping fields.
fields attribute represents the record fields and the respective aggregate function.
aliases represents the output field names for aggregated values over the fields.org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void reIndex(String username, String tableName, long startTime, long endTime) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIreIndex in interface AnalyticsDataAPIusername - the usernametableName - the table name of which the records are being re-indexed.startTime - lowerbound of the timestamp range of recordsendTime - upperbound of the timestamp range of recordsorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record> readRecords(String recordStoreName, org.wso2.carbon.analytics.datasource.commons.RecordGroup recordGroup) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIreadRecords in interface AnalyticsDataAPIrecordStoreName - The record store namerecordGroup - The record group which represents the local data setRecord in the local record grouporg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void delete(int tenantId,
String tableName,
long timeFrom,
long timeTo)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIdelete in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to search ontimeFrom - The starting time to get records from for deletiontimeTo - The ending time to get records to for deletionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic void delete(int tenantId,
String tableName,
List<String> ids)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIdelete in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to search onids - The list of ids of the records to be deletedorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> search(int tenantId, String tableName, String query, int start, int count) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearch in interface AnalyticsDataAPItenantId - The tenant idtableName - The table namequery - The search querystart - The start location of the result, 0 basedcount - The maximum number of result entries to be returnedSearchResultEntrysorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> search(int tenantId, String tableName, String query, int start, int count, List<org.wso2.carbon.analytics.dataservice.commons.SortByField> sortByFields) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearch in interface AnalyticsDataAPItenantId - The tenant idtableName - The table namequery - The search querystart - The start location of the result, 0 basedcount - The maximum number of result entries to be returnedsortByFields - List of Fields by which the records needed to be sorted.SearchResultEntrysorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic int searchCount(int tenantId,
String tableName,
String query)
throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIsearchCount in interface AnalyticsDataAPItenantId - The tenant idtableName - The table namequery - The search queryorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry> drillDownSearch(int tenantId, org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIAnalyticsDrillDownRequestdrillDownSearch in interface AnalyticsDataAPItenantId - The tenant iddrillDownRequest - The drilldown object which contains the drilldown informationorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic double drillDownSearchCount(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest)
throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIAnalyticsDrillDownRequestdrillDownSearchCount in interface AnalyticsDataAPItenantId - The tenant iddrillDownRequest - The drilldown object which contains the drilldown informationorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic org.wso2.carbon.analytics.dataservice.commons.SubCategories drillDownCategories(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.CategoryDrillDownRequest drillDownRequest)
throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPICategoryDrillDownRequestdrillDownCategories in interface AnalyticsDataAPItenantId - The tenant iddrillDownRequest - The category drilldown object which contains the category drilldown informationorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic List<org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRange> drillDownRangeCount(int tenantId, org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest drillDownRequest) throws org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException
AnalyticsDataAPIdrillDownRangeCount in interface AnalyticsDataAPItenantId - The tenant iddrillDownRequest - The drilldown request which contains all query informationAnalyticsDrillDownRange
with score property not-nullorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionpublic org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record> searchWithAggregates(int tenantId,
org.wso2.carbon.analytics.dataservice.commons.AggregateRequest aggregateRequest)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearchWithAggregates in interface AnalyticsDataAPItenantId - The tenant IdaggregateRequest - The inputs required for performing aggregation.
groupByField is used to group the records. It should be a facet field created by the grouping fields.
fields attribute represents the record fields and the respective aggregate function.
aliases represents the output field names for aggregated values over the fields.org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic List<org.wso2.carbon.analytics.datasource.commons.AnalyticsIterator<org.wso2.carbon.analytics.datasource.commons.Record>> searchWithAggregates(int tenantId, org.wso2.carbon.analytics.dataservice.commons.AggregateRequest[] aggregateRequests) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIsearchWithAggregates in interface AnalyticsDataAPItenantId - The tenant IdaggregateRequests - The array of aggregateRequests representing different tables
groupByField is used to group the records. It should be a facet field created by the grouping fields.
fields attribute represents the record fields and the respective aggregate function.
aliases represents the output field names for aggregated values over the fields.org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void reIndex(int tenantId,
String tableName,
long startTime,
long endTime)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIreIndex in interface AnalyticsDataAPItenantId - tenant idtableName - the table name of which the records are being re-indexed.startTime - lowerbound of the timestamp range of recordsendTime - upperbound of the timestamp range of recordsorg.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void waitForIndexing(long maxWait)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIwaitForIndexing in interface AnalyticsDataAPImaxWait - Maximum amount of time in milliseconds, if the time is reached,
an AnalyticsTimeoutException will be thrown, -1 for infinityorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTimeoutExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void waitForIndexing(String username, String tableName, long maxWait) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTimeoutException, org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIwaitForIndexing in interface AnalyticsDataAPIusername - The usernametableName - The table namemaxWait - Maximum amount of time in milliseconds, if the time is reached,
an AnalyticsTimeoutException will be thrown, -1 for infinityorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTimeoutExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void waitForIndexing(int tenantId,
String tableName,
long maxWait)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIwaitForIndexing in interface AnalyticsDataAPItenantId - The tenant idtableName - The table namemaxWait - Maximum amount of time in milliseconds, if the time is reached,
an AnalyticsTimeoutException will be thrown, -1 for infinityorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTimeoutExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic void destroy()
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
AnalyticsDataAPIdestroy in interface AnalyticsDataAPIorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionpublic org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse getWithKeyValues(int tenantId,
String tableName,
int numPartitionsHint,
List<String> columns,
List<Map<String,Object>> valuesBatch)
throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException,
org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableException
AnalyticsDataAPIgetWithKeyValues in interface AnalyticsDataAPItenantId - The tenant which this table belongs totableName - The name of the table to search onnumPartitionsHint - The best effort number of splits this should returncolumns - The list of columns to required in results, null if all needs to be returnedvaluesBatch - A batch of key/values which contains the primary keys values to match the data in the tableorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic String getRecordStoreNameByTable(int tenantId, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException, org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableException
AnalyticsDataAPIgetRecordStoreNameByTable in interface AnalyticsDataAPItenantId - The tenant idtableName - The table nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionpublic List<String> listRecordStoreNames()
AnalyticsDataAPIlistRecordStoreNames in interface AnalyticsDataAPIpublic String getRecordStoreNameByTable(String username, String tableName) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException, org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableException
AnalyticsDataAPIgetRecordStoreNameByTable in interface AnalyticsDataAPIusername - The usernametableName - The table nameorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableExceptionCopyright © 2018 WSO2. All rights reserved.