Browse Source

catch exception transaction method does not take effect to modify (#1258)

* ConnectionFactory add paging intercepter

* remove spotbugs-annotations.jar LGPL protocol

* test

* catch exception transaction method does not take effect to modify

* .evn rollback

* DataSourceService rollback

* LogViewServiceGrpc rollback
pull/2/head
qiaozhanwei 5 years ago committed by lgcareer
parent
commit
21bf3b8372
  1. 4
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java
  2. 9
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessInstanceService.java
  3. 6
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
  4. 34
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java
  5. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UdfFuncService.java
  6. 3
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/ConnectionFactory.java
  7. 788
      dolphinscheduler-rpc/src/main/java/org/apache/dolphinscheduler/rpc/LogViewServiceGrpc.java

4
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java

@ -580,8 +580,8 @@ public class DataSourceService extends BaseService{
datasourceUserMapper.deleteByDatasourceId(datasourceId);
putMsg(result, Status.SUCCESS);
} catch (Exception e) {
logger.error("delete datasource fail",e);
throw new RuntimeException("delete datasource fail");
logger.error("delete datasource error",e);
throw new RuntimeException("delete datasource error");
}
return result;
}

9
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessInstanceService.java

@ -536,12 +536,9 @@ public class ProcessInstanceService extends BaseDAGService {
nodeValueSb.append(ipSb);
}
try {
logger.info("delete task queue node : {}",nodeValueSb.toString());
tasksQueue.removeNode(org.apache.dolphinscheduler.common.Constants.DOLPHINSCHEDULER_TASKS_QUEUE, nodeValueSb.toString());
}catch (Exception e){
logger.error("delete task queue node : {}", nodeValueSb.toString());
}
logger.info("delete task queue node : {}",nodeValueSb.toString());
tasksQueue.removeNode(org.apache.dolphinscheduler.common.Constants.DOLPHINSCHEDULER_TASKS_QUEUE, nodeValueSb.toString());
}
}

6
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java

