forked from apache/shardingsphere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create ExecuteProcessReporter (apache#9674)
- Loading branch information
1 parent
7d3b42c
commit a007cb3
Showing
5 changed files
with
128 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...rg/apache/shardingsphere/governance/context/process/GovernanceExecuteProcessReporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.shardingsphere.governance.context.process; | ||
|
||
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext; | ||
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext; | ||
import org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutionUnit; | ||
import org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatus; | ||
import org.apache.shardingsphere.infra.executor.sql.process.spi.ExecuteProcessReporter; | ||
|
||
/** | ||
* Governance execute process reporter. | ||
*/ | ||
public final class GovernanceExecuteProcessReporter implements ExecuteProcessReporter { | ||
|
||
@Override | ||
public void report(final SQLStatementContext<?> context, final ExecutionGroupContext<SQLExecutionUnit> executionGroupContext, final ExecuteProcessStatus status) { | ||
// TODO :Call API of configCenter | ||
} | ||
|
||
@Override | ||
public void report(final String executionID, final SQLExecutionUnit executionUnit, final ExecuteProcessStatus status) { | ||
// TODO :Call API of configCenter | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
.../services/org.apache.shardingsphere.infra.executor.sql.process.spi.ExecuteProcessReporter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
org.apache.shardingsphere.governance.context.process.GovernanceExecuteProcessReporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...java/org/apache/shardingsphere/infra/executor/sql/process/spi/ExecuteProcessReporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.shardingsphere.infra.executor.sql.process.spi; | ||
|
||
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext; | ||
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext; | ||
import org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutionUnit; | ||
import org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatus; | ||
|
||
/** | ||
* Execute process report. | ||
*/ | ||
public interface ExecuteProcessReporter { | ||
|
||
/** | ||
* Report the summary of this task. | ||
* @param context context | ||
* @param executionGroupContext execution group context | ||
* @param status status | ||
*/ | ||
void report(SQLStatementContext<?> context, ExecutionGroupContext<SQLExecutionUnit> executionGroupContext, ExecuteProcessStatus status); | ||
|
||
/** | ||
* Report a unit of this task. | ||
* @param executionID execution ID | ||
* @param executionUnit execution unit | ||
* @param status status | ||
*/ | ||
void report(String executionID, SQLExecutionUnit executionUnit, ExecuteProcessStatus status); | ||
} |