[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-22 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/3935


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread tillrohrmann
Github user tillrohrmann commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117447913
  
--- Diff: 
flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingUtils.scala
 ---
@@ -28,7 +28,7 @@ import com.google.common.util.concurrent.MoreExecutors
 import com.typesafe.config.ConfigFactory
 import grizzled.slf4j.Logger
 import org.apache.flink.api.common.time.Time
-import org.apache.flink.configuration.{ConfigConstants, Configuration, 
HighAvailabilityOptions, TaskManagerOptions}
+import org.apache.flink.configuration._
--- End diff --

I don't think so @zentol.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117442464
  
--- Diff: 
flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingUtils.scala
 ---
@@ -28,7 +28,7 @@ import com.google.common.util.concurrent.MoreExecutors
 import com.typesafe.config.ConfigFactory
 import grizzled.slf4j.Logger
 import org.apache.flink.api.common.time.Time
-import org.apache.flink.configuration.{ConfigConstants, Configuration, 
HighAvailabilityOptions, TaskManagerOptions}
+import org.apache.flink.configuration._
--- End diff --

@aljoscha @tillrohrmann Do we have a policy in place for scala wilcard 
imports (in tests)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117442054
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerConfiguration.java
 ---
@@ -146,7 +147,7 @@ public static TaskManagerConfiguration 
fromConfiguration(Configuration configura
timeout = 
Time.milliseconds(AkkaUtils.getTimeout(configuration).toMillis());
} catch (Exception e) {
throw new IllegalArgumentException(
-   "Invalid format for '" + 
ConfigConstants.AKKA_ASK_TIMEOUT +
+   "Invalid format for '" + 
AkkaOptions.AKKA_ASK_TIMEOUT +
--- End diff --

replace with key


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117441942
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/RestartStrategyFactory.java
 ---
@@ -100,7 +100,7 @@ public static RestartStrategyFactory 
createRestartStrategyFactory(Configuration
} catch (NumberFormatException nfe) {
if (delayString.equals(pauseString)) {
throw new Exception("Invalid 
config value for " +
-   
ConfigConstants.AKKA_WATCH_HEARTBEAT_PAUSE + ": " + pauseString +
+   
AkkaOptions.AKKA_WATCH_HEARTBEAT_PAUSE + ": " + pauseString +
--- End diff --

replace with key


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117441051
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java ---
@@ -27,7 +27,7 @@
  */
 @PublicEvolving
 public class AkkaOptions {
-
+   
--- End diff --

revert


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117441386
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/client/JobAttachmentClientActor.java
 ---
@@ -114,7 +114,7 @@ else if 
(JobClientMessages.getRegistrationTimeout().equals(message)) {
client.tell(
decorateMessage(new 
Status.Failure(
new 
JobClientActorRegistrationTimeoutException("Registration for Job at the 
JobManager " +
-   "timed out. " + 
"You may increase '" + ConfigConstants.AKKA_CLIENT_TIMEOUT +
+   "timed out. " + 
"You may increase '" + AkkaOptions.AKKA_CLIENT_TIMEOUT +
--- End diff --

`ConfigConstants.AKKA_CLIENT_TIMEOUT` is only the key, so we should only 
contain the key of the ConfigOption, i.e 
`AkkaOptions.AKKA_CLIENT_TIMEOUT.key()`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117443837
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java ---
@@ -55,4 +55,88 @@
public static final ConfigOption AKKA_WATCH_HEARTBEAT_PAUSE = 
ConfigOptions
.key("akka.watch.heartbeat.pause")
.defaultValue("60 s");
+
+   /**
+* Timeout for the startup of the actor system
--- End diff --

The javadocs should all end with a `.`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117441984
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/query/QueryableStateClient.java
 ---
@@ -114,13 +114,11 @@ public QueryableStateClient(
LeaderRetrievalService leaderRetrievalService = 
highAvailabilityServices.getJobManagerLeaderRetriever(HighAvailabilityServices.DEFAULT_JOB_ID);
 
// Get the ask timeout
-   String askTimeoutString = config.getString(
-   ConfigConstants.AKKA_ASK_TIMEOUT,
-   ConfigConstants.DEFAULT_AKKA_ASK_TIMEOUT);
+   String askTimeoutString = 
config.getString(AkkaOptions.AKKA_ASK_TIMEOUT);
 
Duration timeout = FiniteDuration.apply(askTimeoutString);
if (!timeout.isFinite()) {
-   throw new 
IllegalConfigurationException(ConfigConstants.AKKA_ASK_TIMEOUT
+   throw new 
IllegalConfigurationException(AkkaOptions.AKKA_ASK_TIMEOUT
--- End diff --

replace with key


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117441680
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/client/JobSubmissionClientActor.java
 ---
@@ -119,7 +119,7 @@ public void handleCustomMessage(Object message) {
client.tell(
decorateMessage(new 
Status.Failure(
new 
JobClientActorSubmissionTimeoutException("Job submission to the JobManager 
timed out. " +
-   "You may 
increase '" + ConfigConstants.AKKA_CLIENT_TIMEOUT + "' in case the JobManager " 
+
+   "You may 
increase '" + AkkaOptions.AKKA_CLIENT_TIMEOUT + "' in case the JobManager " +
--- End diff --

replace ConfigOption with actual key


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117441909
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
 ---
@@ -87,7 +87,7 @@ public static FixedDelayRestartStrategyFactory 
createFactory(Configuration confi
} catch (NumberFormatException nfe) {
if (delayString.equals(timeoutString)) {
throw new Exception("Invalid config value for " 
+
-   
ConfigConstants.AKKA_WATCH_HEARTBEAT_PAUSE + ": " + timeoutString +
+   
AkkaOptions.AKKA_WATCH_HEARTBEAT_PAUSE + ": " + timeoutString +
--- End diff --

replace with key.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-18 Thread zjureel
Github user zjureel commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117390018
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java ---
@@ -28,31 +28,143 @@
 @PublicEvolving
 public class AkkaOptions {
 
+   public static String DEFAULT_AKKA_TRANSPORT_HEARTBEAT_INTERVAL = "1000 
s";
+
+   public static String DEFAULT_AKKA_TCP_TIMEOUT = "20 s";
+
+   public static String DEFAULT_AKKA_WATCH_HEARTBEAT_INTERVAL = "10 s";
--- End diff --

Thank you for your suggestion, and I was also bothered by the 
`DEFAULT_AKKA_*` fields while the default value is used. 
`ConfigOption#defaultValue()` sounds good.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-18 Thread tillrohrmann
Github user tillrohrmann commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117252282
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FailureRateRestartStrategy.java
 ---
@@ -92,7 +92,7 @@ public static FailureRateRestartStrategyFactory 
createFactory(Configuration conf
String failuresIntervalString = configuration.getString(

ConfigConstants.RESTART_STRATEGY_FAILURE_RATE_FAILURE_RATE_INTERVAL, 
Duration.apply(1, TimeUnit.MINUTES).toString()
);
-   String timeoutString = 
configuration.getString(ConfigConstants.AKKA_WATCH_HEARTBEAT_INTERVAL, 
ConfigConstants.DEFAULT_AKKA_ASK_TIMEOUT);
--- End diff --

Yes, since it does not make much sense to set the heartbeat interval to a 
smaller value than the akka ask timeout if not explicitly set.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-18 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117237209
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FailureRateRestartStrategy.java
 ---
@@ -92,7 +92,7 @@ public static FailureRateRestartStrategyFactory 
createFactory(Configuration conf
String failuresIntervalString = configuration.getString(

ConfigConstants.RESTART_STRATEGY_FAILURE_RATE_FAILURE_RATE_INTERVAL, 
Duration.apply(1, TimeUnit.MINUTES).toString()
);
-   String timeoutString = 
configuration.getString(ConfigConstants.AKKA_WATCH_HEARTBEAT_INTERVAL, 
ConfigConstants.DEFAULT_AKKA_ASK_TIMEOUT);
--- End diff --

@tillrohrmann Is it intended that the default for 
`AKKA_WATCH_HEARTBEAT_INTERVAL` is inherently tied to 
`DEFAULT_AKKA_ASK_TIMEOUT`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-18 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117236057
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java ---
@@ -28,31 +28,143 @@
 @PublicEvolving
 public class AkkaOptions {
 
+   public static String DEFAULT_AKKA_TRANSPORT_HEARTBEAT_INTERVAL = "1000 
s";
+
+   public static String DEFAULT_AKKA_TCP_TIMEOUT = "20 s";
+
+   public static String DEFAULT_AKKA_WATCH_HEARTBEAT_INTERVAL = "10 s";
--- End diff --

These should be moved into the `defaultValue` clause of the config option. 
They can be accessed from the ConfigOption using `ConfigOption#defaultValue()`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-18 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/3935#discussion_r117235231
  
--- Diff: 
flink-tests/src/test/java/org/apache/flink/test/recovery/ProcessFailureCancelingITCase.java
 ---
@@ -42,10 +41,8 @@
 import org.apache.flink.runtime.testingUtils.TestingUtils;
 import org.apache.flink.runtime.testutils.CommonTestUtils;
 import org.apache.flink.util.NetUtils;
-
--- End diff --

please revert all changes to imports in this file and others. This includes 
not removing empty lines, re-ordering imports or replacing `*` imports.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3935: [FLINK-6495] Migrate Akka configuration options

2017-05-17 Thread zjureel
GitHub user zjureel opened a pull request:

https://github.com/apache/flink/pull/3935

[FLINK-6495] Migrate Akka configuration options

Thanks for contributing to Apache Flink. Before you open your pull request, 
please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your 
pull request. For more information and/or questions please refer to the [How To 
Contribute guide](http://flink.apache.org/how-to-contribute.html).
In addition to going through the list, please provide a meaningful 
description of your changes.

- [ ] General
  - The pull request references the related JIRA issue ("[FLINK-XXX] Jira 
title text")
  - The pull request addresses only one issue
  - Each commit in the PR has a meaningful commit message (including the 
JIRA id)

- [ ] Documentation
  - Documentation has been added for new functionality
  - Old documentation affected by the pull request has been updated
  - JavaDoc for public methods has been added

- [ ] Tests & Build
  - Functionality added by the pull request is covered by tests
  - `mvn clean verify` has been executed successfully locally or a Travis 
build has passed


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zjureel/flink FLINK-6495

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/3935.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3935


commit c87718694052e499875d78c7ef2bc9573dc0cc4e
Author: zjureel 
Date:   2017-05-18T04:34:40Z

[FLINK-6495] Migrate Akka configuration options




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---