public class TestBase extends Object
Application.
To clean App Fabric state, you can use the clear() method.
Custom configurations for CDAP can be set by using ClassRule and TestConfiguration.
TestConfiguration| Modifier and Type | Field and Description |
|---|---|
static org.junit.rules.TemporaryFolder |
TMP_FOLDER |
static org.junit.rules.TemporaryFolder |
tmpFolder
Deprecated.
|
| Constructor and Description |
|---|
TestBase() |
| Modifier and Type | Method and Description |
|---|---|
protected static ArtifactManager |
addAppArtifact(co.cask.cdap.proto.id.ArtifactId artifactId,
Class<?> appClass)
Build an application artifact from the specified class and then add it.
|
protected static ArtifactManager |
addAppArtifact(co.cask.cdap.proto.id.ArtifactId artifactId,
Class<?> appClass,
Manifest manifest)
Build an application artifact from the specified class and then add it.
|
protected static ArtifactManager |
addAppArtifact(co.cask.cdap.proto.id.ArtifactId artifactId,
Class<?> appClass,
String... exportPackages)
Build an application artifact from the specified class and then add it.
|
protected static void |
addAppArtifact(co.cask.cdap.proto.Id.Artifact artifactId,
Class<?> appClass)
Deprecated.
since 3.4.0. Use
addArtifact(ArtifactId, File). |
protected static void |
addAppArtifact(co.cask.cdap.proto.Id.Artifact artifactId,
Class<?> appClass,
Manifest manifest)
Deprecated.
since 3.4.0. Use
addAppArtifact(ArtifactId, Class, Manifest) |
protected static void |
addAppArtifact(co.cask.cdap.proto.Id.Artifact artifactId,
Class<?> appClass,
String... exportPackages)
Deprecated.
since 3.4.0. Use
addAppArtifact(ArtifactId, Class, String...) |
protected static ArtifactManager |
addArtifact(co.cask.cdap.proto.id.ArtifactId artifactId,
File artifactFile)
Add the specified artifact.
|
protected static void |
addArtifact(co.cask.cdap.proto.Id.Artifact artifactId,
File artifactFile)
Deprecated.
since 3.4.0. Use
addArtifact(ArtifactId, File) |
protected <T extends DatasetAdmin> |
addDatasetInstance(co.cask.cdap.proto.id.DatasetId datasetId,
String datasetTypeName)
Adds an instance of dataset.
|
protected <T extends DatasetAdmin> |
addDatasetInstance(co.cask.cdap.proto.Id.Namespace namespace,
String datasetTypeName,
String datasetInstanceName)
Deprecated.
since 4.0.0. Use
addDatasetInstance(DatasetId, String) instead. |
protected static <T extends DatasetAdmin> |
addDatasetInstance(co.cask.cdap.proto.Id.Namespace namespace,
String datasetTypeName,
String datasetInstanceName,
DatasetProperties props)
Deprecated.
since 4.0.0. Use
addDatasetInstance(String, DatasetId, DatasetProperties) instead. |
protected static <T extends DatasetAdmin> |
addDatasetInstance(String datasetTypeName,
co.cask.cdap.proto.id.DatasetId datasetId,
DatasetProperties props)
Adds an instance of a dataset.
|
protected <T extends DatasetAdmin> |
addDatasetInstance(String datasetTypeName,
String datasetInstanceName)
Adds an instance of dataset.
|
protected static <T extends DatasetAdmin> |
addDatasetInstance(String datasetTypeName,
String datasetInstanceName,
DatasetProperties props)
Adds an instance of a dataset.
|
protected static ArtifactManager |
addPluginArtifact(co.cask.cdap.proto.id.ArtifactId artifactId,
co.cask.cdap.proto.id.ArtifactId parent,
Class<?> pluginClass,
Class<?>... pluginClasses)
Build an artifact from the specified plugin classes and then add it.
|
protected static ArtifactManager |
addPluginArtifact(co.cask.cdap.proto.id.ArtifactId artifactId,
co.cask.cdap.proto.id.ArtifactId parent,
Set<PluginClass> additionalPlugins,
Class<?> pluginClass,
Class<?>... pluginClasses)
Build an artifact from the specified plugin classes and then add it.
|
protected static ArtifactManager |
addPluginArtifact(co.cask.cdap.proto.id.ArtifactId artifactId,
Set<co.cask.cdap.proto.artifact.ArtifactRange> parentArtifacts,
Class<?> pluginClass,
Class<?>... pluginClasses)
Build an artifact from the specified plugin classes and then add it.
|
protected static void |
addPluginArtifact(co.cask.cdap.proto.Id.Artifact artifactId,
co.cask.cdap.proto.Id.Artifact parent,
Class<?> pluginClass,
Class<?>... pluginClasses)
Deprecated.
since 3.4.0. Use
addPluginArtifact(ArtifactId, ArtifactId, Class, Class[]) |
protected static void |
addPluginArtifact(co.cask.cdap.proto.Id.Artifact artifactId,
co.cask.cdap.proto.Id.Artifact parent,
Set<PluginClass> additionalPlugins,
Class<?> pluginClass,
Class<?>... pluginClasses)
Deprecated.
since 3.4.0. Use
addPluginArtifact(ArtifactId, ArtifactId, Set, Class, Class[]) |
protected static void |
addPluginArtifact(co.cask.cdap.proto.Id.Artifact artifactId,
Set<co.cask.cdap.proto.artifact.ArtifactRange> parentArtifacts,
Class<?> pluginClass,
Class<?>... pluginClasses)
Deprecated.
since 3.4.0. Use
addPluginArtifact(ArtifactId, Set, Class, Class[]) |
void |
afterTest()
By default after each test finished, it will stop all apps started during the test.
|
void |
beforeTest() |
protected static void |
clear()
Clear the state of app fabric, by removing all deployed applications, Datasets and Streams.
|
protected static void |
createNamespace(co.cask.cdap.proto.Id.Namespace namespace)
Deprecated.
since 3.4.0. Use
getNamespaceAdmin() to perform namespace operations instead. |
protected static void |
deleteAllApplications(co.cask.cdap.proto.id.NamespaceId namespaceId)
Deletes all applications in the specified namespace.
|
protected void |
deleteDatasetInstance(co.cask.cdap.proto.id.DatasetId datasetId)
Deletes an instance of dataset.
|
protected void |
deleteDatasetInstance(co.cask.cdap.proto.id.NamespaceId namespaceId,
String datasetInstanceName)
Deprecated.
since 4.0.0. Use
deleteDatasetInstance(DatasetId) instead. |
protected static void |
deleteNamespace(co.cask.cdap.proto.Id.Namespace namespace)
Deprecated.
since 3.4.0. Use
getNamespaceAdmin() to perform namespace operations instead. |
protected static ApplicationManager |
deployApplication(co.cask.cdap.proto.id.ApplicationId appId,
co.cask.cdap.proto.artifact.AppRequest appRequest)
Deploys an
Application with version. |
protected static ApplicationManager |
deployApplication(Class<? extends Application> applicationClz,
Config appConfig,
File... bundleEmbeddedJars)
Deploys an
Application. |
protected static ApplicationManager |
deployApplication(Class<? extends Application> applicationClz,
File... bundleEmbeddedJars)
Deploys an
Application. |
protected static ApplicationManager |
deployApplication(co.cask.cdap.proto.Id.Application appId,
co.cask.cdap.proto.artifact.AppRequest appRequest)
Deploys an
Application. |
protected static ApplicationManager |
deployApplication(co.cask.cdap.proto.Id.Namespace namespace,
Class<? extends Application> applicationClz,
Config appConfig,
File... bundleEmbeddedJars)
Deprecated.
since 4.0.0. Use
deployApplication(NamespaceId, Class, Config, File...) instead. |
protected static ApplicationManager |
deployApplication(co.cask.cdap.proto.Id.Namespace namespace,
Class<? extends Application> applicationClz,
File... bundleEmbeddedJars)
Deprecated.
since 4.0.0. Use
deployApplication(NamespaceId, Class, File...) instead. |
protected static ApplicationManager |
deployApplication(co.cask.cdap.proto.id.NamespaceId namespace,
Class<? extends Application> applicationClz,
Config appConfig,
File... bundleEmbeddedJars)
Deploys an
Application with a config. |
protected static ApplicationManager |
deployApplication(co.cask.cdap.proto.id.NamespaceId namespace,
Class<? extends Application> applicationClz,
File... bundleEmbeddedJars)
Deploys an
Application. |
protected static void |
deployDatasetModule(co.cask.cdap.proto.id.DatasetModuleId datasetModuleId,
Class<? extends DatasetModule> datasetModule)
Deploys
DatasetModule. |
protected static void |
deployDatasetModule(co.cask.cdap.proto.Id.Namespace namespace,
String moduleName,
Class<? extends DatasetModule> datasetModule)
Deprecated.
since 4.0.0. Use
deployDatasetModule(DatasetModuleId, Class) instead. |
protected static void |
deployDatasetModule(String moduleName,
Class<? extends DatasetModule> datasetModule)
Deploys
DatasetModule. |
static void |
finish() |
protected static co.cask.cdap.security.spi.authorization.Authorizer |
getAuthorizer()
Returns an
Authorizer for performing authorization operations. |
protected static co.cask.cdap.common.conf.CConfiguration |
getConfiguration()
Returns the
CConfiguration used in tests. |
protected <T> DataSetManager<T> |
getDataset(co.cask.cdap.proto.id.DatasetId datasetId)
Gets Dataset manager of Dataset instance of type <T>.
|
protected <T> DataSetManager<T> |
getDataset(co.cask.cdap.proto.Id.Namespace namespace,
String datasetInstanceName)
Deprecated.
since 4.0.0. Use
getDataset(DatasetId) instead. |
protected <T> DataSetManager<T> |
getDataset(String datasetInstanceName)
Gets Dataset manager of Dataset instance of type <T>.
|
protected static MessagingAdmin |
getMessagingAdmin(co.cask.cdap.proto.id.NamespaceId namespace) |
protected static MessagingAdmin |
getMessagingAdmin(String namespace)
Returns a
MessagingAdmin for the given namespace. |
protected MessagingContext |
getMessagingContext()
Returns a
MessagingContext for interacting with the messaging system. |
protected MetricsManager |
getMetricsManager() |
protected static co.cask.cdap.common.namespace.NamespaceAdmin |
getNamespaceAdmin()
Returns a
NamespaceAdmin to interact with namespaces. |
protected static PreviewManager |
getPreviewManager()
Returns a
PreviewManager to interact with preview. |
protected Connection |
getQueryClient()
Returns a JDBC connection that allows the running of SQL queries over data sets.
|
protected Connection |
getQueryClient(co.cask.cdap.proto.Id.Namespace namespace)
Deprecated.
since 4.0.0. Use
getQueryClient(NamespaceId) instead. |
protected Connection |
getQueryClient(co.cask.cdap.proto.id.NamespaceId namespace)
Returns a JDBC connection that allows the running of SQL queries over data sets.
|
protected static SecureStore |
getSecureStore()
Returns a
SecureStore to interact with secure storage. |
protected static SecureStoreManager |
getSecureStoreManager()
Returns a
SecureStoreManager to interact with secure storage. |
protected StreamManager |
getStreamManager(co.cask.cdap.proto.Id.Namespace namespace,
String streamName)
Deprecated.
since 4.0.0. Use
getStreamManager(StreamId) instead. |
protected StreamManager |
getStreamManager(co.cask.cdap.proto.id.StreamId streamId)
Returns a
StreamManager for the specified stream in the specified namespace |
protected StreamManager |
getStreamManager(String streamName)
Returns a
StreamManager for the specified stream in the default namespace |
protected org.apache.tephra.TransactionManager |
getTxService() |
static void |
initialize() |
public static final org.junit.rules.TemporaryFolder TMP_FOLDER
@Deprecated public static org.junit.rules.TemporaryFolder tmpFolder
public void afterTest()
throws Exception
Exceptionprotected MetricsManager getMetricsManager()
@Deprecated protected static void createNamespace(co.cask.cdap.proto.Id.Namespace namespace) throws Exception
getNamespaceAdmin() to perform namespace operations instead.namespace - the namespace to createException@Deprecated protected static void deleteNamespace(co.cask.cdap.proto.Id.Namespace namespace) throws Exception
getNamespaceAdmin() to perform namespace operations instead.namespace - the namespace to deleteException@Deprecated protected static ApplicationManager deployApplication(co.cask.cdap.proto.Id.Namespace namespace, Class<? extends Application> applicationClz, File... bundleEmbeddedJars)
deployApplication(NamespaceId, Class, File...) instead.Application. The Flows and
other programs defined in the application must be in the same or children package as the application.namespace - the namespace to deploy the application toapplicationClz - the application classbundleEmbeddedJars - any extra jars to bundle in the application jarApplicationManager to manage the deployed application.protected static ApplicationManager deployApplication(co.cask.cdap.proto.id.NamespaceId namespace, Class<? extends Application> applicationClz, File... bundleEmbeddedJars)
Application. The Flows and
other programs defined in the application must be in the same or children package as the application.namespace - the namespace to deploy the application toapplicationClz - the application classbundleEmbeddedJars - any extra jars to bundle in the application jarApplicationManager to manage the deployed application.@Deprecated protected static ApplicationManager deployApplication(co.cask.cdap.proto.Id.Namespace namespace, Class<? extends Application> applicationClz, Config appConfig, File... bundleEmbeddedJars)
deployApplication(NamespaceId, Class, Config, File...) instead.Application with a config. The Flows and
other programs defined in the application must be in the same or children package as the application.namespace - the namespace to deploy the application toapplicationClz - the application classappConfig - the application configbundleEmbeddedJars - any extra jars to bundle in the application jarApplicationManager to manage the deployed application.protected static ApplicationManager deployApplication(co.cask.cdap.proto.id.NamespaceId namespace, Class<? extends Application> applicationClz, Config appConfig, File... bundleEmbeddedJars)
Application with a config. The Flows and
other programs defined in the application must be in the same or children package as the application.namespace - the namespace to deploy the application toapplicationClz - the application classappConfig - the application configAppbundleEmbeddedJars - any extra jars to bundle in the application jarApplicationManager to manage the deployed application.protected static ApplicationManager deployApplication(Class<? extends Application> applicationClz, File... bundleEmbeddedJars)
Application. The Flows and
other programs defined in the application must be in the same or children package as the application.applicationClz - the application classbundleEmbeddedJars - any extra jars to bundle in the application jarApplicationManager to manage the deployed application.protected static ApplicationManager deployApplication(Class<? extends Application> applicationClz, Config appConfig, File... bundleEmbeddedJars)
Application. The Flows and
other programs defined in the application must be in the same or children package as the application.applicationClz - the application classappConfig - the application configbundleEmbeddedJars - any extra jars to bundle in the application jarApplicationManager to manage the deployed application.protected static ApplicationManager deployApplication(co.cask.cdap.proto.Id.Application appId, co.cask.cdap.proto.artifact.AppRequest appRequest) throws Exception
Application. The application artifact must already exist.appId - the id of the application to createappRequest - the application create or update requestApplicationManager to manage the deployed applicationExceptionprotected static ApplicationManager deployApplication(co.cask.cdap.proto.id.ApplicationId appId, co.cask.cdap.proto.artifact.AppRequest appRequest) throws Exception
Application with version. The application artifact must already exist.appId - the id of the application to createappRequest - the application create or update requestApplicationManager to manage the deployed applicationException@Deprecated protected static void addArtifact(co.cask.cdap.proto.Id.Artifact artifactId, File artifactFile) throws Exception
addArtifact(ArtifactId, File)artifactId - the id of the artifact to addartifactFile - the contents of the artifact. Must be a valid jar file containing apps or pluginsExceptionprotected static ArtifactManager addArtifact(co.cask.cdap.proto.id.ArtifactId artifactId, File artifactFile) throws Exception
artifactId - the id of the artifact to addartifactFile - the contents of the artifact. Must be a valid jar file containing apps or pluginsException@Deprecated protected static void addAppArtifact(co.cask.cdap.proto.Id.Artifact artifactId, Class<?> appClass) throws Exception
addArtifact(ArtifactId, File).artifactId - the id of the artifact to addappClass - the application class to build the artifact fromExceptionprotected static ArtifactManager addAppArtifact(co.cask.cdap.proto.id.ArtifactId artifactId, Class<?> appClass) throws Exception
artifactId - the id of the artifact to addappClass - the application class to build the artifact fromArtifactManager to manage the added artifactException@Deprecated protected static void addAppArtifact(co.cask.cdap.proto.Id.Artifact artifactId, Class<?> appClass, String... exportPackages) throws Exception
addAppArtifact(ArtifactId, Class, String...)artifactId - the id of the artifact to addappClass - the application class to build the artifact fromexportPackages - the packages to export and place in the manifest of the jar to build. This should include
packages that contain classes that plugins for the application will implement.Exceptionprotected static ArtifactManager addAppArtifact(co.cask.cdap.proto.id.ArtifactId artifactId, Class<?> appClass, String... exportPackages) throws Exception
artifactId - the id of the artifact to addappClass - the application class to build the artifact fromexportPackages - the packages to export and place in the manifest of the jar to build. This should include
packages that contain classes that plugins for the application will implement.ArtifactManager to manage the added artifactException@Deprecated protected static void addAppArtifact(co.cask.cdap.proto.Id.Artifact artifactId, Class<?> appClass, Manifest manifest) throws Exception
addAppArtifact(ArtifactId, Class, Manifest)artifactId - the id of the artifact to addappClass - the application class to build the artifact frommanifest - the manifest to use when building the jarExceptionprotected static ArtifactManager addAppArtifact(co.cask.cdap.proto.id.ArtifactId artifactId, Class<?> appClass, Manifest manifest) throws Exception
artifactId - the id of the artifact to addappClass - the application class to build the artifact frommanifest - the manifest to use when building the jarArtifactManager to manage the added artifactException@Deprecated protected static void addPluginArtifact(co.cask.cdap.proto.Id.Artifact artifactId, co.cask.cdap.proto.Id.Artifact parent, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception
addPluginArtifact(ArtifactId, ArtifactId, Class, Class[])artifactId - the id of the artifact to addparent - the parent artifact it extendspluginClass - the plugin class to build the jar frompluginClasses - any additional plugin classes that should be included in the jarExceptionprotected static ArtifactManager addPluginArtifact(co.cask.cdap.proto.id.ArtifactId artifactId, co.cask.cdap.proto.id.ArtifactId parent, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception
artifactId - the id of the artifact to addparent - the parent artifact it extendspluginClass - the plugin class to build the jar frompluginClasses - any additional plugin classes that should be included in the jarArtifactManager to manage the added plugin artifactException@Deprecated protected static void addPluginArtifact(co.cask.cdap.proto.Id.Artifact artifactId, co.cask.cdap.proto.Id.Artifact parent, Set<PluginClass> additionalPlugins, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception
addPluginArtifact(ArtifactId, ArtifactId, Set, Class, Class[])artifactId - the id of the artifact to addparent - the parent artifact it extendsadditionalPlugins - any plugin classes that need to be explicitly declared because they cannot be found
by inspecting the jar. This is true for 3rd party plugins, such as jdbc driverspluginClass - the plugin class to build the jar frompluginClasses - any additional plugin classes that should be included in the jarExceptionprotected static ArtifactManager addPluginArtifact(co.cask.cdap.proto.id.ArtifactId artifactId, co.cask.cdap.proto.id.ArtifactId parent, Set<PluginClass> additionalPlugins, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception
artifactId - the id of the artifact to addparent - the parent artifact it extendsadditionalPlugins - any plugin classes that need to be explicitly declared because they cannot be found
by inspecting the jar. This is true for 3rd party plugins, such as jdbc driverspluginClass - the plugin class to build the jar frompluginClasses - any additional plugin classes that should be included in the jarArtifactManager to manage the added plugin artifactException@Deprecated protected static void addPluginArtifact(co.cask.cdap.proto.Id.Artifact artifactId, Set<co.cask.cdap.proto.artifact.ArtifactRange> parentArtifacts, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception
addPluginArtifact(ArtifactId, Set, Class, Class[])artifactId - the id of the artifact to addparentArtifacts - the parent artifacts it extendspluginClass - the plugin class to build the jar frompluginClasses - any additional plugin classes that should be included in the jarExceptionprotected static ArtifactManager addPluginArtifact(co.cask.cdap.proto.id.ArtifactId artifactId, Set<co.cask.cdap.proto.artifact.ArtifactRange> parentArtifacts, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception
artifactId - the id of the artifact to addparentArtifacts - the parent artifacts it extendspluginClass - the plugin class to build the jar frompluginClasses - any additional plugin classes that should be included in the jarArtifactManager to manage the added plugin artifactExceptionprotected static void clear()
@Deprecated protected static void deployDatasetModule(co.cask.cdap.proto.Id.Namespace namespace, String moduleName, Class<? extends DatasetModule> datasetModule) throws Exception
deployDatasetModule(DatasetModuleId, Class) instead.DatasetModule.namespace - namespace to deploy tomoduleName - name of the moduledatasetModule - module classExceptionprotected static void deployDatasetModule(co.cask.cdap.proto.id.DatasetModuleId datasetModuleId,
Class<? extends DatasetModule> datasetModule)
throws Exception
DatasetModule.datasetModuleId - the module iddatasetModule - module classExceptionprotected static void deployDatasetModule(String moduleName, Class<? extends DatasetModule> datasetModule) throws Exception
DatasetModule.moduleName - name of the moduledatasetModule - module classException@Deprecated protected static <T extends DatasetAdmin> T addDatasetInstance(co.cask.cdap.proto.Id.Namespace namespace, String datasetTypeName, String datasetInstanceName, DatasetProperties props) throws Exception
addDatasetInstance(String, DatasetId, DatasetProperties) instead.T - type of the dataset adminnamespace - namespace for the datasetdatasetTypeName - dataset type namedatasetInstanceName - instance nameprops - propertiesExceptionprotected static <T extends DatasetAdmin> T addDatasetInstance(String datasetTypeName, co.cask.cdap.proto.id.DatasetId datasetId, DatasetProperties props) throws Exception
T - type of the dataset admindatasetId - the dataset iddatasetTypeName - dataset type name, like "table" or "fileset"props - propertiesExceptionprotected static <T extends DatasetAdmin> T addDatasetInstance(String datasetTypeName, String datasetInstanceName, DatasetProperties props) throws Exception
T - type of the dataset admindatasetTypeName - dataset type namedatasetInstanceName - instance nameprops - propertiesException@Deprecated protected final <T extends DatasetAdmin> T addDatasetInstance(co.cask.cdap.proto.Id.Namespace namespace, String datasetTypeName, String datasetInstanceName) throws Exception
addDatasetInstance(DatasetId, String) instead.T - type of the dataset adminnamespace - namespace for the datasetdatasetTypeName - dataset type namedatasetInstanceName - instance nameExceptionprotected final <T extends DatasetAdmin> T addDatasetInstance(co.cask.cdap.proto.id.DatasetId datasetId, String datasetTypeName) throws Exception
T - type of the dataset admindatasetId - the dataset iddatasetTypeName - dataset type nameExceptionprotected final <T extends DatasetAdmin> T addDatasetInstance(String datasetTypeName, String datasetInstanceName) throws Exception
T - type of the dataset admindatasetTypeName - dataset type namedatasetInstanceName - instance nameException@Deprecated protected void deleteDatasetInstance(co.cask.cdap.proto.id.NamespaceId namespaceId, String datasetInstanceName) throws Exception
deleteDatasetInstance(DatasetId) instead.namespaceId - namespace for the datasetdatasetInstanceName - instance nameExceptionprotected void deleteDatasetInstance(co.cask.cdap.proto.id.DatasetId datasetId)
throws Exception
datasetId - the dataset to deleteException@Deprecated protected final <T> DataSetManager<T> getDataset(co.cask.cdap.proto.Id.Namespace namespace, String datasetInstanceName) throws Exception
getDataset(DatasetId) instead.namespace - namespace for the datasetdatasetInstanceName - instance name of datasetExceptionprotected final <T> DataSetManager<T> getDataset(co.cask.cdap.proto.id.DatasetId datasetId) throws Exception
datasetId - the id of the dataset to getExceptionprotected final <T> DataSetManager<T> getDataset(String datasetInstanceName) throws Exception
datasetInstanceName - instance name of datasetException@Deprecated protected final Connection getQueryClient(co.cask.cdap.proto.Id.Namespace namespace) throws Exception
getQueryClient(NamespaceId) instead.namespace - namespace for the connectionExceptionprotected final Connection getQueryClient(co.cask.cdap.proto.id.NamespaceId namespace) throws Exception
namespace - namespace for the connectionExceptionprotected final Connection getQueryClient() throws Exception
Exceptionprotected final StreamManager getStreamManager(String streamName)
StreamManager for the specified stream in the default namespacestreamName - the specified streamStreamManager for the specified stream in the default namespace@Deprecated protected final StreamManager getStreamManager(co.cask.cdap.proto.Id.Namespace namespace, String streamName)
getStreamManager(StreamId) instead.StreamManager for the specified stream in the specified namespacenamespace - namespace for the streamstreamName - the specified streamStreamManager for the specified stream in the specified namespaceprotected final StreamManager getStreamManager(co.cask.cdap.proto.id.StreamId streamId)
StreamManager for the specified stream in the specified namespacestreamId - the stream to getStreamManager for the specified stream in the specified namespaceprotected final MessagingContext getMessagingContext()
MessagingContext for interacting with the messaging system.protected static MessagingAdmin getMessagingAdmin(String namespace)
MessagingAdmin for the given namespace.protected static MessagingAdmin getMessagingAdmin(co.cask.cdap.proto.id.NamespaceId namespace)
protected org.apache.tephra.TransactionManager getTxService()
protected static co.cask.cdap.common.namespace.NamespaceAdmin getNamespaceAdmin()
NamespaceAdmin to interact with namespaces.protected static SecureStore getSecureStore()
SecureStore to interact with secure storage.protected static SecureStoreManager getSecureStoreManager()
SecureStoreManager to interact with secure storage.@Beta protected static co.cask.cdap.security.spi.authorization.Authorizer getAuthorizer() throws IOException, co.cask.cdap.security.authorization.InvalidAuthorizerException
Authorizer for performing authorization operations.protected static PreviewManager getPreviewManager()
PreviewManager to interact with preview.protected static co.cask.cdap.common.conf.CConfiguration getConfiguration()
CConfiguration used in tests.Copyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.