Loading sharding-jdbc/src/main/java/io/shardingsphere/core/executor/SQLExecuteCallback.java +1 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import io.shardingsphere.core.executor.event.sql.SQLExecutionEvent; import io.shardingsphere.core.executor.event.sql.SQLExecutionEventFactory; import io.shardingsphere.core.executor.threadlocal.ExecutorDataMap; import io.shardingsphere.core.executor.threadlocal.ExecutorExceptionHandler; import lombok.Getter; import lombok.RequiredArgsConstructor; import java.sql.SQLException; Loading @@ -41,9 +40,8 @@ import java.util.Map; * @param <T> class type of return value */ @RequiredArgsConstructor public final class SQLExecuteCallback<T> implements ShardingExecuteCallback<BaseStatementUnit, T> { public class SQLExecuteCallback<T> implements ShardingExecuteCallback<BaseStatementUnit, T> { @Getter private final SQLType sqlType; private final boolean isExceptionThrown; Loading sharding-jdbc/src/main/java/io/shardingsphere/core/executor/SQLExecutorEngine.java +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ public final class SQLExecutorEngine implements AutoCloseable { * @throws SQLException SQL exception */ public <T> List<T> execute(final Collection<? extends BaseStatementUnit> baseStatementUnits, final SQLExecuteCallback<T> executeCallback) throws SQLException { OverallExecutionEvent event = new OverallExecutionEvent(executeCallback.getSqlType(), baseStatementUnits.size() > 1); OverallExecutionEvent event = new OverallExecutionEvent(baseStatementUnits.size() > 1); ShardingEventBusInstance.getInstance().post(event); try { List<T> result = ConnectionMode.MEMORY_STRICTLY == connectionMode ? shardingExecuteEngine.execute(new LinkedList<>(baseStatementUnits), executeCallback) Loading sharding-jdbc/src/main/java/io/shardingsphere/core/executor/event/overall/OverallExecutionEvent.java +0 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package io.shardingsphere.core.executor.event.overall; import io.shardingsphere.core.constant.SQLType; import io.shardingsphere.core.event.ShardingEvent; import lombok.Getter; import lombok.RequiredArgsConstructor; Loading @@ -31,7 +30,5 @@ import lombok.RequiredArgsConstructor; @Getter public final class OverallExecutionEvent extends ShardingEvent { private final SQLType sqlType; private final boolean parallelExecute; } sharding-jdbc/src/test/java/io/shardingsphere/core/executor/fixture/ExecutorTestUtil.java +0 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ public final class ExecutorTestUtil { * @param event overall execution event */ public static void listen(final EventCaller eventCaller, final OverallExecutionEvent event) { eventCaller.verifySQLType(event.getSqlType()); eventCaller.verifyIsParallelExecute(event.isParallelExecute()); if (ShardingEventType.EXECUTE_FAILURE == event.getEventType()) { eventCaller.verifyException(event.getException()); Loading sharding-opentracing/src/main/java/io/shardingsphere/opentracing/listener/execution/OverallExecuteEventListener.java +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ public final class OverallExecuteEventListener extends OpenTracingListener<Overa @Override protected void beforeExecute(final OverallExecutionEvent event) { ActiveSpan activeSpan = ShardingTracer.get().buildSpan(OPERATION_NAME_PREFIX + event.getSqlType().name()).withTag(Tags.COMPONENT.getKey(), ShardingTags.COMPONENT_NAME).startActive(); ActiveSpan activeSpan = ShardingTracer.get().buildSpan(OPERATION_NAME_PREFIX).withTag(Tags.COMPONENT.getKey(), ShardingTags.COMPONENT_NAME).startActive(); SPAN.set(activeSpan); if (event.isParallelExecute()) { ExecutorDataMap.getDataMap().put(SNAPSHOT_DATA_KEY, activeSpan.capture()); Loading Loading
sharding-jdbc/src/main/java/io/shardingsphere/core/executor/SQLExecuteCallback.java +1 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import io.shardingsphere.core.executor.event.sql.SQLExecutionEvent; import io.shardingsphere.core.executor.event.sql.SQLExecutionEventFactory; import io.shardingsphere.core.executor.threadlocal.ExecutorDataMap; import io.shardingsphere.core.executor.threadlocal.ExecutorExceptionHandler; import lombok.Getter; import lombok.RequiredArgsConstructor; import java.sql.SQLException; Loading @@ -41,9 +40,8 @@ import java.util.Map; * @param <T> class type of return value */ @RequiredArgsConstructor public final class SQLExecuteCallback<T> implements ShardingExecuteCallback<BaseStatementUnit, T> { public class SQLExecuteCallback<T> implements ShardingExecuteCallback<BaseStatementUnit, T> { @Getter private final SQLType sqlType; private final boolean isExceptionThrown; Loading
sharding-jdbc/src/main/java/io/shardingsphere/core/executor/SQLExecutorEngine.java +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ public final class SQLExecutorEngine implements AutoCloseable { * @throws SQLException SQL exception */ public <T> List<T> execute(final Collection<? extends BaseStatementUnit> baseStatementUnits, final SQLExecuteCallback<T> executeCallback) throws SQLException { OverallExecutionEvent event = new OverallExecutionEvent(executeCallback.getSqlType(), baseStatementUnits.size() > 1); OverallExecutionEvent event = new OverallExecutionEvent(baseStatementUnits.size() > 1); ShardingEventBusInstance.getInstance().post(event); try { List<T> result = ConnectionMode.MEMORY_STRICTLY == connectionMode ? shardingExecuteEngine.execute(new LinkedList<>(baseStatementUnits), executeCallback) Loading
sharding-jdbc/src/main/java/io/shardingsphere/core/executor/event/overall/OverallExecutionEvent.java +0 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package io.shardingsphere.core.executor.event.overall; import io.shardingsphere.core.constant.SQLType; import io.shardingsphere.core.event.ShardingEvent; import lombok.Getter; import lombok.RequiredArgsConstructor; Loading @@ -31,7 +30,5 @@ import lombok.RequiredArgsConstructor; @Getter public final class OverallExecutionEvent extends ShardingEvent { private final SQLType sqlType; private final boolean parallelExecute; }
sharding-jdbc/src/test/java/io/shardingsphere/core/executor/fixture/ExecutorTestUtil.java +0 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ public final class ExecutorTestUtil { * @param event overall execution event */ public static void listen(final EventCaller eventCaller, final OverallExecutionEvent event) { eventCaller.verifySQLType(event.getSqlType()); eventCaller.verifyIsParallelExecute(event.isParallelExecute()); if (ShardingEventType.EXECUTE_FAILURE == event.getEventType()) { eventCaller.verifyException(event.getException()); Loading
sharding-opentracing/src/main/java/io/shardingsphere/opentracing/listener/execution/OverallExecuteEventListener.java +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ public final class OverallExecuteEventListener extends OpenTracingListener<Overa @Override protected void beforeExecute(final OverallExecutionEvent event) { ActiveSpan activeSpan = ShardingTracer.get().buildSpan(OPERATION_NAME_PREFIX + event.getSqlType().name()).withTag(Tags.COMPONENT.getKey(), ShardingTags.COMPONENT_NAME).startActive(); ActiveSpan activeSpan = ShardingTracer.get().buildSpan(OPERATION_NAME_PREFIX).withTag(Tags.COMPONENT.getKey(), ShardingTags.COMPONENT_NAME).startActive(); SPAN.set(activeSpan); if (event.isParallelExecute()) { ExecutorDataMap.getDataMap().put(SNAPSHOT_DATA_KEY, activeSpan.capture()); Loading