public static DeploymentInternal deployRecover(String deploymentId, int statementIdFirstStatement, EPCompiled compiled, StatementNameRuntimeOption statementNameResolverRuntime, StatementUserObjectRuntimeOption userObjectResolverRuntime, StatementSubstitutionParameterOption substitutionParameterResolver, EPRuntimeSPI epRuntime) throws EPDeployException { return deploy(true, deploymentId, statementIdFirstStatement, compiled, statementNameResolverRuntime, userObjectResolverRuntime, substitutionParameterResolver, epRuntime); }
Set<String> deploymentIdDependencies = resolveDependencies(moduleDependencies, services); validateIndexPrecondition(namedWindow.getIndexMetadata(), index); } else { TableMetaData table = services.getTablePathRegistry().getWithModule(index.getInfraName(), index.getInfraModuleName()); validateIndexPrecondition(table.getIndexMetadata(), index); int statementId = statementIdFirstStatement; for (StatementProvider statement : statementResources) { StatementLightweight lightweight = initStatement(recovery, moduleName, statement, deploymentId, statementId, eventTypeResolver, moduleIncidentals, statementNameResolverRuntime, userObjectResolverRuntime, services); lightweights.add(lightweight); statementId++; substitutionParameters = setSubstitutionParameterValues(deploymentId, lightweights, substitutionParameterResolver); } catch (Throwable t) { reverseDeployment(deploymentId, deploymentTypes, lightweights, new EPStatement[0], provider, services); throw t; } catch (Throwable t) { try { reverseDeployment(deploymentId, deploymentTypes, lightweights, statements, provider, services); } catch (Throwable udex) { log.warn(udex.getMessage(), udex); addDependencies(deploymentId, moduleDependencies, services); RecoveryInformation recoveryInformation = getRecoveryInformation(deployed); services.getDeploymentRecoveryService().add(deploymentId, statementIdFirstStatement, compiled, recoveryInformation.statementUserObjectsRuntime, recoveryInformation.statementNamesWhenProvidedByAPI, substitutionParameters);
throw makePreconditionExceptionPreconfigured(PathRegistryObjectType.EVENTTYPE, publicEventType); throw makePreconditionExceptionPreconfigured(PathRegistryObjectType.VARIABLE, publicVariable); String depIdNamedWindow = services.getNamedWindowPathRegistry().getDeploymentId(pathNamedWindow.getName(), pathNamedWindow.getModuleName()); if (depIdNamedWindow == null) { throw makePreconditionExceptionPath(PathRegistryObjectType.NAMEDWINDOW, pathNamedWindow); String depIdTable = services.getTablePathRegistry().getDeploymentId(pathTable.getName(), pathTable.getModuleName()); if (depIdTable == null) { throw makePreconditionExceptionPath(PathRegistryObjectType.TABLE, pathTable); String depIdEventType = services.getEventTypePathRegistry().getDeploymentId(pathEventType.getName(), pathEventType.getModuleName()); if (depIdEventType == null) { throw makePreconditionExceptionPath(PathRegistryObjectType.EVENTTYPE, pathEventType); String depIdVariable = services.getVariablePathRegistry().getDeploymentId(pathVariable.getName(), pathVariable.getModuleName()); if (depIdVariable == null) { throw makePreconditionExceptionPath(PathRegistryObjectType.VARIABLE, pathVariable); String depIdContext = services.getContextPathRegistry().getDeploymentId(pathContext.getName(), pathContext.getModuleName()); if (depIdContext == null) { throw makePreconditionExceptionPath(PathRegistryObjectType.CONTEXT, pathContext); String depIdExpression = services.getExprDeclaredPathRegistry().getDeploymentId(pathExpression.getName(), pathExpression.getModuleName()); if (depIdExpression == null) { throw makePreconditionExceptionPath(PathRegistryObjectType.EXPRDECL, pathExpression); String depIdExpression = services.getScriptPathRegistry().getDeploymentId(new NameAndParamNum(pathScript.getName(), pathScript.getParamNum()), pathScript.getModuleName());
private static DeploymentInternal deploy(boolean recovery, String deploymentId, int statementIdFirstStatement, EPCompiled compiled, StatementNameRuntimeOption statementNameResolverRuntime, StatementUserObjectRuntimeOption userObjectResolverRuntime, StatementSubstitutionParameterOption substitutionParameterResolver, EPRuntimeSPI epRuntime) throws EPDeployException { // set variable local version epRuntime.getServicesContext().getVariableManagementService().setLocalVersion(); try { return deploySafe(recovery, deploymentId, statementIdFirstStatement, compiled, statementNameResolverRuntime, userObjectResolverRuntime, substitutionParameterResolver, epRuntime); } catch (EPDeployException ex) { throw ex; } catch (Throwable t) { throw new EPDeployException(t.getMessage(), t); } }
deployerResult = Deployer.deployFresh(deploymentId, currentStatementId, compiled, options.getStatementNameRuntime(), options.getStatementUserObjectRuntime(), options.getStatementSubstitutionParameter(), runtime); statementIdRecovery.setCurrentStatementId(currentStatementId + deployerResult.getStatements().length);
deployerResult = Deployer.deployRecover(entry.getKey(), entry.getValue().getStatementIdFirstStatement(), entry.getValue().getCompiled(), statementNameResolver, userObjectResolver, substitutionParameterResolver, this); } catch (EPDeployException ex) { throw new EPException(ex.getMessage(), ex);
public static DeploymentInternal deployFresh(String deploymentId, int statementIdFirstStatement, EPCompiled compiled, StatementNameRuntimeOption statementNameResolverRuntime, StatementUserObjectRuntimeOption userObjectResolverRuntime, StatementSubstitutionParameterOption substitutionParameterResolver, EPRuntimeSPI epRuntime) throws EPDeployException { return deploy(false, deploymentId, statementIdFirstStatement, compiled, statementNameResolverRuntime, userObjectResolverRuntime, substitutionParameterResolver, epRuntime); }