lenboo
4 years ago
48 changed files with 711 additions and 592 deletions
@ -1 +1 @@
|
||||
# Dolphin Scheduler for Docker |
||||
# DolphinScheduler for Docker |
||||
|
@ -0,0 +1,92 @@
|
||||
; 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. |
||||
|
||||
; program config file |
||||
|
||||
[program:master] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start master-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_MASTER_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=10 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:worker] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start worker-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_WORKER_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=10 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:api] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start api-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_API_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=10 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:alert] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start alert-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_ALERT_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=5 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:logger] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start logger-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_LOGGER_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=5 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
@ -0,0 +1,35 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
apiVersion: v1 |
||||
kind: Service |
||||
metadata: |
||||
name: {{ include "dolphinscheduler.fullname" . }}-alert |
||||
labels: |
||||
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert |
||||
app.kubernetes.io/instance: {{ .Release.Name }} |
||||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
||||
spec: |
||||
ports: |
||||
- port: 50052 |
||||
targetPort: alert-port |
||||
protocol: TCP |
||||
name: alert-port |
||||
selector: |
||||
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert |
||||
app.kubernetes.io/instance: {{ .Release.Name }} |
||||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
||||
app.kubernetes.io/component: alert |
@ -0,0 +1,46 @@
|
||||
/* |
||||
* 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.dolphinscheduler.common; |
||||
|
||||
import static org.junit.Assert.assertTrue; |
||||
|
||||
import java.lang.reflect.Field; |
||||
import java.lang.reflect.Modifier; |
||||
|
||||
import org.junit.Test; |
||||
|
||||
/** |
||||
* CommonTest |
||||
*/ |
||||
public class CommonTest { |
||||
|
||||
public static void setFinalStatic(Field field, Object newValue) throws NoSuchFieldException, IllegalAccessException { |
||||
field.setAccessible(true); |
||||
Field modifiersField = Field.class.getDeclaredField("modifiers"); |
||||
modifiersField.setAccessible(true); |
||||
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); |
||||
field.set(null, newValue); |
||||
} |
||||
|
||||
@Test |
||||
public void testSetFinalStatic() throws Exception { |
||||
setFinalStatic(Constants.class.getDeclaredField("KUBERNETES_MODE"), true); |
||||
assertTrue(Constants.KUBERNETES_MODE); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue