Search in sources :

Example 1 with VersionInfo

use of io.cdap.cdap.runtime.spi.VersionInfo in project cdap by cdapio.

the class ProvisioningService method createContext.

private ProvisionerContext createContext(CConfiguration cConf, ProgramOptions programOptions, ProgramRunId programRunId, String userId, Map<String, String> properties, @Nullable SSHContext sshContext) {
    RuntimeMonitorType runtimeMonitorType = SystemArguments.getRuntimeMonitorType(cConf, programOptions);
    Map<String, String> systemArgs = programOptions.getArguments().asMap();
    String provisionerName = SystemArguments.getProfileProvisioner(systemArgs);
    String profileName = SystemArguments.getProfileIdFromArgs(programRunId.getNamespaceId(), systemArgs).map(ProfileId::getEntityName).orElse(null);
    VersionInfo appCDAPVersion = getAppCDAPVersion(programOptions);
    Map<String, String> evaluated = evaluateMacros(secureStore, userId, programRunId.getNamespace(), properties);
    return new DefaultProvisionerContext(programRunId, provisionerName, evaluated, sparkCompat, sshContext, appCDAPVersion, locationFactory, runtimeMonitorType, metricsCollectionService, profileName, contextExecutor);
}
Also used : VersionInfo(io.cdap.cdap.runtime.spi.VersionInfo) RuntimeMonitorType(io.cdap.cdap.runtime.spi.RuntimeMonitorType)

Example 2 with VersionInfo

use of io.cdap.cdap.runtime.spi.VersionInfo in project cdap by caskdata.

the class ProvisioningService method createContext.

private ProvisionerContext createContext(CConfiguration cConf, ProgramOptions programOptions, ProgramRunId programRunId, String userId, Map<String, String> properties, @Nullable SSHContext sshContext) {
    RuntimeMonitorType runtimeMonitorType = SystemArguments.getRuntimeMonitorType(cConf, programOptions);
    Map<String, String> systemArgs = programOptions.getArguments().asMap();
    String provisionerName = SystemArguments.getProfileProvisioner(systemArgs);
    String profileName = SystemArguments.getProfileIdFromArgs(programRunId.getNamespaceId(), systemArgs).map(ProfileId::getEntityName).orElse(null);
    VersionInfo appCDAPVersion = getAppCDAPVersion(programOptions);
    Map<String, String> evaluated = evaluateMacros(secureStore, userId, programRunId.getNamespace(), properties);
    return new DefaultProvisionerContext(programRunId, provisionerName, evaluated, sparkCompat, sshContext, appCDAPVersion, locationFactory, runtimeMonitorType, metricsCollectionService, profileName, contextExecutor);
}
Also used : VersionInfo(io.cdap.cdap.runtime.spi.VersionInfo) RuntimeMonitorType(io.cdap.cdap.runtime.spi.RuntimeMonitorType)

Aggregations

RuntimeMonitorType (io.cdap.cdap.runtime.spi.RuntimeMonitorType)2 VersionInfo (io.cdap.cdap.runtime.spi.VersionInfo)2