Skip to content
Permalink
Browse files
[NO ISSUE][BAD] Remove Deprecated IStatementExecutorContext
Change-Id: I3c78ac7abd49f755f789bf0329faa581b4242bfe
  • Loading branch information
mhubail committed Feb 9, 2019
1 parent e36e89a commit d42a31581b233e27f0bfca52c8a9d4aae1898bc1
Showing 10 changed files with 21 additions and 30 deletions.
@@ -340,7 +340,7 @@ protected void handleDataverseDropStatement(MetadataProvider metadataProvider, S
tempMdProvider.getLocks().reset();
ChannelDropStatement drop =
new ChannelDropStatement(dvId, new Identifier(channel.getChannelId().getEntityName()), false);
drop.handle(hcc, this, requestParameters, tempMdProvider, 0, null);
drop.handle(hcc, this, requestParameters, tempMdProvider, 0);
}
for (Procedure procedure : procedures) {
if (!procedure.getEntityId().getDataverse().equals(dvId.getValue())) {
@@ -349,13 +349,13 @@ protected void handleDataverseDropStatement(MetadataProvider metadataProvider, S
tempMdProvider.getLocks().reset();
ProcedureDropStatement drop = new ProcedureDropStatement(new FunctionSignature(dvId.getValue(),
procedure.getEntityId().getEntityName(), procedure.getArity()), false);
drop.handle(hcc, this, requestParameters, tempMdProvider, 0, null);
drop.handle(hcc, this, requestParameters, tempMdProvider, 0);
}
List<Broker> brokers = BADLangExtension.getBrokers(mdTxnCtx, dvId.getValue());
for (Broker broker : brokers) {
tempMdProvider.getLocks().reset();
BrokerDropStatement drop = new BrokerDropStatement(dvId, new Identifier(broker.getBrokerName()), false);
drop.handle(hcc, this, requestParameters, tempMdProvider, 0, null);
drop.handle(hcc, this, requestParameters, tempMdProvider, 0);
}
MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
super.handleDataverseDropStatement(metadataProvider, stmt, hcc, requestParameters);
@@ -30,7 +30,6 @@
import org.apache.asterix.metadata.declared.MetadataProvider;
import org.apache.asterix.translator.IRequestParameters;
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.api.client.IHyracksClientConnection;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -71,8 +70,8 @@ public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationExce

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
//TODO: dont drop a broker that's being used
String dataverse = ((QueryTranslator) statementExecutor).getActiveDataverse(dataverseName);
MetadataTransactionContext mdTxnCtx = null;
@@ -40,7 +40,6 @@
import org.apache.asterix.metadata.declared.MetadataProvider;
import org.apache.asterix.translator.IRequestParameters;
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.api.client.IHyracksClientConnection;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -83,8 +82,8 @@ public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationExce

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
String dataverse = ((QueryTranslator) statementExecutor).getActiveDataverse(dataverseName);
boolean txnActive = false;
EntityId entityId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverse, channelName.getValue());
@@ -52,7 +52,6 @@
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
import org.apache.asterix.translator.IStatementExecutor.Stats;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
import org.apache.hyracks.api.client.IHyracksClientConnection;
@@ -121,8 +120,8 @@ public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationExce

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
String dataverse = ((QueryTranslator) statementExecutor).getActiveDataverse(dataverseName);
String brokerDataverse = ((QueryTranslator) statementExecutor).getActiveDataverse(brokerDataverseName);

@@ -46,7 +46,6 @@
import org.apache.asterix.om.functions.BuiltinFunctions;
import org.apache.asterix.translator.IRequestParameters;
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
import org.apache.hyracks.api.client.IHyracksClientConnection;
@@ -101,8 +100,8 @@ public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationExce

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
String dataverse = ((QueryTranslator) statementExecutor).getActiveDataverse(dataverseName);

MetadataTransactionContext mdTxnCtx = null;
@@ -33,7 +33,6 @@
import org.apache.asterix.metadata.declared.MetadataProvider;
import org.apache.asterix.translator.IRequestParameters;
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.api.client.IHyracksClientConnection;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -75,8 +74,8 @@ public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationExce

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
String dataverse = ((QueryTranslator) statementExecutor).getActiveDataverse(dataverseName);
MetadataTransactionContext mdTxnCtx = null;
try {
@@ -68,7 +68,6 @@
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
import org.apache.asterix.translator.IStatementExecutor.Stats;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.algebricks.common.utils.Pair;
import org.apache.hyracks.api.client.IHyracksClientConnection;
@@ -258,8 +257,8 @@ private JobSpecification createChannelJob(IStatementExecutor statementExecutor,

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestContext, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestContext, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
//This function performs three tasks:
//1. Create datasets for the Channel
//2. Create and run the Channel Job
@@ -69,7 +69,6 @@
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
import org.apache.asterix.translator.IStatementExecutor.Stats;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.algebricks.common.utils.Pair;
import org.apache.hyracks.api.client.IHyracksClientConnection;
@@ -223,8 +222,8 @@ private void setupDeployedJobSpec(EntityId entityId, JobSpecification jobSpec, I

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
ICcApplicationContext appCtx = metadataProvider.getApplicationContext();
ActiveNotificationHandler activeEventHandler =
(ActiveNotificationHandler) appCtx.getActiveNotificationHandler();
@@ -50,7 +50,6 @@
import org.apache.asterix.translator.ConstantHelper;
import org.apache.asterix.translator.IRequestParameters;
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.api.client.IHyracksClientConnection;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -97,8 +96,8 @@ public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationExce

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
ICcApplicationContext appCtx = metadataProvider.getApplicationContext();
ActiveNotificationHandler activeEventHandler =
(ActiveNotificationHandler) appCtx.getActiveNotificationHandler();
@@ -40,7 +40,6 @@
import org.apache.asterix.metadata.declared.MetadataProvider;
import org.apache.asterix.translator.IRequestParameters;
import org.apache.asterix.translator.IStatementExecutor;
import org.apache.asterix.translator.IStatementExecutorContext;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.api.client.IHyracksClientConnection;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -77,8 +76,8 @@ public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationExce

@Override
public void handle(IHyracksClientConnection hcc, IStatementExecutor statementExecutor,
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId,
IStatementExecutorContext executorCtx) throws HyracksDataException, AlgebricksException {
IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId)
throws HyracksDataException, AlgebricksException {
ICcApplicationContext appCtx = metadataProvider.getApplicationContext();
ActiveNotificationHandler activeEventHandler =
(ActiveNotificationHandler) appCtx.getActiveNotificationHandler();

0 comments on commit d42a315

Please sign in to comment.