flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-10046) .bat script to start a Flink service as a console application
Date Tue, 14 Aug 2018 10:54:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-10046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16579644#comment-16579644
] 

ASF GitHub Bot commented on FLINK-10046:
----------------------------------------

zentol commented on a change in pull request #6552: [FLINK-10046] [Startup Shell Scripts]
.bat script to start a Flink service as a console application
URL: https://github.com/apache/flink/pull/6552#discussion_r209907763
 
 

 ##########
 File path: flink-dist/src/main/flink-bin/bin/flink-console.bat
 ##########
 @@ -0,0 +1,87 @@
+::###############################################################################
+::  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.
+::###############################################################################
+
+@echo off
+rem Start a Flink service as a console application.
+
+setlocal
+
+rem Get first argument
+SET SERVICE=%1
+rem Get remaining arguments
+SET _all=%*
+IF NOT "%~2"=="" (
+    CALL SET ARGS=%%_all:*%1=%%
+) ELSE (
+    SET ARGS=
+)
+
+SET bin=%~dp0
+SET FLINK_ROOT_DIR=%bin%..
+SET FLINK_LIB_DIR=%FLINK_ROOT_DIR%\lib
+SET FLINK_CLASSPATH=%FLINK_LIB_DIR%\*
+SET FLINK_CONF_DIR=%FLINK_ROOT_DIR%\conf
+SET FLINK_LOG_DIR=%FLINK_ROOT_DIR%\log
+SET JVM_ARGS=-Xms1024m -Xmx1024m
+
+SET logname_tm=flink-%username%-taskmanager.log
+SET log_tm=%FLINK_LOG_DIR%\%logname_tm%
+SET outname_tm=flink-%username%-taskmanager.out
+SET out_tm=%FLINK_LOG_DIR%\%outname_tm%
+SET log_setting_tm=-Dlog.file="%log_tm%" -Dlogback.configurationFile=file:"%FLINK_CONF_DIR%\logback.xml"
-Dlog4j.configuration=file:"%FLINK_CONF_DIR%\log4j.properties"
+
+:: Log rotation (quick and dirty)
+CD "%FLINK_LOG_DIR%"
+for /l %%x in (5, -1, 1) do (
+SET /A y = %%x+1
+RENAME "%logname_jm%.%%x" "%logname_jm%.!y!" 2> nul
 
 Review comment:
   `logname_jm` is undefined

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> .bat script to start a Flink service as a console application
> -------------------------------------------------------------
>
>                 Key: FLINK-10046
>                 URL: https://issues.apache.org/jira/browse/FLINK-10046
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Startup Shell Scripts
>            Reporter: Pavel Shvetsov
>            Assignee: Pavel Shvetsov
>            Priority: Major
>              Labels: pull-request-available
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Create .bat script to start a Flink service as a console application on Windows



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message