org.apache.lens.client
Class LensClient
java.lang.Object
org.apache.lens.client.LensClient
public class LensClient
- extends Object
Method Summary |
APIResult |
addFileResource(String path)
|
APIResult |
addJarResource(String path)
|
APIResult |
addPartitionsToDim(String table,
String storage,
String partsSpec)
|
APIResult |
addPartitionsToFact(String table,
String storage,
String partsSpec)
|
APIResult |
addPartitionToDim(String table,
String storage,
String partSpec)
|
APIResult |
addPartitionToFact(String table,
String storage,
String partSpec)
|
APIResult |
addStorageToDim(String dim,
String storage)
|
APIResult |
addStorageToFact(String factName,
String spec)
|
APIResult |
closeConnection()
|
APIResult |
createCube(String cubeSpec)
|
APIResult |
createDatabase(String database,
boolean ignoreIfExists)
|
APIResult |
createDimension(String dimSpec)
|
APIResult |
createDimensionTable(String dimSpec)
|
APIResult |
createFactTable(String factSpec)
|
APIResult |
createStorage(String storageSpec)
|
boolean |
destroyPrepared(QueryPrepareHandle queryPrepareHandle)
|
APIResult |
dropAllPartitionsOfDim(String dim,
String storage)
|
APIResult |
dropAllPartitionsOfDim(String dim,
String storage,
String list)
|
APIResult |
dropAllPartitionsOfFact(String fact,
String storage)
|
APIResult |
dropAllPartitionsOfFact(String fact,
String storage,
String list)
|
APIResult |
dropAllStoragesOfDim(String table)
|
APIResult |
dropAllStoragesOfFact(String table)
|
APIResult |
dropCube(String cube)
|
APIResult |
dropDatabase(String database)
|
APIResult |
dropDimension(String dimName)
|
APIResult |
dropDimensionTable(String dim,
boolean cascade)
|
APIResult |
dropFactTable(String fact,
boolean cascade)
|
APIResult |
dropStorage(String storage)
|
APIResult |
dropStorageFromDim(String dim,
String storage)
|
APIResult |
dropStorageFromFact(String factName,
String storage)
|
QueryHandle |
executePrepared(QueryPrepareHandle phandle,
String queryName)
|
QueryHandle |
executeQueryAsynch(String sql,
String queryName)
|
QueryPlan |
explainAndPrepare(String sql,
String queryName)
|
List<String> |
getAllCubes()
|
List<String> |
getAllDatabases()
|
List<String> |
getAllDimensions()
|
List<String> |
getAllDimensionTables()
|
List<String> |
getAllFactTables()
|
List<String> |
getAllNativeTables()
|
List<XPartition> |
getAllPartitionsOfDim(String dim,
String storage)
|
List<XPartition> |
getAllPartitionsOfDim(String dim,
String storage,
String list)
|
List<XPartition> |
getAllPartitionsOfFact(String fact,
String storage)
|
List<XPartition> |
getAllPartitionsOfFact(String fact,
String storage,
String list)
|
List<String> |
getAllStorages()
|
LensClient.LensClientResultSetWithStats |
getAsyncResults(QueryHandle q)
|
LensConnection |
getConnection()
|
List<String> |
getConnectionParam()
|
List<String> |
getConnectionParam(String key)
|
XCube |
getCube(String cubeName)
|
String |
getCurrentDatabae()
|
XDimension |
getDimension(String dimName)
|
XDimensionTable |
getDimensionTable(String dimName)
|
List<String> |
getDimStorages(String dim)
|
List<String> |
getFactStorages(String fact)
|
XFactTable |
getFactTable(String factName)
|
LensStatement |
getLensStatement(QueryHandle query)
|
XNativeTable |
getNativeTable(String tblName)
|
List<QueryPrepareHandle> |
getPreparedQueries(String userName,
String queryName,
long fromDate,
long toDate)
|
LensPreparedQuery |
getPreparedQuery(QueryPrepareHandle phandle)
|
List<QueryHandle> |
getQueries(String state,
String queryName,
String user,
long fromDate,
long toDate)
|
QueryPlan |
getQueryPlan(String q)
|
QueryStatus |
getQueryStatus(QueryHandle query)
|
QueryStatus |
getQueryStatus(String q)
|
QueryResult |
getResults(QueryHandle query)
|
LensClient.LensClientResultSetWithStats |
getResults(String sql,
String queryName)
|
LensClient.LensClientResultSetWithStats |
getResultsFromPrepared(QueryPrepareHandle phandle,
String queryName)
|
XStorage |
getStorage(String storageName)
|
XStorageTableElement |
getStorageFromDim(String dim,
String storage)
|
XStorageTableElement |
getStorageFromFact(String fact,
String storage)
|
boolean |
isConnectionOpen()
|
boolean |
killQuery(QueryHandle q)
|
List<String> |
listResources(String type)
|
QueryPrepareHandle |
prepare(String sql,
String queryName)
|
APIResult |
removeFileResource(String path)
|
APIResult |
removeJarResource(String path)
|
APIResult |
setConnectionParam(String key,
String val)
|
boolean |
setDatabase(String database)
|
APIResult |
updateCube(String cubeName,
String cubeSpec)
|
APIResult |
updateDimension(String dimName,
String dimSpec)
|
APIResult |
updateDimensionTable(String dimName,
String dimSpec)
|
APIResult |
updateFactTable(String factName,
String factSpec)
|
APIResult |
updateStorage(String storageName,
String storageSpec)
|
LensClient
public LensClient()
LensClient
public LensClient(LensClientConfig conf)
LensClient
public LensClient(String username,
String password)
LensClient
public LensClient(LensClientConfig conf,
String username,
String password)
LensClient
public LensClient(Credentials cred)
executeQueryAsynch
public QueryHandle executeQueryAsynch(String sql,
String queryName)
getConnection
public LensConnection getConnection()
getResults
public LensClient.LensClientResultSetWithStats getResults(String sql,
String queryName)
getAsyncResults
public LensClient.LensClientResultSetWithStats getAsyncResults(QueryHandle q)
getLensStatement
public LensStatement getLensStatement(QueryHandle query)
getQueryStatus
public QueryStatus getQueryStatus(QueryHandle query)
getQueryStatus
public QueryStatus getQueryStatus(String q)
getQueryPlan
public QueryPlan getQueryPlan(String q)
killQuery
public boolean killQuery(QueryHandle q)
getResults
public QueryResult getResults(QueryHandle query)
getQueries
public List<QueryHandle> getQueries(String state,
String queryName,
String user,
long fromDate,
long toDate)
getAllDatabases
public List<String> getAllDatabases()
getAllNativeTables
public List<String> getAllNativeTables()
getAllFactTables
public List<String> getAllFactTables()
getAllDimensionTables
public List<String> getAllDimensionTables()
getAllCubes
public List<String> getAllCubes()
getAllDimensions
public List<String> getAllDimensions()
getCurrentDatabae
public String getCurrentDatabae()
setDatabase
public boolean setDatabase(String database)
dropDatabase
public APIResult dropDatabase(String database)
createDatabase
public APIResult createDatabase(String database,
boolean ignoreIfExists)
setConnectionParam
public APIResult setConnectionParam(String key,
String val)
getConnectionParam
public List<String> getConnectionParam()
getConnectionParam
public List<String> getConnectionParam(String key)
closeConnection
public APIResult closeConnection()
addJarResource
public APIResult addJarResource(String path)
removeJarResource
public APIResult removeJarResource(String path)
addFileResource
public APIResult addFileResource(String path)
removeFileResource
public APIResult removeFileResource(String path)
createFactTable
public APIResult createFactTable(String factSpec)
createCube
public APIResult createCube(String cubeSpec)
createStorage
public APIResult createStorage(String storageSpec)
createDimension
public APIResult createDimension(String dimSpec)
createDimensionTable
public APIResult createDimensionTable(String dimSpec)
getAllStorages
public List<String> getAllStorages()
dropDimensionTable
public APIResult dropDimensionTable(String dim,
boolean cascade)
dropFactTable
public APIResult dropFactTable(String fact,
boolean cascade)
dropCube
public APIResult dropCube(String cube)
dropStorage
public APIResult dropStorage(String storage)
dropDimension
public APIResult dropDimension(String dimName)
updateFactTable
public APIResult updateFactTable(String factName,
String factSpec)
updateDimensionTable
public APIResult updateDimensionTable(String dimName,
String dimSpec)
updateCube
public APIResult updateCube(String cubeName,
String cubeSpec)
updateStorage
public APIResult updateStorage(String storageName,
String storageSpec)
updateDimension
public APIResult updateDimension(String dimName,
String dimSpec)
getFactTable
public XFactTable getFactTable(String factName)
getDimensionTable
public XDimensionTable getDimensionTable(String dimName)
getNativeTable
public XNativeTable getNativeTable(String tblName)
getCube
public XCube getCube(String cubeName)
getDimension
public XDimension getDimension(String dimName)
getStorage
public XStorage getStorage(String storageName)
getFactStorages
public List<String> getFactStorages(String fact)
getDimStorages
public List<String> getDimStorages(String dim)
dropAllStoragesOfDim
public APIResult dropAllStoragesOfDim(String table)
dropAllStoragesOfFact
public APIResult dropAllStoragesOfFact(String table)
addStorageToFact
public APIResult addStorageToFact(String factName,
String spec)
dropStorageFromFact
public APIResult dropStorageFromFact(String factName,
String storage)
getStorageFromFact
public XStorageTableElement getStorageFromFact(String fact,
String storage)
addStorageToDim
public APIResult addStorageToDim(String dim,
String storage)
dropStorageFromDim
public APIResult dropStorageFromDim(String dim,
String storage)
getStorageFromDim
public XStorageTableElement getStorageFromDim(String dim,
String storage)
getAllPartitionsOfFact
public List<XPartition> getAllPartitionsOfFact(String fact,
String storage)
getAllPartitionsOfFact
public List<XPartition> getAllPartitionsOfFact(String fact,
String storage,
String list)
getAllPartitionsOfDim
public List<XPartition> getAllPartitionsOfDim(String dim,
String storage)
getAllPartitionsOfDim
public List<XPartition> getAllPartitionsOfDim(String dim,
String storage,
String list)
dropAllPartitionsOfFact
public APIResult dropAllPartitionsOfFact(String fact,
String storage)
dropAllPartitionsOfFact
public APIResult dropAllPartitionsOfFact(String fact,
String storage,
String list)
dropAllPartitionsOfDim
public APIResult dropAllPartitionsOfDim(String dim,
String storage)
dropAllPartitionsOfDim
public APIResult dropAllPartitionsOfDim(String dim,
String storage,
String list)
addPartitionToFact
public APIResult addPartitionToFact(String table,
String storage,
String partSpec)
addPartitionsToFact
public APIResult addPartitionsToFact(String table,
String storage,
String partsSpec)
addPartitionToDim
public APIResult addPartitionToDim(String table,
String storage,
String partSpec)
addPartitionsToDim
public APIResult addPartitionsToDim(String table,
String storage,
String partsSpec)
prepare
public QueryPrepareHandle prepare(String sql,
String queryName)
explainAndPrepare
public QueryPlan explainAndPrepare(String sql,
String queryName)
destroyPrepared
public boolean destroyPrepared(QueryPrepareHandle queryPrepareHandle)
getPreparedQueries
public List<QueryPrepareHandle> getPreparedQueries(String userName,
String queryName,
long fromDate,
long toDate)
getPreparedQuery
public LensPreparedQuery getPreparedQuery(QueryPrepareHandle phandle)
getResultsFromPrepared
public LensClient.LensClientResultSetWithStats getResultsFromPrepared(QueryPrepareHandle phandle,
String queryName)
executePrepared
public QueryHandle executePrepared(QueryPrepareHandle phandle,
String queryName)
isConnectionOpen
public boolean isConnectionOpen()
listResources
public List<String> listResources(String type)
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.