From issues-return-154262-archive-asf-public=cust-asf.ponee.io@flink.apache.org Wed Feb 21 12:48:32 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3867818061A for ; Wed, 21 Feb 2018 12:48:32 +0100 (CET) Received: (qmail 88110 invoked by uid 500); 21 Feb 2018 11:48:31 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 88100 invoked by uid 99); 21 Feb 2018 11:48:31 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2018 11:48:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 347B7DFC3E; Wed, 21 Feb 2018 11:48:28 +0000 (UTC) From: StephanEwen To: issues@flink.apache.org Reply-To: issues@flink.apache.org References: In-Reply-To: Subject: [GitHub] flink pull request #5528: [FLINK-6489] [FLINK-8696] [shell scripts] Remove J... Content-Type: text/plain Message-Id: <20180221114829.347B7DFC3E@git1-us-west.apache.org> Date: Wed, 21 Feb 2018 11:48:28 +0000 (UTC) Github user StephanEwen commented on a diff in the pull request: https://github.com/apache/flink/pull/5528#discussion_r169612616 --- Diff: flink-dist/src/main/flink-bin/bin/start-cluster.bat --- @@ -0,0 +1,77 @@ +::############################################################################### +:: 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 +setlocal EnableDelayedExpansion + +SET bin=%~dp0 +SET FLINK_ROOT_DIR=%bin%.. +SET FLINK_LIB_DIR=%FLINK_ROOT_DIR%\lib +SET FLINK_CONF_DIR=%FLINK_ROOT_DIR%\conf +SET FLINK_LOG_DIR=%FLINK_ROOT_DIR%\log + +SET JVM_ARGS=-Xms1024m -Xmx1024m + +SET FLINK_CLASSPATH=%FLINK_LIB_DIR%\* + +SET logname_jm=flink-%username%-jobmanager-%computername%.log +SET logname_tm=flink-%username%-taskmanager-%computername%.log +SET log_jm=%FLINK_LOG_DIR%\%logname_jm% +SET log_tm=%FLINK_LOG_DIR%\%logname_tm% +SET outname_jm=flink-%username%-jobmanager-%computername%.out +SET outname_tm=flink-%username%-taskmanager-%computername%.out +SET out_jm=%FLINK_LOG_DIR%\%outname_jm% +SET out_tm=%FLINK_LOG_DIR%\%outname_tm% + +SET log_setting_jm=-Dlog.file="%log_jm%" -Dlogback.configurationFile=file:"%FLINK_CONF_DIR%/logback.xml" -Dlog4j.configuration=file:"%FLINK_CONF_DIR%/log4j.properties" +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 +RENAME "%logname_tm%.%%x" "%logname_tm%.!y!" 2> nul +RENAME "%outname_jm%.%%x" "%outname_jm%.!y!" 2> nul +RENAME "%outname_tm%.%%x" "%outname_tm%.!y!" 2> nul +) +RENAME "%logname_jm%" "%logname_jm%.0" 2> nul +RENAME "%logname_tm%" "%logname_tm%.0" 2> nul +RENAME "%outname_jm%" "%outname_jm%.0" 2> nul +RENAME "%outname_tm%" "%outname_tm%.0" 2> nul +DEL "%logname_jm%.6" 2> nul +DEL "%logname_tm%.6" 2> nul +DEL "%outname_jm%.6" 2> nul +DEL "%outname_tm%.6" 2> nul + +for %%X in (java.exe) do (set FOUND=%%~$PATH:X) +if not defined FOUND ( + echo java.exe was not found in PATH variable + goto :eof +) + +echo Starting a local cluster with one JobManager process and one TaskManager process. + +echo You can terminate the processes via CTRL-C in the spawned shell windows. + +echo Web interface by default on http://localhost:8081/. --- End diff -- I would like to keep it at 8081, because the flip-6 endpoint will switch to that in the next days anyways and they will probably not be aware that this would need to be updated again ;-) ---