@ -153,8 +153,7 @@ public class ResourcesService extends BaseService {
result.setData(resultMap);
} catch (Exception e) {
logger.error("resource already exists, can't recreate ", e);
putMsg(result, Status.CREATE_RESOURCE_ERROR);
return result;
throw new RuntimeException("resource already exists, can't recreate");
}
// fail upload
@ -248,8 +247,7 @@ public class ResourcesService extends BaseService {
result.setData(resultMap);
} catch (Exception e) {
logger.error(Status.UPDATE_RESOURCE_ERROR.getMsg(), e);
putMsg(result, Status.UPDATE_RESOURCE_ERROR);
return result;
throw new RuntimeException(Status.UPDATE_RESOURCE_ERROR.getMsg());
}
// if name unchanged, return directly without moving on HDFS
if (originResourceName.equals(name)) {

34
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java

@ -97,9 +97,16 @@ public class SchedulerService extends BaseService {
* @throws IOException ioexception
*/
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> insertSchedule(User loginUser, String projectName, Integer processDefineId, String schedule, WarningType warningType,
int warningGroupId, FailureStrategy failureStrategy,
String receivers, String receiversCc, Priority processInstancePriority, int workerGroupId) throws IOException {
public Map<String, Object> insertSchedule(User loginUser, String projectName,
Integer processDefineId,
String schedule,
WarningType warningType,
int warningGroupId,
FailureStrategy failureStrategy,
String receivers,
String receiversCc,
Priority processInstancePriority,
int workerGroupId) throws IOException {
Map<String, Object> result = new HashMap<String, Object>(5);
@ -183,10 +190,18 @@ public class SchedulerService extends BaseService {
* @throws IOException ioexception
*/
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> updateSchedule(User loginUser, String projectName, Integer id, String scheduleExpression, WarningType warningType,
int warningGroupId, FailureStrategy failureStrategy,
String receivers, String receiversCc, ReleaseState scheduleStatus,
Priority processInstancePriority, int workerGroupId) throws IOException {
public Map<String, Object> updateSchedule(User loginUser,
String projectName,
Integer id,
String scheduleExpression,
WarningType warningType,
int warningGroupId,
FailureStrategy failureStrategy,
String receivers,
String receiversCc,
ReleaseState scheduleStatus,
Priority processInstancePriority,
int workerGroupId) throws IOException {
Map<String, Object> result = new HashMap<String, Object>(5);
Project project = projectMapper.queryByName(projectName);
@ -277,7 +292,10 @@ public class SchedulerService extends BaseService {
* @return publish result code
*/
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> setScheduleState(User loginUser, String projectName, Integer id, ReleaseState scheduleStatus) {
public Map<String, Object> setScheduleState(User loginUser,
String projectName,
Integer id,
ReleaseState scheduleStatus) {
Map<String, Object> result = new HashMap<String, Object>(5);

2
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UdfFuncService.java

@ -298,7 +298,7 @@ public class UdfFuncService extends BaseService{
* @param id udf function id
* @return delete result code
*/
@Transactional(value = "transactionManager",rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class)
public Result delete(int id) {
Result result = new Result();

3
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/ConnectionFactory.java

@ -20,6 +20,8 @@ import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.ibatis.mapping.Environment;
import org.apache.ibatis.session.SqlSession;
@ -30,6 +32,7 @@ import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
import javax.sql.DataSource;

788
dolphinscheduler-rpc/src/main/java/org/apache/dolphinscheduler/rpc/LogViewServiceGrpc.java

@ -42,474 +42,474 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
comments = "Source: scheduler.proto")
public final class LogViewServiceGrpc {
private LogViewServiceGrpc() {}
private LogViewServiceGrpc() {}
public static final String SERVICE_NAME = "schduler.LogViewService";
public static final String SERVICE_NAME = "schduler.LogViewService";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getRollViewLogMethod()} instead.
public static final io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> METHOD_ROLL_VIEW_LOG = getRollViewLogMethod();
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getRollViewLogMethod()} instead.
public static final io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> METHOD_ROLL_VIEW_LOG = getRollViewLogMethod();
private static volatile io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getRollViewLogMethod;
private static volatile io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getRollViewLogMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getRollViewLogMethod() {
io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter, org.apache.dolphinscheduler.rpc.RetStrInfo> getRollViewLogMethod;
if ((getRollViewLogMethod = LogViewServiceGrpc.getRollViewLogMethod) == null) {
synchronized (LogViewServiceGrpc.class) {
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getRollViewLogMethod() {
io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.LogParameter, org.apache.dolphinscheduler.rpc.RetStrInfo> getRollViewLogMethod;
if ((getRollViewLogMethod = LogViewServiceGrpc.getRollViewLogMethod) == null) {
LogViewServiceGrpc.getRollViewLogMethod = getRollViewLogMethod =
io.grpc.MethodDescriptor.<org.apache.dolphinscheduler.rpc.LogParameter, org.apache.dolphinscheduler.rpc.RetStrInfo>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"schduler.LogViewService", "rollViewLog"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.LogParameter.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.RetStrInfo.getDefaultInstance()))
.setSchemaDescriptor(new LogViewServiceMethodDescriptorSupplier("rollViewLog"))
.build();
}
}
synchronized (LogViewServiceGrpc.class) {
if ((getRollViewLogMethod = LogViewServiceGrpc.getRollViewLogMethod) == null) {
LogViewServiceGrpc.getRollViewLogMethod = getRollViewLogMethod =
io.grpc.MethodDescriptor.<org.apache.dolphinscheduler.rpc.LogParameter, org.apache.dolphinscheduler.rpc.RetStrInfo>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"schduler.LogViewService", "rollViewLog"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.LogParameter.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.RetStrInfo.getDefaultInstance()))
.setSchemaDescriptor(new LogViewServiceMethodDescriptorSupplier("rollViewLog"))
.build();
}
}
}
return getRollViewLogMethod;
}
return getRollViewLogMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getViewLogMethod()} instead.
public static final io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> METHOD_VIEW_LOG = getViewLogMethod();
private static volatile io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getViewLogMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getViewLogMethod() {
io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetStrInfo> getViewLogMethod;
if ((getViewLogMethod = LogViewServiceGrpc.getViewLogMethod) == null) {
synchronized (LogViewServiceGrpc.class) {
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getViewLogMethod()} instead.
public static final io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> METHOD_VIEW_LOG = getViewLogMethod();
private static volatile io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getViewLogMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo> getViewLogMethod() {
io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetStrInfo> getViewLogMethod;
if ((getViewLogMethod = LogViewServiceGrpc.getViewLogMethod) == null) {
LogViewServiceGrpc.getViewLogMethod = getViewLogMethod =
io.grpc.MethodDescriptor.<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetStrInfo>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"schduler.LogViewService", "viewLog"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.PathParameter.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.RetStrInfo.getDefaultInstance()))
.setSchemaDescriptor(new LogViewServiceMethodDescriptorSupplier("viewLog"))
.build();
}
}
synchronized (LogViewServiceGrpc.class) {
if ((getViewLogMethod = LogViewServiceGrpc.getViewLogMethod) == null) {
LogViewServiceGrpc.getViewLogMethod = getViewLogMethod =
io.grpc.MethodDescriptor.<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetStrInfo>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"schduler.LogViewService", "viewLog"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.PathParameter.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.RetStrInfo.getDefaultInstance()))
.setSchemaDescriptor(new LogViewServiceMethodDescriptorSupplier("viewLog"))
.build();
}
}
}
return getViewLogMethod;
}
return getViewLogMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getGetLogBytesMethod()} instead.
public static final io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo> METHOD_GET_LOG_BYTES = getGetLogBytesMethod();
private static volatile io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo> getGetLogBytesMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo> getGetLogBytesMethod() {
io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetByteInfo> getGetLogBytesMethod;
if ((getGetLogBytesMethod = LogViewServiceGrpc.getGetLogBytesMethod) == null) {
synchronized (LogViewServiceGrpc.class) {
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getGetLogBytesMethod()} instead.
public static final io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo> METHOD_GET_LOG_BYTES = getGetLogBytesMethod();
private static volatile io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo> getGetLogBytesMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo> getGetLogBytesMethod() {
io.grpc.MethodDescriptor<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetByteInfo> getGetLogBytesMethod;
if ((getGetLogBytesMethod = LogViewServiceGrpc.getGetLogBytesMethod) == null) {
LogViewServiceGrpc.getGetLogBytesMethod = getGetLogBytesMethod =
io.grpc.MethodDescriptor.<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetByteInfo>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"schduler.LogViewService", "getLogBytes"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.PathParameter.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.RetByteInfo.getDefaultInstance()))
.setSchemaDescriptor(new LogViewServiceMethodDescriptorSupplier("getLogBytes"))
.build();
}
}
synchronized (LogViewServiceGrpc.class) {
if ((getGetLogBytesMethod = LogViewServiceGrpc.getGetLogBytesMethod) == null) {
LogViewServiceGrpc.getGetLogBytesMethod = getGetLogBytesMethod =
io.grpc.MethodDescriptor.<org.apache.dolphinscheduler.rpc.PathParameter, org.apache.dolphinscheduler.rpc.RetByteInfo>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"schduler.LogViewService", "getLogBytes"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.PathParameter.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.apache.dolphinscheduler.rpc.RetByteInfo.getDefaultInstance()))
.setSchemaDescriptor(new LogViewServiceMethodDescriptorSupplier("getLogBytes"))
.build();
}
}
}
return getGetLogBytesMethod;
}
return getGetLogBytesMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static LogViewServiceStub newStub(io.grpc.Channel channel) {
return new LogViewServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static LogViewServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new LogViewServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static LogViewServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new LogViewServiceFutureStub(channel);
}
/**
* <pre>
**
* log view service
* </pre>
*/
public static abstract class LogViewServiceImplBase implements io.grpc.BindableService {
/**
* <pre>
**
* roll view log
* </pre>
* Creates a new async stub that supports all call types for the service
*/
public void rollViewLog(org.apache.dolphinscheduler.rpc.LogParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo> responseObserver) {
asyncUnimplementedUnaryCall(getRollViewLogMethod(), responseObserver);
public static LogViewServiceStub newStub(io.grpc.Channel channel) {
return new LogViewServiceStub(channel);
}
/**
* <pre>
**
* view all log
* </pre>
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public void viewLog(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo> responseObserver) {
asyncUnimplementedUnaryCall(getViewLogMethod(), responseObserver);
public static LogViewServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new LogViewServiceBlockingStub(channel);
}
/**
* <pre>
**
* get log bytes
* </pre>
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public void getLogBytes(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetByteInfo> responseObserver) {
asyncUnimplementedUnaryCall(getGetLogBytesMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getRollViewLogMethod(),
asyncUnaryCall(
new MethodHandlers<
org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo>(
this, METHODID_ROLL_VIEW_LOG)))
.addMethod(
getViewLogMethod(),
asyncUnaryCall(
new MethodHandlers<
org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo>(
this, METHODID_VIEW_LOG)))
.addMethod(
getGetLogBytesMethod(),
asyncUnaryCall(
new MethodHandlers<
org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo>(
this, METHODID_GET_LOG_BYTES)))
.build();
}
}
/**
* <pre>
**
* log view service
* </pre>
*/
public static final class LogViewServiceStub extends io.grpc.stub.AbstractStub<LogViewServiceStub> {
private LogViewServiceStub(io.grpc.Channel channel) {
super(channel);
}
private LogViewServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected LogViewServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LogViewServiceStub(channel, callOptions);
public static LogViewServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new LogViewServiceFutureStub(channel);
}
/**
* <pre>
**
* roll view log
* log view service
* </pre>
*/
public void rollViewLog(org.apache.dolphinscheduler.rpc.LogParameter request,
public static abstract class LogViewServiceImplBase implements io.grpc.BindableService {
/**
* <pre>
**
* roll view log
* </pre>
*/
public void rollViewLog(org.apache.dolphinscheduler.rpc.LogParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo> responseObserver) {
asyncUnimplementedUnaryCall(getRollViewLogMethod(), responseObserver);
}
/**
* <pre>
**
* view all log
* </pre>
*/
public void viewLog(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getRollViewLogMethod(), getCallOptions()), request, responseObserver);
}
asyncUnimplementedUnaryCall(getViewLogMethod(), responseObserver);
}
/**
* <pre>
**
* view all log
* </pre>
*/
public void viewLog(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getViewLogMethod(), getCallOptions()), request, responseObserver);
/**
* <pre>
**
* get log bytes
* </pre>
*/
public void getLogBytes(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetByteInfo> responseObserver) {
asyncUnimplementedUnaryCall(getGetLogBytesMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getRollViewLogMethod(),
asyncUnaryCall(
new MethodHandlers<
org.apache.dolphinscheduler.rpc.LogParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo>(
this, METHODID_ROLL_VIEW_LOG)))
.addMethod(
getViewLogMethod(),
asyncUnaryCall(
new MethodHandlers<
org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetStrInfo>(
this, METHODID_VIEW_LOG)))
.addMethod(
getGetLogBytesMethod(),
asyncUnaryCall(
new MethodHandlers<
org.apache.dolphinscheduler.rpc.PathParameter,
org.apache.dolphinscheduler.rpc.RetByteInfo>(
this, METHODID_GET_LOG_BYTES)))
.build();
}
}
/**
* <pre>
**
* get log bytes
* log view service
* </pre>
*/
public void getLogBytes(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetByteInfo> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetLogBytesMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* <pre>
**
* log view service
* </pre>
*/
public static final class LogViewServiceBlockingStub extends io.grpc.stub.AbstractStub<LogViewServiceBlockingStub> {
private LogViewServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
public static final class LogViewServiceStub extends io.grpc.stub.AbstractStub<LogViewServiceStub> {
private LogViewServiceStub(io.grpc.Channel channel) {
super(channel);
}
private LogViewServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
private LogViewServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected LogViewServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LogViewServiceBlockingStub(channel, callOptions);
}
@java.lang.Override
protected LogViewServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LogViewServiceStub(channel, callOptions);
}
/**
* <pre>
**
* roll view log
* </pre>
*/
public org.apache.dolphinscheduler.rpc.RetStrInfo rollViewLog(org.apache.dolphinscheduler.rpc.LogParameter request) {
return blockingUnaryCall(
getChannel(), getRollViewLogMethod(), getCallOptions(), request);
}
/**
* <pre>
**
* roll view log
* </pre>
*/
public void rollViewLog(org.apache.dolphinscheduler.rpc.LogParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getRollViewLogMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
**
* view all log
* </pre>
*/
public org.apache.dolphinscheduler.rpc.RetStrInfo viewLog(org.apache.dolphinscheduler.rpc.PathParameter request) {
return blockingUnaryCall(
getChannel(), getViewLogMethod(), getCallOptions(), request);
/**
* <pre>
**
* view all log
* </pre>
*/
public void viewLog(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getViewLogMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
**
* get log bytes
* </pre>
*/
public void getLogBytes(org.apache.dolphinscheduler.rpc.PathParameter request,
io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetByteInfo> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetLogBytesMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* <pre>
**
* get log bytes
* log view service
* </pre>
*/
public org.apache.dolphinscheduler.rpc.RetByteInfo getLogBytes(org.apache.dolphinscheduler.rpc.PathParameter request) {
return blockingUnaryCall(
getChannel(), getGetLogBytesMethod(), getCallOptions(), request);
}
}
/**
* <pre>
**
* log view service
* </pre>
*/
public static final class LogViewServiceFutureStub extends io.grpc.stub.AbstractStub<LogViewServiceFutureStub> {
private LogViewServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
public static final class LogViewServiceBlockingStub extends io.grpc.stub.AbstractStub<LogViewServiceBlockingStub> {
private LogViewServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private LogViewServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
private LogViewServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected LogViewServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LogViewServiceFutureStub(channel, callOptions);
}
@java.lang.Override
protected LogViewServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LogViewServiceBlockingStub(channel, callOptions);
}
/**
* <pre>
**
* roll view log
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.apache.dolphinscheduler.rpc.RetStrInfo> rollViewLog(
org.apache.dolphinscheduler.rpc.LogParameter request) {
return futureUnaryCall(
getChannel().newCall(getRollViewLogMethod(), getCallOptions()), request);
}
/**
* <pre>
**
* roll view log
* </pre>
*/
public org.apache.dolphinscheduler.rpc.RetStrInfo rollViewLog(org.apache.dolphinscheduler.rpc.LogParameter request) {
return blockingUnaryCall(
getChannel(), getRollViewLogMethod(), getCallOptions(), request);
}
/**
* <pre>
**
* view all log
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.apache.dolphinscheduler.rpc.RetStrInfo> viewLog(
org.apache.dolphinscheduler.rpc.PathParameter request) {
return futureUnaryCall(
getChannel().newCall(getViewLogMethod(), getCallOptions()), request);
/**
* <pre>
**
* view all log
* </pre>
*/
public org.apache.dolphinscheduler.rpc.RetStrInfo viewLog(org.apache.dolphinscheduler.rpc.PathParameter request) {
return blockingUnaryCall(
getChannel(), getViewLogMethod(), getCallOptions(), request);
}
/**
* <pre>
**
* get log bytes
* </pre>
*/
public org.apache.dolphinscheduler.rpc.RetByteInfo getLogBytes(org.apache.dolphinscheduler.rpc.PathParameter request) {
return blockingUnaryCall(
getChannel(), getGetLogBytesMethod(), getCallOptions(), request);
}
}
/**
* <pre>
**
* get log bytes
* log view service
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.apache.dolphinscheduler.rpc.RetByteInfo> getLogBytes(
org.apache.dolphinscheduler.rpc.PathParameter request) {
return futureUnaryCall(
getChannel().newCall(getGetLogBytesMethod(), getCallOptions()), request);
}
}
private static final int METHODID_ROLL_VIEW_LOG = 0;
private static final int METHODID_VIEW_LOG = 1;
private static final int METHODID_GET_LOG_BYTES = 2;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final LogViewServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(LogViewServiceImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
public static final class LogViewServiceFutureStub extends io.grpc.stub.AbstractStub<LogViewServiceFutureStub> {
private LogViewServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_ROLL_VIEW_LOG:
serviceImpl.rollViewLog((org.apache.dolphinscheduler.rpc.LogParameter) request,
(io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo>) responseObserver);
break;
case METHODID_VIEW_LOG:
serviceImpl.viewLog((org.apache.dolphinscheduler.rpc.PathParameter) request,
(io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo>) responseObserver);
break;
case METHODID_GET_LOG_BYTES:
serviceImpl.getLogBytes((org.apache.dolphinscheduler.rpc.PathParameter) request,
(io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetByteInfo>) responseObserver);
break;
default:
throw new AssertionError();
}
}
private LogViewServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
@java.lang.Override
protected LogViewServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LogViewServiceFutureStub(channel, callOptions);
}
private static abstract class LogViewServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
LogViewServiceBaseDescriptorSupplier() {}
/**
* <pre>
**
* roll view log
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.apache.dolphinscheduler.rpc.RetStrInfo> rollViewLog(
org.apache.dolphinscheduler.rpc.LogParameter request) {
return futureUnaryCall(
getChannel().newCall(getRollViewLogMethod(), getCallOptions()), request);
}
/**
* <pre>
**
* view all log
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.apache.dolphinscheduler.rpc.RetStrInfo> viewLog(
org.apache.dolphinscheduler.rpc.PathParameter request) {
return futureUnaryCall(
getChannel().newCall(getViewLogMethod(), getCallOptions()), request);
}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.apache.dolphinscheduler.rpc.SchdulerProto.getDescriptor();
/**
* <pre>
**
* get log bytes
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.apache.dolphinscheduler.rpc.RetByteInfo> getLogBytes(
org.apache.dolphinscheduler.rpc.PathParameter request) {
return futureUnaryCall(
getChannel().newCall(getGetLogBytesMethod(), getCallOptions()), request);
}
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("LogViewService");
private static final int METHODID_ROLL_VIEW_LOG = 0;
private static final int METHODID_VIEW_LOG = 1;
private static final int METHODID_GET_LOG_BYTES = 2;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final LogViewServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(LogViewServiceImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_ROLL_VIEW_LOG:
serviceImpl.rollViewLog((org.apache.dolphinscheduler.rpc.LogParameter) request,
(io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo>) responseObserver);
break;
case METHODID_VIEW_LOG:
serviceImpl.viewLog((org.apache.dolphinscheduler.rpc.PathParameter) request,
(io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetStrInfo>) responseObserver);
break;
case METHODID_GET_LOG_BYTES:
serviceImpl.getLogBytes((org.apache.dolphinscheduler.rpc.PathParameter) request,
(io.grpc.stub.StreamObserver<org.apache.dolphinscheduler.rpc.RetByteInfo>) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
}
private static final class LogViewServiceFileDescriptorSupplier
extends LogViewServiceBaseDescriptorSupplier {
LogViewServiceFileDescriptorSupplier() {}
}
private static abstract class LogViewServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
LogViewServiceBaseDescriptorSupplier() {}
private static final class LogViewServiceMethodDescriptorSupplier
extends LogViewServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.apache.dolphinscheduler.rpc.SchdulerProto.getDescriptor();
}
LogViewServiceMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("LogViewService");
}
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
private static final class LogViewServiceFileDescriptorSupplier
extends LogViewServiceBaseDescriptorSupplier {
LogViewServiceFileDescriptorSupplier() {}
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
private static final class LogViewServiceMethodDescriptorSupplier
extends LogViewServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (LogViewServiceGrpc.class) {
result = serviceDescriptor;
LogViewServiceMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new LogViewServiceFileDescriptorSupplier())
.addMethod(getRollViewLogMethod())
.addMethod(getViewLogMethod())
.addMethod(getGetLogBytesMethod())
.build();
}
}
synchronized (LogViewServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new LogViewServiceFileDescriptorSupplier())
.addMethod(getRollViewLogMethod())
.addMethod(getViewLogMethod())
.addMethod(getGetLogBytesMethod())
.build();
}
}
}
return result;
}
return result;
}
}

Loading…
Cancel
Save